perf: enforce journey budgets and reference traces
This commit is contained in:
@@ -7,6 +7,17 @@ const props = defineProps<{
|
||||
journey: JourneySnapshot;
|
||||
onSectionLinkClick: (event: MouseEvent) => void;
|
||||
}>();
|
||||
|
||||
const compactLabels: Readonly<Record<SectionId, string>> = {
|
||||
start: 'Start',
|
||||
profile: 'Profile',
|
||||
experience: 'Career',
|
||||
infrastructure: 'Infra',
|
||||
'selected-builds': 'Builds',
|
||||
'additional-work': 'More work',
|
||||
toolkit: 'Toolkit',
|
||||
contact: 'Contact',
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -15,11 +26,13 @@ const props = defineProps<{
|
||||
<li v-for="item in items" :key="item.id">
|
||||
<a
|
||||
:href="`#${item.id}`"
|
||||
:aria-label="item.label"
|
||||
:data-compact-label="compactLabels[item.id]"
|
||||
:aria-current="
|
||||
props.journey.activeSectionId === item.id ? 'page' : undefined
|
||||
"
|
||||
@click="props.onSectionLinkClick"
|
||||
>{{ item.label }}</a
|
||||
><span class="site-navigation__full-label" aria-hidden="true">{{ item.label }}</span></a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user