Repository navigation
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.
🔗 Linked issue
Resolves #2914
🧭 Context
In the compare view, some values get a colored background (green/blue/yellow/red) based on rules like "published more than 2 years ago" or "more than 10 direct dependencies". The color signals that a value is noteworthy but doesn't say why, which is ambiguous — e.g. a yellow publish date gives no hint about the threshold behind it.
📚 Description
Facets that assign a non-neutral status now also set a
tooltipexplaining the rule behind the color (e.g. "This version was published over 2 years ago", "More than 10 direct dependencies", "Critical or high severity vulnerabilities found"). The explanation appears on hover/focus via the existingTooltipAppbehavior.Covered: package size & install size thresholds, direct & total dependency thresholds, stale publish date, missing license, module format, types (bundled / @types / none), vulnerability severity, and deprecated. Neutral and muted cells, and the "no dependency" baseline column, get no tooltip — there's no judgment to explain there.
Also:
FacetCard(the mobile layout) now rendersvalue.tooltip, previously onlyFacetRowdid — so the explanations work on mobile too.Strings live under
compare.facets.status.*inen.json({'@'}-escaped where needed), andi18n/schema.jsonwas regenerated. Added astatus tooltipssuite touse-package-comparison.spec.tscovering the warning/good/bad paths and the neutral no-tooltip case.After — hovering the amber "Published" cell for corser (before, the same hover showed nothing):