Conversation
The Cache Timer was the only timer widget without the shared (s) short time toggle, and the only one rendering its countdown as mm:ss instead of labeled units. It now renders '4m 52s' by default and '4m52s' in short time mode, matching Block Timer, Block Reset Timer and Weekly Reset Timer, and it gains hour parts for TTLs longer than an hour.
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.
Problem
Cache Timeris the only timer widget without the shared(s)hort timetoggle, and the only one that renders its countdown as clock notation (4:52) instead of labeled units.Block Timer,Block Reset TimerandWeekly Reset Timerall render4hr 30mby default and4h30mwiths.A second gap: a TTL longer than an hour (settable directly in
settings.json) rendered as119:55, which reads as hours to most people.Change
Cache Timernow renders the countdown as4m 52s, and4m52swith the new(s)hort timekeybind.Same key, same
toggle-compactaction, samecompactmetadata flag as the reset timers, so the editor annotation reads(compact)there too.4m 0s, so the widget does not change width every minute.This is why the countdown keeps its own formatter instead of calling
formatUsageDuration, which drops zero parts.1hr 59m 55s, or1h59m55sin short time mode.This is the one behavior change for existing users: the default is 2 characters wider, and short time mode is 1 character wider than the old
4:52.Happy to keep
4:52as the default and makesswitch to labels instead, if you prefer no default change.Notes
docs/USAGE.mdalso now states that Backspace in the glyph editor renders a state without a glyph.That already worked on
Cache Timer, but the docs only mentioned it for the git and jj glyph widgets, so people trying to save width on the bar do not find it.bun test(2362 pass) andbun run lintare green.