-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webui: Add Firefox theme for use on Live media #4918
webui: Add Firefox theme for use on Live media #4918
Conversation
So far I've noticed a couple issues with this that will have to be resolved. On Live images built via the Image builder pipeline, the Web UI shows up ~like we want it: There are still a couple issues:
This was using the rather early post Python 3.12 live image: https://fedorapeople.org/groups/anaconda/webui_preview_image/x86_64/fedora-preview-live-installer-2023-07-11.iso Thinking this might be some image related breakage, I've also tried using a regular Fedora Rawhide live image from July 12. This time the page content does not load at all (but its loading the correct page): HOW TO TEST Then you can add the following COPR which has packages corresponding to this PR as of right now: Once you add the COPR, something like this should replace the on-media Anaconda with the one corresponding to this PR:
Alternatively you can fetch the RPMs from the COPR (or build them yourself from the PR),
Then start Anaconda in the usual way - either via its icon in the quick launch menu or via the |
Why does this contain two themes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default user and live user js code are mostly shared. Can't you create some common file and import it?
They are identical right now, but the expectation is the themes will diverge as we adjust the As for sharing code with the theme - I've just copied the theme created by @garrett in https://github.com/garrett/firefox-theme-frame & don't really have any experience with how it is done. So someone with a deeper knowledge of Firefox theming will need to answer this. :) |
The We could also keep using the |
/boot-iso --webui |
db1cff1
to
ab8faa7
Compare
Updated the PR to move most of the Firefox theme handling logic to the |
Updated test instructions:
Afterwards start the installer via the |
It looks like there are two title bars. First: window manager provided titlebar. Second: CSD with tabs. The theme was made with CSD (client-side decorations) in mind, not the window manager titlebar. We have two options:
That looks like it's due to a problem in the JS in Anaconda web UI, not in the theme. I've updated the theme to remove the button, fix the titlebar, and to try harder to make new windows show up. But after playing with it more, I think a more proper approach would be to hide the tab bar and use the window manager titlebar... but we'd have a close button (unless we use the semi-restricted environment that GNOME Initial Setup does... which may disable the X icon). |
ab8faa7
to
3b34335
Compare
☑️ I relicensed the theme to MIT, as asked. |
After thinking a bit about the themes, I realized the problem I have is that one is called "default". Perhaps "bootiso" would be better? |
3b34335
to
94cfcab
Compare
Well, the way it is we kinda need to always have a theme to pick - the live image theme is specifically picked for the Live image & the "default" theme will be used for everything else (which indeed is mostly the boot iso). |
94cfcab
to
bfec820
Compare
So this is how it looks like as of today: |
bfec820
to
9ecd813
Compare
I've updated it @ https://github.com/garrett/firefox-theme-frame The big changes:
The changes are @ garrett/firefox-theme-frame@4bd69e4 TL;DR: I've updated the theme. It should work much better now. (I hope!) 😉 |
The theme upstream is here: https://github.com/garrett/firefox-theme-frame Its main aim is to shape the Firefox window to the most suitable state on Live images: - has a header bar for window switching - has no tab/status/URL bars - has no browser controls As Firefox needs the profile folder to be writable, we need to copy the profile template to a writable directory & use that as the profile path for Firefox. We also need to make sure profile folders from previous runs (possible on Live) are cleaned up. To simplify things, we also use the same theme on non Live images for now, with the expectation that a tweaked theme will provided later.
9ecd813
to
07b10b1
Compare
Thanks! Just updated the PR your the latest version of your theme - will post screenshots in a bit (& will generate a new boot.iso). |
/boot-iso --webui |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python and bash parts LGTM.
It's a spaghetti monster, but it's flying!
Looking good IMHO. :) |
Whew. I'm happy to see the theme working as intended @ #4918 (comment)
🤣 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no comments on the css applied. Please attach to the PR the latest screenshot for both live and boot iso.
# make sure the profile directory exists and is empty | ||
if [ -d ${FIREFOX_PROFILE_PATH} ] | ||
then | ||
echo "Cleaning up existing Anaconda Firefox profile directory." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what scenario would the profile directory on /tmp already exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you launch the installer multiple times on Live media - quite a frequent occurrence during debugging & we know from logs attached to bug reports, that users do it quite often in real life, usually when encountering an error and trying again.
In any case, we really should start with empty profile or else I would expect the behavior on followup starts being non-deterministic given the sheer amount of stuff Firefox dumps to the originally empty folder.
/kickstart-test --waive webui only |
The theme upstream is here: https://github.com/garrett/firefox-theme-frame
Its main aim is to shape the Firefox window to the most suitable state on Live images:
As Firefox needs the profile folder to be writable, we need to copy the profile template to a writable tempdir & use that as the profile path for Firefox.
To simplify things, we also use the same theme on non Live images for now, with the expectation that a tweaked theme will provided later.
TODO