feat(tabbar): hover-to-reload glyph on tabs (opt-in)#2576
Open
100mountains wants to merge 1 commit into
Open
Conversation
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>
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.
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