Skip to content

Commit 3fa2016

Browse files
authored
Merge branch 'main' into button-butter
2 parents 135a218 + e782462 commit 3fa2016

88 files changed

Lines changed: 2210 additions & 1318 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,8 +789,10 @@ Format: `type(scope): description`
789789
- `fix(i18n): update French translations`
790790
- `chore(deps): update vite to v6`
791791

792+
Where front end changes are made, please include before and after screenshots in your pull request description.
793+
792794
> [!NOTE]
793-
> 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.
795+
> Use lowercase letters in your pull request title. Individual commit messages within your PR don't need to follow this format since they'll be squashed.
794796
795797
### PR descriptions
796798

app/components/AppFooter.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ const showModal = () => modalRef.value?.showModal?.()
2323
<LinkBase :to="{ name: 'privacy' }">
2424
{{ $t('privacy_policy.title') }}
2525
</LinkBase>
26+
<LinkBase :to="{ name: 'accessibility' }">
27+
{{ $t('a11y.footer_title') }}
28+
</LinkBase>
2629
<button
2730
type="button"
2831
class="group cursor-pointer gap-x-1 items-center rounded-sm font-mono text-fg hover:decoration-accent active:scale-[0.98] underline underline-offset-[0.2rem] decoration-1 decoration-fg/30 outline-2 outline-transparent focus-visible:(outline-offset-2 outline-accent text-accent) transition-colors duration-200"

app/components/AppHeader.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ const mobileLinks = computed<NavigationConfigWithGroups>(() => [
6464
external: false,
6565
iconClass: 'i-carbon:security',
6666
},
67+
{
68+
name: 'Accessibility',
69+
label: $t('a11y.title'),
70+
to: { name: 'accessibility' },
71+
type: 'link',
72+
external: false,
73+
iconClass: 'i-carbon:accessibility-alt',
74+
},
6775
],
6876
},
6977
{

app/components/AppLogo.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ defineProps<{
2424
font-size="420"
2525
font-weight="500"
2626
text-anchor="middle"
27+
style="user-select: none"
2728
>
2829
<tspan>/</tspan>
2930
</text>

app/components/Code/Viewer.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,11 @@ watch(
6262
function handleImportLinkNavigate() {
6363
if (!codeRef.value) return
6464
65-
const anchors = codeRef.value.querySelectorAll('a.import-link')
65+
const anchors = codeRef.value.querySelectorAll<HTMLAnchorElement>('a.import-link')
6666
anchors.forEach(anchor => {
6767
// NOTE: We do not need to remove previous listeners because we re-create the entire HTML content on each html update
6868
anchor.addEventListener('click', event => {
69+
if (event.metaKey || event.altKey || event.ctrlKey || event.shiftKey) return
6970
const href = anchor.getAttribute('href')
7071
if (href) {
7172
event.preventDefault()
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import DownloadAnalytics from '../Package/DownloadAnalytics.vue'
2+
import TrendsChart from '../Package/TrendsChart.vue'
33
44
const { packages } = defineProps<{
55
packages: string[]
@@ -8,6 +8,6 @@ const { packages } = defineProps<{
88

99
<template>
1010
<div class="font-mono">
11-
<DownloadAnalytics :package-names="packages" :in-modal="false" />
11+
<TrendsChart :package-names="packages" :in-modal="false" show-facet-selector />
1212
</div>
1313
</template>

app/components/Compare/PackageSelector.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ function handleKeydown(e: KeyboardEvent) {
8989
} else if (hasMatchInPackages) {
9090
addPackage(inputValueTrim)
9191
}
92+
} else if (e.key === 'Escape') {
93+
inputValue.value = ''
9294
}
9395
}
9496

app/components/Compare/ReplacementSuggestion.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const docUrl = computed(() => {
2525
class="flex items-start gap-2 px-3 py-2 rounded-lg text-sm"
2626
:class="
2727
variant === 'nodep'
28-
? 'bg-amber-500/10 border border-amber-600/30 text-amber-700 dark:text-amber-400'
28+
? 'bg-amber-500/10 border border-amber-600/30 text-amber-800 dark:text-amber-400'
2929
: 'bg-blue-500/10 border border-blue-600/30 text-blue-700 dark:text-blue-400'
3030
"
3131
>

app/components/DependencyPathPopup.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function parsePackageString(pkg: string): { name: string; version: string } {
6868
<!-- Path badge button -->
6969
<button
7070
type="button"
71-
class="path-badge font-mono text-3xs px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400 transition-all duration-200 ease-out whitespace-nowrap flex items-center gap-1 hover:bg-amber-500/20 hover:border-amber-500/50"
71+
class="path-badge font-mono text-3xs px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/30 text-amber-800 dark:text-amber-400 transition-all duration-200 ease-out whitespace-nowrap flex items-center gap-1 hover:bg-amber-500/20 hover:border-amber-500/50"
7272
:aria-expanded="isOpen"
7373
@click.stop="togglePopup"
7474
>

app/components/Package/ChartModal.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
<script setup lang="ts"></script>
1+
<script setup lang="ts">
2+
defineProps<{
3+
modalTitle?: string
4+
}>()
5+
</script>
26

37
<template>
48
<Modal
5-
:modalTitle="$t('package.downloads.modal_title')"
9+
:modalTitle="modalTitle ?? $t('package.trends.title')"
610
id="chart-modal"
711
class="h-full sm:h-min sm:border sm:border-border sm:rounded-lg shadow-xl sm:max-h-[90vh] sm:max-w-3xl"
812
>

0 commit comments

Comments
 (0)