feat(inspector): persist chart color mode in URL and add age/duplicated modes - #199
Merged
Conversation
…ed modes Persist the chart coloring mode in the query string so it can be shared and bookmarked, and add two new modes: "Published Age" (grays fresh packages and shifts through yellow/orange/red as they get older) and "Duplicated" (gives each multi-version package name its own color, leaving the rest gray).
commit: |
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.
What & why
The graph's color mode (
Spectrum | Module) was only kept in localStorage, so it couldn't be shared or bookmarked. This PR moves it into the query string and adds two new modes.Changes
chart-coloring=...) alongside the existing filter state, so a chart view can be shared or bookmarked. The default (spectrum) is stored as an empty string to keep URLs clean.Published Agemode — fresh packages stay gray, then shift through yellow (>1y), orange (>2y), and red (>3y) as they get older. Packages without publish data render as a neutral gray.Duplicatedmode — every package name that resolves to more than one version gets its own distinct color; everything else stays gray, making version duplication easy to spot at a glance.chartColoringModesetting, since the mode is driven entirely from the URL.Notes
The mode now lives solely in the URL rather than localStorage, so a fresh URL starts from the default
spectrum. Happy to make it fall back to a saved setting if preferred.This PR was created with the help of an agent.