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
5 changes: 3 additions & 2 deletions apps/docs/src/components/docs/DocsMaturity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { createDataTable, createGroup, createSingle } from '@vuetify/v0'

import maturityData from '#v0/maturity.json'
import { releaseAlias } from '@/constants/releases'

// Utilities
import { toRef, watch } from 'vue'
Expand Down Expand Up @@ -345,7 +346,7 @@
>{{ item.type }}</span>

<span v-if="item.since" class="text-[10px] text-on-surface-variant font-mono">
v{{ item.since }}
{{ releaseAlias(item.since) }}
</span>
</div>
</div>
Expand Down Expand Up @@ -526,7 +527,7 @@
class="text-primary no-underline hover:underline whitespace-nowrap"
:href="`/releases/?version=v${item.since}`"
target="_blank"
>v{{ item.since }} ↗</a>
>{{ releaseAlias(item.since) }} ↗</a>

<span v-else class="text-on-surface-variant/50">—</span>
</td>
Expand Down
21 changes: 21 additions & 0 deletions apps/docs/src/constants/releases.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Maps a canonical release version (the maturity `since` value, no `v` prefix)
* to a short display alias. The full version still drives the release deep-link,
* so only the rendered label changes — not the underlying data.
*/
export const RELEASE_ALIASES: Record<string, string> = {
'1.0.0-alpha.0': 'alpha.0',
'1.0.0-alpha.1': 'alpha.1',
'1.0.0-alpha.2': 'alpha.2',
'1.0.0-alpha.3': 'alpha.3',
'1.0.0-alpha.4': 'alpha.4',
'1.0.0-alpha.5': 'alpha.5',
'1.0.0-beta.0': 'beta.0',
}

/** Display label for a release version: its alias, or `v{version}` when unmapped. */
export function releaseAlias (version: string | undefined): string {
if (!version) return ''

return RELEASE_ALIASES[version] ?? `v${version}`
}
6 changes: 3 additions & 3 deletions packages/0/src/maturity.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
},
"createDataGrid": {
"level": "preview",
"since": null,
"since": "1.0.0-beta.0",
"category": "data"
},
"createDataTable": {
Expand Down Expand Up @@ -208,7 +208,7 @@
},
"useTooltip": {
"level": "preview",
"since": null,
"since": "1.0.0-beta.0",
"category": "plugins"
},
"useClickOutside": {
Expand Down Expand Up @@ -521,7 +521,7 @@
},
"Tooltip": {
"level": "preview",
"since": null,
"since": "1.0.0-beta.0",
"category": "disclosure"
},
"Alert": {
Expand Down
Loading