refactor: replace links and buttons for compare and code page#1243
refactor: replace links and buttons for compare and code page#1243serhalp merged 14 commits intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughWalkthroughThis PR standardises interactive elements by replacing native buttons and NuxtLink with ButtonBase and LinkBase across multiple components. It renames keyboard-shortcut props from Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
app/components/Compare/FacetSelector.vue (1)
64-93: Remove inlinefocus-visiblestyling from ButtonBase.The class at line 72 includes
focus-visible:outline-accent/70, which contradicts the project convention. Focus-visible styling for buttons is applied globally viamain.css, so individual buttons should not use inline focus-visible utility classes.♻️ Proposed fix
:aria-label="facet.label" - class="inline-flex items-center gap-1 px-1.5 py-0.5 font-mono text-xs rounded border transition-colors duration-200 focus-visible:outline-accent/70" + class="inline-flex items-center gap-1 px-1.5 py-0.5 font-mono text-xs rounded border transition-colors duration-200"Based on learnings: "In the npmx.dev project, focus-visible styling for buttons and selects is applied globally via main.css... individual buttons or selects in Vue components should not rely on inline focus-visible utility classes."
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Additional work on top of #1071 that replaces links and buttons in the compare and code page with the new components.
For the code page this has the additional benefit of using the same hover styles for links/buttons as. Additionally it properly sets
aria-currentandaria-pressedin the tree view.Adds automatic styling for current links.
Also changes the hover style for links as buttons.
Slightly adjusts the pressed style for buttons.