Skip to content

Commit 34f99f2

Browse files
committed
Merge remote-tracking branch 'origin/main' into cta-section-card-headings
# Conflicts: # app/components/CallToAction.vue
2 parents e32753e + 4e7814a commit 34f99f2

15 files changed

Lines changed: 1098 additions & 99 deletions

File tree

.github/workflows/autofix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
- name: 📦 Install dependencies
3232
run: pnpm install
3333

34-
- name: 📦 Install browsers
35-
run: pnpm playwright install
34+
- name: 🌐 Install browser
35+
run: pnpm playwright install chromium-headless-shell
3636

3737
- name: 🌐 Compare translations
3838
run: pnpm i18n:check

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
run: pnpm install
5757

5858
- name: 🌐 Install browser
59-
run: pnpm playwright install
59+
run: pnpm playwright install chromium-headless-shell
6060

6161
- name: 💪 Type check
6262
run: pnpm test:types
@@ -92,6 +92,9 @@ jobs:
9292

9393
a11y:
9494
runs-on: ubuntu-latest
95+
strategy:
96+
matrix:
97+
mode: [dark, light]
9598

9699
steps:
97100
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -111,10 +114,11 @@ jobs:
111114
- name: 🏗️ Build project
112115
run: pnpm build
113116

114-
- name: ♿ Accessibility audit (Lighthouse - dark & light mode)
117+
- name: ♿ Accessibility audit (Lighthouse - ${{ matrix.mode }} mode)
115118
run: ./scripts/lighthouse-a11y.sh
116119
env:
117120
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
121+
LIGHTHOUSE_COLOR_MODE: ${{ matrix.mode }}
118122

119123
knip:
120124
runs-on: ubuntu-latest

CONTRIBUTING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,31 @@ Format: `type(scope): description`
522522
> [!NOTE]
523523
> The subject must start with a lowercase letter. Individual commit messages within your PR don't need to follow this format since they'll be squashed.
524524
525+
### PR descriptions
526+
527+
If your pull request directly addresses an open issue, use the following inside your PR description.
528+
529+
```text
530+
Resolves | Fixes | Closes: #xxx
531+
```
532+
533+
Replace `#xxx` with either a URL to the issue, or the number of the issue. For example:
534+
535+
```text
536+
Fixes #123
537+
```
538+
539+
or
540+
541+
```text
542+
Closes https://github.com/npmx-dev/npmx.dev/issues/123
543+
```
544+
545+
This provides the following benefits:
546+
547+
- it links the pull request to the issue (the merge icon will appear in the issue), so everybody can see there is an open PR
548+
- when the pull request is merged, the linked issue is automatically closed
549+
525550
## Pre-commit hooks
526551

527552
The project uses `lint-staged` with `simple-git-hooks` to automatically lint files on commit.

app/components/CallToAction.vue

Lines changed: 34 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,30 @@
11
<script setup lang="ts">
2-
const socialLinks = {
3-
github: 'https://repo.npmx.dev',
4-
discord: 'https://chat.npmx.dev',
5-
bluesky: 'https://social.npmx.dev',
6-
}
2+
const socialLinks = computed(() => [
3+
{
4+
id: 'github',
5+
href: 'https://repo.npmx.dev',
6+
icon: 'i-carbon:logo-github',
7+
titleKey: $t('about.get_involved.contribute.title'),
8+
descriptionKey: $t('about.get_involved.contribute.description'),
9+
ctaKey: $t('about.get_involved.contribute.cta'),
10+
},
11+
{
12+
id: 'discord',
13+
href: 'https://chat.npmx.dev',
14+
icon: 'i-carbon:chat',
15+
titleKey: $t('about.get_involved.community.title'),
16+
descriptionKey: $t('about.get_involved.community.description'),
17+
ctaKey: $t('about.get_involved.community.cta'),
18+
},
19+
{
20+
id: 'bluesky',
21+
href: 'https://social.npmx.dev',
22+
icon: 'i-simple-icons:bluesky',
23+
titleKey: $t('about.get_involved.follow.title'),
24+
descriptionKey: $t('about.get_involved.follow.description'),
25+
ctaKey: $t('about.get_involved.follow.cta'),
26+
},
27+
])
728
</script>
829

