Skip to content

feat(tabbar): hover-to-reload glyph on tabs (opt-in)#2576

Open
100mountains wants to merge 1 commit into
Floorp-Projects:mainfrom
100mountains:feat/tab-hover-reload
Open

feat(tabbar): hover-to-reload glyph on tabs (opt-in)#2576
100mountains wants to merge 1 commit into
Floorp-Projects:mainfrom
100mountains:feat/tab-hover-reload

Conversation

@100mountains

Copy link
Copy Markdown
Contributor

Part of the final derp-fork contribution batch (#2569). Off by default behind floorp.tabs.hoverReload.enabled — hover-reload is a taste thing, not for everyone; it flips live without a restart.

Rest the pointer on an unpinned tab for 700 ms and a small reload glyph fades in at its right edge; clicking it reloads that tab without selecting it (mousedown is swallowed — tabs select on mousedown). The glyph has no painted background: a backdrop blur alone blanks any lettering beneath it, so it matches hovered/selected/plain surfaces by construction.

Why a JS timer instead of CSS transition-delay: pointer-events cannot be delayed in CSS, so a pure-CSS version leaves an invisible but clickable button at the tab's right edge during the wait — stray right-edge clicks became surprise reloads.

Self-contained feature dir (auto-discovered), styles ship with the feature; the selectors use doubled-id specificity (#tabbrowser-tabs#tabbrowser-tabs) to outrank Lepton's id-level tab rules without escalating everything to !important. Daily-driven in derp on macOS/FF152; extraction renamed fork tokens and trimmed fork-only hover surfaces.

🤖 Generated with Claude Code

Rest the pointer on an unpinned tab for 700 ms and a small reload glyph
fades in at its right edge; clicking it reloads that tab without
selecting it. Off by default behind floorp.tabs.hoverReload.enabled;
flips live (the pref is mirrored onto a root attribute the CSS keys
off, and glyphs stay injected but invisible while disabled).

The delay is a JS timer stamping [floorp-show-refresh] rather than a
CSS transition-delay: pointer-events cannot be delayed in CSS, so a
pure-CSS version would leave an invisible but clickable button at the
tab's right edge during the wait, turning stray clicks into surprise
reloads. Reload clicks swallow mousedown so they never switch tabs.

Self-contained feature dir (auto-discovered); styles ship with the
feature and use doubled-id specificity to outrank Lepton's id-level tab
rules without a blanket !important.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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