Skip to content

Fix: keep folder badges inside their own page - #64

Merged
SandObserver merged 2 commits into
mainfrom
fix/folder-badge-clip-and-focus
Aug 14, 2026
Merged

SandObserver merged 2 commits into
mainfrom
fix/folder-badge-clip-and-focus

Conversation

@SandObserver

@SandObserver SandObserver commented Aug 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Inset each .dyn-page-grid by the badge overhang (7px scaled by --sc, clamped to the box padding) and give the page its own overflow:hidden, so a badge is clipped by the page it belongs to instead of by the shared viewport.
  • Size the clip, the strip width, and the translateX step in the padded page width so pages no longer sit flush against each other.
  • Take the inset out of the folder box padding and the dots row padding, leaving icon spacing, box size, and dot position unchanged.
  • Give both folder overlays tabindex="-1" and pass each as initialFocus, so opening a folder no longer moves focus onto the first app link.
  • Reset the plain :focus outline on both overlays and their app links, leaving the existing :focus-visible accent ring as the only focus style.

Testing
All green, except the Docker build smoke test, which has no local Docker and is left to CI. Added 10 tests in ui/test/folder-overlay.test.mjs covering the page inset, the padded page step, the per-page clip, and the focus target of both overlays.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.
  • CHANGELOG.md updated under Unreleased if the change is user-visible.

Each folder page was exactly the width of its icon grid and sat flush
against the next one in a single strip, so a badge overhanging the
right-hand column rendered in the next page's space. Inset every page by
the badge overhang, clip each page, and take the inset out of the box
padding so the icons keep their positions.

Focus the mobile folder overlay itself instead of letting the trap fall
back to the first app link, and reset the plain focus outline on that
link so WebKit cannot paint its own ring.
@SandObserver SandObserver added bug Something isn't working ui/ux UI, UX, and accessibility only fix labels Aug 14, 2026
Safari draws its own focus ring for a script-driven focus on an anchor,
and only :focus-visible is styled. The desktop overlay had the same trap
and the same missing plain-focus rule as the mobile one.
@SandObserver
SandObserver merged commit ad0587c into main Aug 14, 2026
4 checks passed
@SandObserver
SandObserver deleted the fix/folder-badge-clip-and-focus branch August 14, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ui/ux UI, UX, and accessibility only fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant