Tracker: slide the segmented control background - #59
Merged
DarkMrMelther merged 2 commits intoAug 21, 2026
Conversation
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.
Purely visual. The three button groups on the tracker (category, status filter, progress
calculation) get one sliding background instead of moving the highlight between buttons.
Branched from
master, independent of #57 and #58.What changes
SegmentedControlrenders a single absolutely positioned indicator and animates it to theactive button, rather than each button painting its own background.
It measures the active button's box instead of assuming equal widths, so the pill fits
labels of different lengths, and a
ResizeObserverrecalculates on container resize and onfont load.
TabButtonandMetricButtonhad no callers left afterwards, so they are gone.Roles moved to
tablist/tabwitharia-selected, which is what these groups actuallywere.
One thing worth knowing
The transition has to be declared inline rather than with a utility class.
global.csshasan unlayered rule:
Being outside
@layer, it outranks every Tailwind utility, sotransition-[transform,width]was silently dropped and the computed
transition-propertystayedbackground-color, border-color, color, box-shadow. Inline styles are the only thing thatwins without touching a rule that affects the whole site.
Flagging it because it means no custom transition on any
div,spanorbuttonanywherein the project can work, and it fails without any warning. Changing that rule has site-wide
effects, so it did not belong in this PR.
prefers-reduced-motiondrops the duration to zero.Tested
bun run buildclean. Checked in a browser that each group's indicator lands on its activebutton's exact offset and width: category
translateX(4px) 89px, statustranslateX(4px) 61px, progresstranslateX(2px) 93px.