-
-
Notifications
You must be signed in to change notification settings - Fork 334
feat: add version history page #2025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
3bf1ff1
1373fdf
ff2c7a8
55c8117
16833e0
cdc2b3e
2a4a4e8
793ee16
71a566c
5343fac
5d305d1
016f47b
0361273
bdffaf3
879a7d4
7589471
fede892
7aa08d5
4a816e7
a233df6
c39d591
9b7412c
35919a0
cba049c
f069028
6f5c1b8
bba4380
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -207,6 +207,8 @@ const { diff: sizeDiff } = useInstallSizeDiff(packageName, resolvedVersion, pkg, | |
| // β Preserve the server-rendered DOM, don't flash to skeleton. | ||
| const nuxtApp = useNuxtApp() | ||
| const route = useRoute() | ||
| // Gates template rendering only β data fetches intentionally still run. | ||
| const isVersionsRoute = computed(() => route.name === 'package-versions') | ||
|
Comment on lines
+210
to
+211
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Versions route still triggers the full package data pipeline. Also applies to: 521-535 |
||
| const hasEmptyPayload = | ||
| import.meta.client && | ||
| nuxtApp.payload.serverRendered && | ||
|
|
@@ -516,7 +518,8 @@ const showSkeleton = shallowRef(false) | |
| </script> | ||
|
|
||
| <template> | ||
| <DevOnly> | ||
| <NuxtPage v-if="isVersionsRoute" /> | ||
| <DevOnly v-else> | ||
| <ButtonBase | ||
| class="fixed bottom-4 inset-is-4 z-50 shadow-lg rounded-full! px-3! py-2!" | ||
| classicon="i-simple-icons:skeleton" | ||
|
|
@@ -528,7 +531,7 @@ const showSkeleton = shallowRef(false) | |
| <span class="text-xs">Skeleton</span> | ||
| </ButtonBase> | ||
| </DevOnly> | ||
| <main class="flex-1 pb-8"> | ||
| <main v-if="!isVersionsRoute" class="flex-1 pb-8"> | ||
| <!-- Scenario 1: SPA fallback β show skeleton (no real content to preserve) --> | ||
| <!-- Scenario 2: SSR with missing payload β preserve server DOM, skip skeleton --> | ||
| <PackageSkeleton | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© Analysis chain
π Script executed:
Repository: npmx-dev/npmx.dev
Length of output: 270
π Script executed:
Repository: npmx-dev/npmx.dev
Length of output: 5803
π Script executed:
Repository: npmx-dev/npmx.dev
Length of output: 1543
π Script executed:
Repository: npmx-dev/npmx.dev
Length of output: 405
π Script executed:
Repository: npmx-dev/npmx.dev
Length of output: 303
data-testidandtitleattributes are not forwarded byLinkBase.LinkBasedoes not declaredata-testidortitleas props. The component uses a v-if/v-else fragment where the non-disabled branch renders<NuxtLink v-bind="props">. Sincev-bind="props"only forwards declared props, these HTML attributes are silently dropped and will not appear on the rendered DOM element, making the test selector ineffective and the title attribute unavailable to assistive technologies.To fix this, add both
data-testidandtitletoLinkBase'sdefineProps, and forward them explicitly to the<NuxtLink>(the<span>branch can also receive them if needed for consistency).