930
<template>
@@ -14,72 +35,26 @@ const socialLinks = {
1435

1536
<div class="grid gap-4 sm:grid-cols-3 sm:items-stretch sm:grid-rows-[auto,1fr,auto]">
1637
<div
38+
v-for="link in socialLinks"
39+
:key="link.id"
1740
class="group relative grid gap-3 p-4 rounded-lg bg-bg-subtle hover:bg-bg-elevated border border-border hover:border-border-hover transition-all duration-200 sm:grid-rows-subgrid sm:row-span-3 focus-within:ring-2 focus-within:ring-accent/50"
1841
>
1942
<h3 class="z-1 flex gap-2">
20-
<span class="i-carbon:logo-github shrink-0 mt-1 w-5 h-5 text-fg" aria-hidden="true" />
43+
<span :class="link.icon" class="shrink-0 mt-1 w-5 h-5 text-fg" aria-hidden="true" />
2144
<span class="font-medium text-fg">
22-
{{ $t('about.get_involved.contribute.title') }}
45+
{{ link.titleKey }}
2346
</span>
2447
</h3>
25-
<p class="z-1 inline text-sm text-fg-muted leading-relaxed">
26-
{{ $t('about.get_involved.contribute.description') }}
48+
<p class="z-1 text-sm text-fg-muted leading-relaxed">
49+
{{ link.descriptionKey }}
2750
</p>
2851
<a
29-
:href="socialLinks.github"
52+
:href="link.href"
3053
target="_blank"
3154
rel="noopener noreferrer"
3255
class="text-sm text-fg-muted group-hover:text-fg inline-flex items-center gap-1 mt-auto focus-visible:outline-none"
3356
>
34-
{{ $t('about.get_involved.contribute.cta') }}
35-
<span class="i-carbon:arrow-right rtl-flip w-3 h-3" aria-hidden="true" />
36-
<span class="absolute z-0 inset-0" aria-hidden="true" />
37-
</a>
38-
</div>
39-
40-
<div
41-
class="group relative grid gap-3 p-4 rounded-lg bg-bg-subtle hover:bg-bg-elevated border border-border hover:border-border-hover transition-all duration-200 sm:grid-rows-subgrid sm:row-span-3 focus-within:ring-2 focus-within:ring-accent/50"
42-
>
43-
<h3 class="z-1 flex gap-2">
44-
<span class="i-carbon:chat shrink-0 mt-1 w-5 h-5 text-fg" aria-hidden="true" />
45-
<span class="font-medium text-fg">
46-
{{ $t('about.get_involved.community.title') }}
47-
</span>
48-
</h3>
49-
<p class="z-1 inline text-sm text-fg-muted leading-relaxed">
50-
{{ $t('about.get_involved.community.description') }}
51-
</p>
52-
<a
53-
:href="socialLinks.discord"
54-
target="_blank"
55-
rel="noopener noreferrer"
56-
class="text-sm text-fg-muted group-hover:text-fg inline-flex items-center gap-1 mt-auto focus-visible:outline-none"
57-
>
58-
{{ $t('about.get_involved.community.cta') }}
59-
<span class="i-carbon:arrow-right rtl-flip w-3 h-3" aria-hidden="true" />
60-
<span class="absolute z-0 inset-0" aria-hidden="true" />
61-
</a>
62-
</div>
63-
64-
<div
65-
class="group relative grid gap-3 p-4 rounded-lg bg-bg-subtle hover:bg-bg-elevated border border-border hover:border-border-hover transition-all duration-200 sm:grid-rows-subgrid sm:row-span-3 focus-within:ring-2 focus-within:ring-accent/50"
66-
>
67-
<h3 class="z-1 flex gap-2">
68-
<span class="i-simple-icons:bluesky shrink-0 mt-1 w-5 h-5 text-fg" aria-hidden="true" />
69-
<span class="font-medium text-fg">
70-
{{ $t('about.get_involved.follow.title') }}
71-
</span>
72-
</h3>
73-
<p class="z-1 inline text-sm text-fg-muted leading-relaxed">
74-
{{ $t('about.get_involved.follow.description') }}
75-
</p>
76-
<a
77-
:href="socialLinks.bluesky"
78-
target="_blank"
79-
rel="noopener noreferrer"
80-
class="text-sm text-fg-muted group-hover:text-fg inline-flex items-center gap-1 mt-auto focus-visible:outline-none"
81-
>
82-
{{ $t('about.get_involved.follow.cta') }}
57+
{{ link.ctaKey }}
8358
<span class="i-carbon:arrow-right rtl-flip w-3 h-3" aria-hidden="true" />
8459
<span class="absolute z-0 inset-0" aria-hidden="true" />
8560
</a>

app/components/Filter/Chips.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const emit = defineEmits<{
2121
}}</span>
2222
<button
2323
type="button"
24-
class="ms-0.5 hover:text-fg rounded-full p-0.5 transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-offset-1"
24+
class="flex items-center ms-0.5 hover:text-fg rounded-full p-0.5 transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-offset-1"
2525
:aria-label="$t('filters.remove_filter', { label: chip.label })"
2626
@click="emit('remove', chip)"
2727
>

app/components/Package/ListToolbar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function getSortKeyLabelKey(key: SortKey): string {
173173
</option>
174174
</select>
175175
<div
176-
class="absolute inset-ie-2 top-1/2 -translate-y-1/2 text-fg-subtle pointer-events-none"
176+
class="flex items-center absolute inset-ie-2 top-1/2 -translate-y-1/2 text-fg-subtle pointer-events-none"
177177
aria-hidden="true"
178178
>
179179
<span class="i-carbon-chevron-down w-4 h-4" />

app/components/Package/Table.vue

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function getColumnLabelKey(id: ColumnId): string {
115115
<!-- Name (always visible) -->
116116
<th
117117
scope="col"
118-
class="py-3 px-3 text-xs font-mono font-medium text-fg-muted uppercase tracking-wider focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-inset focus-visible:outline-none"
118+
class="py-3 px-3 text-xs text-start text-fg-muted font-mono font-medium uppercase tracking-wider whitespace-nowrap select-none focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-inset focus-visible:outline-none"
119119
:class="{
120120
'cursor-pointer hover:text-fg transition-colors duration-200': isSortable('name'),
121121
}"
@@ -149,23 +149,23 @@ function getColumnLabelKey(id: ColumnId): string {
149149
<th
150150
v-if="isColumnVisible('version')"
151151
scope="col"
152-
class="py-3 px-3 text-xs font-mono font-medium text-fg-muted uppercase tracking-wider"
152+
class="py-3 px-3 text-xs text-start text-fg-muted font-mono font-medium uppercase tracking-wider whitespace-nowrap select-none"
153153
>
154154
{{ $t(getColumnLabelKey('version')) }}
155155
</th>
156156

157157
<th
158158
v-if="isColumnVisible('description')"
159159
scope="col"
160-
class="py-3 px-3 text-xs font-mono font-medium text-fg-muted uppercase tracking-wider"
160+
class="py-3 px-3 text-xs text-start text-fg-muted font-mono font-medium uppercase tracking-wider whitespace-nowrap select-none"
161161
>
162162
{{ $t(getColumnLabelKey('description')) }}
163163
</th>
164164

165165
<th
166166
v-if="isColumnVisible('downloads')"
167167
scope="col"
168-
class="py-3 px-3 text-xs font-mono font-medium text-fg-muted uppercase tracking-wider text-end focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-inset focus-visible:outline-none"
168+
class="py-3 px-3 text-xs text-start text-fg-muted font-mono font-medium uppercase tracking-wider whitespace-nowrap select-none text-end focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-inset focus-visible:outline-none"
169169
:class="{
170170
'cursor-pointer hover:text-fg transition-colors duration-200':
171171
isSortable('downloads'),
@@ -200,7 +200,7 @@ function getColumnLabelKey(id: ColumnId): string {
200200
<th
201201
v-if="isColumnVisible('updated')"
202202
scope="col"
203-
class="py-3 px-3 text-xs font-mono font-medium text-fg-muted uppercase tracking-wider focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-inset focus-visible:outline-none"
203+
class="py-3 px-3 text-xs text-start text-fg-muted font-mono font-medium uppercase tracking-wider whitespace-nowrap select-none text-end focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-inset focus-visible:outline-none"
204204
:class="{
205205
'cursor-pointer hover:text-fg transition-colors duration-200': isSortable('updated'),
206206
}"
@@ -234,55 +234,55 @@ function getColumnLabelKey(id: ColumnId): string {
234234
<th
235235
v-if="isColumnVisible('maintainers')"
236236
scope="col"
237-
class="py-3 px-3 text-xs font-mono font-medium text-fg-muted uppercase tracking-wider"
237+
class="py-3 px-3 text-xs text-start text-fg-muted font-mono font-medium uppercase tracking-wider whitespace-nowrap select-none text-end"
238238
>
239239
{{ $t(getColumnLabelKey('maintainers')) }}
240240
</th>
241241

242242
<th
243243
v-if="isColumnVisible('keywords')"
244244
scope="col"
245-
class="py-3 px-3 text-xs font-mono font-medium text-fg-muted uppercase tracking-wider"
245+
class="py-3 px-3 text-xs text-start text-fg-muted font-mono font-medium uppercase tracking-wider whitespace-nowrap select-none text-end"
246246
>
247247
{{ $t(getColumnLabelKey('keywords')) }}
248248
</th>
249249

250250
<th
251251
v-if="isColumnVisible('qualityScore')"
252252
scope="col"
253-
class="py-3 px-3 text-xs font-mono font-medium text-fg-muted uppercase tracking-wider text-end"
253+
class="py-3 px-3 text-xs text-start text-fg-muted font-mono font-medium uppercase tracking-wider whitespace-nowrap select-none text-end"
254254
>
255255
{{ $t(getColumnLabelKey('qualityScore')) }}
256256
</th>
257257

258258
<th
259259
v-if="isColumnVisible('popularityScore')"
260260
scope="col"
261-
class="py-3 px-3 text-xs font-mono font-medium text-fg-muted uppercase tracking-wider text-end"
261+
class="py-3 px-3 text-xs text-start text-fg-muted font-mono font-medium uppercase tracking-wider whitespace-nowrap select-none text-end"
262262
>
263263
{{ $t(getColumnLabelKey('popularityScore')) }}
264264
</th>
265265

266266
<th
267267
v-if="isColumnVisible('maintenanceScore')"
268268
scope="col"
269-
class="py-3 px-3 text-xs font-mono font-medium text-fg-muted uppercase tracking-wider text-end"
269+
class="py-3 px-3 text-xs text-start text-fg-muted font-mono font-medium uppercase tracking-wider whitespace-nowrap select-none text-end"
270270
>
271271
{{ $t(getColumnLabelKey('maintenanceScore')) }}
272272
</th>
273273

274274
<th
275275
v-if="isColumnVisible('combinedScore')"
276276
scope="col"
277-
class="py-3 px-3 text-xs font-mono font-medium text-fg-muted uppercase tracking-wider text-end"
277+
class="py-3 px-3 text-xs text-start text-fg-muted font-mono font-medium uppercase tracking-wider whitespace-nowrap select-none text-end"
278278
>
279279
{{ $t(getColumnLabelKey('combinedScore')) }}
280280
</th>
281281

282282
<th
283283
v-if="isColumnVisible('security')"
284284
scope="col"
285-
class="py-3 px-3 text-xs font-mono font-medium text-fg-muted uppercase tracking-wider"
285+
class="py-3 px-3 text-xs text-start text-fg-muted font-mono font-medium uppercase tracking-wider whitespace-nowrap select-none text-end"
286286
>
287287
{{ $t(getColumnLabelKey('security')) }}
288288
</th>
@@ -301,17 +301,17 @@ function getColumnLabelKey(id: ColumnId): string {
301301
<td v-if="isColumnVisible('description')" class="py-3 px-3">
302302
<div class="h-4 w-48 bg-bg-muted rounded animate-pulse" />
303303
</td>
304-
<td v-if="isColumnVisible('downloads')" class="py-3 px-3 text-end">
304+
<td v-if="isColumnVisible('downloads')" class="py-3 px-3">
305305
<div class="h-4 w-16 bg-bg-muted rounded animate-pulse ms-auto" />
306306
</td>
307307
<td v-if="isColumnVisible('updated')" class="py-3 px-3">
308-
<div class="h-4 w-20 bg-bg-muted rounded animate-pulse" />
308+
<div class="h-4 w-20 bg-bg-muted rounded animate-pulse ms-auto" />
309309
</td>
310310
<td v-if="isColumnVisible('maintainers')" class="py-3 px-3">
311-
<div class="h-4 w-24 bg-bg-muted rounded animate-pulse" />
311+
<div class="h-4 w-24 bg-bg-muted rounded animate-pulse ms-auto" />
312312
</td>
313313
<td v-if="isColumnVisible('keywords')" class="py-3 px-3">
314-
<div class="h-4 w-32 bg-bg-muted rounded animate-pulse" />
314+
<div class="h-4 w-32 bg-bg-muted rounded animate-pulse ms-auto" />
315315
</td>
316316
</tr>
317317
</template>

0 commit comments

Comments
 (0)