Repository navigation
fix(web): keep the breadcrumb readable on narrow screens - #21
Merged
Merged
Conversation
The wrap rules only applied to pages that opted into `.topbar-wrap`, so /benchmarks at 480px
kept a single 48px row: three buttons took the width and the breadcrumb was squeezed to 40px
("Benchma").
The bar now wraps for every page below 700px. The crumbs take a full row of their own with
the buttons underneath, and the wrap class is gone from the two pages that still passed it.
At 480px the breadcrumb is a full 392px wide; at 768px and above the bar stays on one row.
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.
What and why
The narrow-screen wrap rules only applied to pages that opted into
.topbar-wrap, so/benchmarksat 480px kept a single 48px row: three buttons took the width and the breadcrumb was squeezed to 40px — "Benchma".The bar now wraps for every page below 700px. The crumbs take a full row of their own with the buttons underneath, and the wrap class is gone from the two pages that still passed it.
Validation
Checked in Chrome against a real daemon, measuring the bar, the crumbs container and the crumb text:
Also checked
/bench/job-7f3a21,/bench/job-7f3a21/trials/job-7f3a21.7and/runs/a1f4c2at 480 and 768: no overflow anywhere.packages/web/test/topbar.test.tsxasserts the stylesheet keeps the wrap rule for.topbar(and no longer needs.topbar-wrap) and thatTopBarrenders the expected markup.pnpm verifypasses on CI (ubuntu-24.04 / Node 24.18): https://github.com/zjunlp/Orbit/actions/runs/45004267478/job/137152251021/procand no Docker, so the daemon suite is CI-only).