Repository navigation
π dashboard: keep the topbar hamburger on-screen on phones - #15481
Conversation
The drawer toggle carried a desktop-era margin-left:-10px, but it only renders inside the <=1024px drawer tier where .oc-topbar-left clips overflow, so the chip's left 10px were cut off on every phone. Drop the margin. On <=360px screens collapse the bug/settings chips (both still reachable from the account menu, which gains a Settings entry) so the right strip never overflows either. Teach dashboard-mobile-shots.mjs to report chips that poke outside an overflow-clipping strip. Fixes #15476 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Read topbar.css, responsive.css, topbar.html and the shimmy dispatcher at e79c993; looks correct to me.
What I verified
- The root cause holds:
.oc-topbar-leftisoverflow: hidden(static-src/css/topbar.css:17) and#oc-drawer-toggleis its first child (static-src/html/topbar.html:4), so the removedmargin-left: -10pxwas indeed pulling the chip under the clip. Replacing it withflex: 0 0 autoalso stops the chip shrinking next to the title. #feedback-bug-btnand#oc-settings-btn(topbar.html:26,28) are the ids hidden at β€360px; neither is role-gated anywhere instatic-src/js/, so the new avatar-menuSettingsentry does not expose anything the chip didn't already.- The new menu item's
data-action="openConfigDialog" data-arg0="governor"is the same action/arg pair the chip itself uses, and the dispatcher atstatic-src/js/tooltips-dialogs.js:236readsdataset.arg0as the config type β so it opens the same dialog. - Regenerated
static/index.htmlviago run ./gen -src ../static-src -out ../static/index.htmlat the PR head: unchanged, so the committed file is in sync. navbar_chip_consistency_test.goasserts the ids/classes still present intopbar.html; nothing this PR touches is removed from the markup, only hidden by media query.
The clipped-by-strip scanner addition in dashboard-mobile-shots.mjs is reporting-only (exits 0 on findings), so it cannot turn CI red. No findings.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Read this against the tree at e79c993, not just the diff. Looks correct to me.
Root cause is real. src/pkg/dashboard/static-src/css/topbar.css:17 sets overflow: hidden on .oc-topbar-left, and #oc-drawer-toggle (html/topbar.html:4) is a child of it, so the old margin-left: -10px did put the first 10px of the 40px circle outside the clip box. Dropping the margin is the right fix; flex: 0 0 auto just stops the chip shrinking.
Nothing lost at β€360px. The new avatar-menu entry (html/topbar.html:68) carries the identical data-action="openConfigDialog" data-arg0="governor" as the chip it hides (html/topbar.html:28), and the drawer/menu Feedback paths already existed, so hiding #feedback-bug-btn / #oc-settings-btn removes no capability.
Generated file is in sync. go run ./pkg/dashboard/webstatic/gen -src pkg/dashboard/static-src -out pkg/dashboard/static/index.html -check exits 0 on this head.
Scan helper. The new clipped-by-strip branch in src/scripts/dashboard-mobile-shots.mjs:189-199 only uses round/pathFor/add that are already defined in that scope (lines 143/144/169), and breaks after the first clipping ancestor, so it reports once per chip.
Not a defect, just noting: the red Sign-off survives the squash / verify PR contents checks are not caused by this diff β the single commit carries a Signed-off-by trailer, and the verifier job is the pulled-image step in pr-verifier.yml.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #15476
Root cause.
#oc-drawer-togglecarried a desktop-eramargin-left: -10px, but the chip only ever renders inside the β€1024px drawer tier, where its parent.oc-topbar-lefthasoverflow: hidden. The negative margin pulled the 40px circle 10px past the strip's left edge and the overflow clip cut it off β on an iPhone (390px) only the right part of the β‘ circle survived.Fix.
dashboard-mobile-shots.mjsgains aclipped-by-stripfinding: any.oc-topbar .nav-chipwhose box pokes outside anoverflow:hidden|clipancestor. On the pre-fix build at 390Γ844 it reports 26 findings (all#oc-drawer-toggle,chip spans -10..30 but overflow:hidden ancestor β¦ spans 0..70); on this branch, 0..ham-merged*odometer rules untouched (π dashboard: Merged counter is an odometer at rest, bee at full sizeΒ #15470); measured β the odometer is not what pushes the width.Verified headless (Playwright/Chromium, iPhone UA, light + dark) β hamburger left edge / topbar padding, and right strip extents:
ACMM
L6pill and avatar status ring unaffected at every width.Screenshots (390Γ844@3, light, iPhone UA):
Before β β‘ clipped by the left edge:
After:
After at 320Γ568 β π/β collapsed into the account menu: