Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/components/Compare/FacetSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ function isCategoryNoneSelected(category: string): boolean {
:disabled="facet.comingSoon"
:aria-pressed="isFacetSelected(facet.id)"
: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="gap-1 px-1.5 rounded transition-colors focus-visible:outline-accent/70"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove focus-visible:outline-accent/70 — focus styling is applied globally for buttons.

The inline focus-visible:outline-accent/70 utility class contradicts the project's convention. Focus-visible styling for <button> elements is already handled globally via main.css, so this class is unnecessary and may cause inconsistent focus states.

🔧 Suggested fix
-          class="gap-1 px-1.5 rounded transition-colors focus-visible:outline-accent/70"
+          class="gap-1 px-1.5 rounded transition-colors"

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 like focus-visible:outline-accent/70."

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
class="gap-1 px-1.5 rounded transition-colors focus-visible:outline-accent/70"
class="gap-1 px-1.5 rounded transition-colors"

:class="
facet.comingSoon
? 'text-fg-subtle/50 bg-bg-subtle border-border-subtle cursor-not-allowed'
: isFacetSelected(facet.id)
? 'text-fg-muted bg-bg-muted border-border'
? 'text-fg-muted bg-bg-muted'
: 'text-fg-subtle bg-bg-subtle border-border-subtle hover:text-fg-muted hover:border-border'
"
@click="!facet.comingSoon && toggleFacet(facet.id)"
Expand Down
2 changes: 1 addition & 1 deletion app/components/Package/Maintainers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ watch(
name: '~username',
params: { username: maintainer.name },
}"
class="link-subtle font-mono text-sm shrink-0"
class="link-subtle text-sm shrink-0"
dir="ltr"
>
~{{ maintainer.name }}
Expand Down
2 changes: 1 addition & 1 deletion app/components/Package/ManagerSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function handleKeydown(event: KeyboardEvent) {
<button
ref="triggerRef"
type="button"
class="cursor-pointer flex items-center gap-1.5 px-2 py-2 font-mono text-xs text-fg-muted bg-bg-subtle border border-border-subtle border-solid rounded-md transition-colors duration-150 hover:(text-fg border-border-hover) active:scale-95 focus:border-border-hover focus-visible:outline-accent/70 hover:text-fg"
class="cursor-pointer flex items-center gap-1.5 px-2 py-2 font-mono text-xs text-fg-muted bg-bg-subtle border border-border-subtle border-solid rounded-md transition-colors duration-150 hover:(text-fg border-border-hover) active:scale-95 focus:border-border-hover focus-visible:outline-accent/70"
:aria-expanded="isOpen"
aria-haspopup="listbox"
:aria-label="$t('package.get_started.pm_label')"
Expand Down
2 changes: 1 addition & 1 deletion app/components/Package/Versions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ function majorGroupContainsCurrent(group: (typeof otherMajorGroups.value)[0]): b
<template #actions>
<ButtonBase
variant="secondary"
class="text-fg-subtle hover:text-fg transition-colors duration-200 inline-flex items-center justify-center min-w-6 min-h-6 -m-1 p-1 rounded"
class="text-fg-subtle hover:text-fg transition-colors min-w-6 min-h-6 -m-1 p-1 rounded"
:title="$t('package.downloads.community_distribution')"
classicon="i-carbon:load-balancer-network"
@click="openDistributionModal"
Expand Down
Loading