Repository navigation
Chrome polish: light/dark ownership, real icon menu, full-height sidebar - #2
Merged
Merged
Conversation
…ss shots Every chrome color now comes from a libadwaita token in a new theme module, so the surfaces follow the theme variant instead of fighting it with hardcoded hex. One scheme decision drives both the toolkit switch and the internal pages, and the stylesheet is guarded by a test that rejects raw colors. Chrome geometry: 34px address bar with a 9px radius, tinted field, 8px header padding, 28px tabs with a close circle, accent underline on the active tab. The sidebar is 260px, full height, with 34px rows, 12px insets, hover, a neutral selection plus an accent edge, an attention dot on the favicon, and hover-revealed close buttons. The hamburger menu is a custom popover: 22 icon rows with shortcut hints, a checkmark on the engine rows, and a scroller because GTK silently refuses to show a popover taller than the window. The command palette rows carry icons too. Verification: scripts/ui-shot.sh drives the real binary under Xvfb and captures PNGs; scripts/px.py samples pixels; scripts/check-css.py enforces the token rule. Light and dark captures verified, clippy -D warnings, fmt, workspace tests.
The start page, history page, error page, and reader script now live in pages.rs with a small interface: markup in, markup out, plus the start page file's own path and URL. The shell no longer carries page design, escaping, or favicon placeholders, and main.rs drops from 6246 to 5241 lines. New tests at the seam: every page carries the requested colour scheme, no page fetches a third-party asset, page text is escaped, and the start page is stale exactly when its inputs change. Verified behaviour-preserving by capture: the start page renders to a byte-identical PNG before and after (md5 c8df5f1b), with clippy -D warnings, fmt, and the workspace suite green. docs/UI-VERIFY.md records the headless capture loop and the levers it uses.
The start page's hint card carried a dashed blue border that read as a placeholder. It is now a quiet surface with a hairline, matching the chrome's contrast in both schemes.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second polish round, driven by screenshots instead of guesses.
What was wrong
light-dark()function, so those pins were the only thing "setting" a scheme. There was also nothing stopping the internal pages from disagreeing with the shell.What changed
thememodule, so surfaces follow the variant by construction. A test rejects raw colours.theme::applyreturns what the toolkit actually did, and the internal pages are built from that same answer, so a page can never render light inside a dark shell.pages.rsnow owns every internal page behind a small interface, with its own tests.main.rsdrops from 6246 to 5241 lines.Verification
scripts/ui-shot.shruns the real binary under Xvfb and captures PNGs;scripts/px.pysamples pixels;scripts/check-css.pyenforces the token rule;BR0X_SHOT,BR0X_SHOT_OPEN, andBR0X_SHOT_DUMPare documented indocs/UI-VERIFY.md.#ebebedin Light,#2e2e32in Dark.c8df5f1b).cargo clippy --workspace --all-targets -- -D warnings,cargo fmt --check,cargo test --workspace(147 tests),scripts/check-css.py, andnode --checkon every inline script all pass.