Skip to content

Web UI overhaul, settings layout rework, and Bee theme contrast fix - #142

Open
PatrickJnr wants to merge 3 commits into
Midrags:mainfrom
PatrickJnr:webui-overhaul
Open

Web UI overhaul, settings layout rework, and Bee theme contrast fix#142
PatrickJnr wants to merge 3 commits into
Midrags:mainfrom
PatrickJnr:webui-overhaul

Conversation

@PatrickJnr

Copy link
Copy Markdown

Three things in here. The web UI overhaul is the bulk of it, the Bee theme fix and the build script fix are small and separate commits so they're easy to drop if you'd rather take them on their own.

Web UI overhaul

The CSS was five files where premium.css overrode 75 classes from the other four, and defined .action-card and .action-grid twice inside itself with conflicting values. A lot of the layout only held together because of link order. That's now one app.css plus themes.css, roughly 3700 lines down to 2200.

Every hardcoded rgba(74, 158, 255, ...) is gone. That's the dark theme's blue, and it was being painted onto hovers, glows and focus rings across all 36 themes regardless of what the theme's accent actually was. Those are color-mix against var(--accent) now.

The CSS was also referencing tokens that were never defined anywhere (--text, --text-dim, --surface2, --bg-secondary), so those always silently fell through to their fallbacks. They exist now, derived from the theme's own values.

Home was seven stacked walls of action cards, about 25 buttons in a single column. Those are collapsible <details> groups now, with the two single button groups folded into Fixes & Patches. The FAQ banner became a <details> list too, which let the custom collapse handler go. The EAC guide modal was sitting in the middle of #page-home's content flow, it's down with the other 18 modals now.

Settings had a nav rail inside the app's nav rail. It's two flowing columns with no nav chrome at all, Theme spanning the full width since the theme browser needs the room. Every section is visible at once and the page is about half as tall.

Inline style attributes went from 294 to 37. The 37 left are display:none toggles that JS drives through style.display, so they can't become a .hidden class without breaking those handlers.

No behaviour changes. Every id and class name JS touches is intact.

Bee theme

Bee set --fg and --sidebar-bg to the same #1b1b1b, contrast ratio 1.00, so every sidebar label was invisible. Root cause is that the sidebar was reusing --fg, which is chosen to suit the page background, and a few themes deliberately put a dark sidebar over a light page. Sidebar text comes from --sidebar-fg now with --fg as the fallback.

Ran all 36 themes through a contrast pass over background, card, button, input, sidebar and accent fills while I was in there:

  • crystalmeth, gld-midnight, neon-rider, real-madrid had --fg between 1.70 and 2.35 against their own background, light text on light backgrounds
  • forest, bee, real-madrid, seaweed, flow, snow, crystalmeth had white labels on bright accent fills
  • rdr2, dawn, seaweed had weak button text

Left white on accent alone for dark, nord, dracula and the rest. It sits around 2.0 to 2.8 which is under WCAG, but it's the standard blue button look and changing it would repaint every primary button in the default theme. Happy to do it if you want.

Build scripts

Unrelated, found it while building to test the above. build_simple_gui.bat fails on every run after the first because PyInstaller isn't passed --noconfirm and the script only cleans build\build_sff_gui, never dist\.

It also always printed : was unexpected at this time. at the end, even on successful builds. That's this line inside the if errorlevel 1 (...) block:

echo Install requirements first (two steps):

cmd reads the ) as ending the echo, then treats the : as a label, and labels inside blocks are a parse error. cmd validates the whole block up front, hence it firing on success too. build_simple.bat has the same line.

Testing

Built with build_simple_gui.bat and ran the packaged exe. Checked every page in the real QtWebEngine window plus headless Chromium at 1440px and at the responsive breakpoints. Verified Bee, dark and the rest of the palettes render correctly.

Merged main.css, cards.css, animations.css and premium.css into a single
app.css. premium.css was overriding 75 classes from the other three and
defined .action-card and .action-grid twice inside itself with conflicting
values, so a fair bit of the layout only worked because of load order.

Swapped every hardcoded rgba(74, 158, 255, ...) for color-mix against
var(--accent). Hovers, glows and focus rings were painting the dark
theme's blue onto all 36 themes. Also added the derived tokens the CSS
already referenced but never defined (--text, --text-dim, --surface2,
--bg-secondary) and cut down to one radius, shadow and motion scale
instead of five.

Home was seven stacked walls of action cards, so those are collapsible
details groups now, with the two single button groups folded into
Fixes & Patches. The FAQ banner is a details list too, which meant the
custom toggle handler could go. Moved the EAC guide modal out of the
middle of #page-home down to where the rest of the modals live.

Settings had a nav rail inside the app's nav rail. It is two flowing
columns now with no nav chrome at all, Theme spanning the full width
since the theme browser needs the room.

Inline styles went from 294 down to 37. The ones left are display:none
toggles that JS flips through style.display, so they cannot move to a
.hidden class without breaking.
Bee set --fg and --sidebar-bg to the same #1b1b1b, so every sidebar label
was invisible against the panel behind it. The sidebar was reusing --fg,
which is picked to suit the page background, and several themes put a
dark sidebar over a light page.

Sidebar text now comes from --sidebar-fg, falling back to --fg, and is
set on the five themes whose sidebar contrasts with their page.

While in there I ran all 36 themes through a contrast pass over
background, card, button, input, sidebar and accent fills:

* crystalmeth, gld-midnight, neon-rider and real-madrid had --fg sitting
  between 1.70 and 2.35 against their own background, light text on light
  backgrounds. New --fg, plus --btn-fg and --input-fg where the buttons
  needed the opposite.
* forest, bee, real-madrid, seaweed, flow, snow and crystalmeth had white
  labels on bright accent fills, those get --on-accent.
* rdr2, dawn and seaweed had weak button text, fixed with --btn-fg.

Left white on accent alone for dark, nord, dracula and the rest. It lands
around 2.0 to 2.8 which is under WCAG, but it is the usual blue button
look and changing it would repaint every primary button in the default
theme.

Accent tints mix with --border and --surface-2 now instead of
transparent. On Bee the accent is nearly the same yellow as the page, so
accent bordered cards had no visible edge at all.
PyInstaller was not getting --noconfirm and the script only cleans
build\build_sff_gui, never dist\, so every build after the first one died
with "output directory is not empty".

Separately, this line lives inside the if errorlevel 1 (...) block:

    echo Install requirements first (two steps):

cmd reads the closing paren as ending the echo and then treats the colon
as a label, and labels inside blocks are a parse error. cmd validates the
whole block up front so it fired on successful builds too, which is where
the ": was unexpected at this time." at the end came from. Escaped the
parens. build_simple.bat had the same line.

Moved the size report out of its own paren block for the same reason, the
parens in the Python expression were closing the if early.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant