Repository navigation
Keep History's time axis readable past a year and on a phone - #105
Merged
1 commit merged intoNov 9, 2026
Merged
1 commit merged into
1 commit merged into
Conversation
Past a couple of months the axis stepped by 61 days at most, so a span
of more than a year drew about 18 ticks of month and day, and the same
dates came round again with no year to tell them apart. It now ticks on
the first of a month and, over several years, by year. A January, or a
tick a year or more from the last, reads as its year, and once the ticks
cover a year, other months carry theirs ("Jul ’24").
Labels were also placed without checking they fit, and overlapped at
phone width even on the 7-day default. The axis now measures its label
strip and the labels in the page's own font, and keeps only as many
ticks as clear each other by 8px.
Fixes #101
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.
Summary
Two axis problems from #101:
and over several years by year. Once the ticks cover a year, labels carry it (
Jul ’24, withJanuary shown as
2025), so no label repeats.page's font, and drops ticks until neighbours clear each other by 8px. This also fixes the
7-day default, which overlapped at 390px.
Fixes #101.
Testing
year ticks, and tick dropping at 268px.
Deployment