Skip to content

Commit 2f484c8

Browse files
committed
fix(ui): draw stacking and corner radii of seven components from tokens
Eight style gate baseline entries named a plain z-index or a Tailwind default radius where a token with the same value exists. The sticky bars and the open actions menu use the sticky and top bar stacking tokens, and the skeleton bars, the status dot and the checkbox dash use the corner tokens. Nothing changes on screen. Signed-off-by: TheMeinerLP <github@themeinerlp.dev>
1 parent 3eb2118 commit 2f484c8

10 files changed

Lines changed: 18 additions & 58 deletions

File tree

‎reposilite-frontend/src/components/access/PrincipalsPanel.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ describe('PrincipalsPanel', () => {
180180

181181
await rowOf('alice').find('button[aria-haspopup="menu"]').trigger('click')
182182

183-
expect(rowOf('alice').classes(), 'each row is its own stacking context, so the open one needs a z-index').toContain('z-20')
184-
expect(rowOf('bob').classes()).not.toContain('z-20')
183+
expect(rowOf('alice').classes(), 'each row is its own stacking context, so the open one needs a z-index').toContain('z-md-sticky')
184+
expect(rowOf('bob').classes()).not.toContain('z-md-sticky')
185185
})
186186

187187
it('puts the row back when the actions menu closes', async () => {
@@ -190,7 +190,7 @@ describe('PrincipalsPanel', () => {
190190

191191
await rowOf('alice').find('button[aria-haspopup="menu"]').trigger('click')
192192

193-
expect(rowOf('alice').classes()).not.toContain('z-20')
193+
expect(rowOf('alice').classes()).not.toContain('z-md-sticky')
194194
})
195195

196196
it('builds the principal rows from the shared list rows', async () => {

‎reposilite-frontend/src/components/access/PrincipalsPanel.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ const deleted = (principal: PrincipalSummary) => {
219219
class="md-state-layer"
220220
:class="[
221221
row.selected ? 'bg-secondary-container text-on-secondary-container' : '',
222-
row.principal.name === menuRow ? 'z-20' : ''
222+
row.principal.name === menuRow ? 'z-md-sticky' : ''
223223
]"
224224
>
225225
<router-link

‎reposilite-frontend/src/components/browser/FileList.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ const entryUrl = (file: BrowserFile) =>
202202
>
203203
<MdListItem v-if="isSkeleton(entry)">
204204
<template #leading>
205-
<span class="block size-6 rounded-full bg-surface-container-high skeleton-bars" />
205+
<span class="block size-6 rounded-corner-full bg-surface-container-high skeleton-bars" />
206206
</template>
207207
<span
208-
class="block h-3.5 rounded bg-surface-container-high skeleton-bars"
208+
class="block h-3.5 rounded-corner-extra-small bg-surface-container-high skeleton-bars"
209209
:style="{ width: skeletonWidths[index % skeletonWidths.length] }"
210210
/>
211211
</MdListItem>

‎reposilite-frontend/src/components/card/SnippetsCard.vue‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ const selectTab = (tab: string) =>
255255
>
256256
<span
257257
v-if="loading"
258-
class="h-5 w-36 rounded bg-surface-container-high skeleton-bars"
258+
class="h-5 w-36 rounded-corner-extra-small bg-surface-container-high skeleton-bars"
259259
/>
260260
<template v-else>
261261
{{ title }}
@@ -341,19 +341,19 @@ const selectTab = (tab: string) =>
341341
class="skeleton-bars space-y-2.5 pt-1"
342342
>
343343
<div
344-
class="h-3 rounded bg-surface-container-high"
344+
class="h-3 rounded-corner-extra-small bg-surface-container-high"
345345
style="width: 80%"
346346
/>
347347
<div
348-
class="h-3 rounded bg-surface-container-high"
348+
class="h-3 rounded-corner-extra-small bg-surface-container-high"
349349
style="width: 55%"
350350
/>
351351
<div
352-
class="h-3 rounded bg-surface-container-high"
352+
class="h-3 rounded-corner-extra-small bg-surface-container-high"
353353
style="width: 68%"
354354
/>
355355
<div
356-
class="h-3 rounded bg-surface-container-high"
356+
class="h-3 rounded-corner-extra-small bg-surface-container-high"
357357
style="width: 40%"
358358
/>
359359
</div>

‎reposilite-frontend/src/components/dashboard/StatusLabel.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('StatusLabel', () => {
4242
it('draws the dot as an 8 by 8 pixel circle that does not shrink', () => {
4343
const classes = dotOf('good').className.split(' ')
4444

45-
expect(classes, 'the dot is size-2, which is 8px').toEqual(expect.arrayContaining(['size-2', 'shrink-0', 'rounded-full']))
45+
expect(classes, 'the dot is size-2, which is 8px').toEqual(expect.arrayContaining(['size-2', 'shrink-0', 'rounded-corner-full']))
4646
})
4747

4848
it('places the dot before the text and hides it from assistive technology', () => {

‎reposilite-frontend/src/components/dashboard/StatusLabel.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ defineProps({
5151
pixel lower than that middle. The nudge moves the dot onto the x-height centre.
5252
-->
5353
<span
54-
class="relative top-[0.5px] size-2 shrink-0 rounded-full"
54+
class="relative top-[0.5px] size-2 shrink-0 rounded-corner-full"
5555
:class="DOT_CLASSES[status]"
5656
aria-hidden="true"
5757
/>

‎reposilite-frontend/src/components/header/DefaultHeader.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const { title } = usePlaceholders()
3030

3131
<template>
3232
<header
33-
class="sticky top-0 z-30 bg-surface-container text-on-surface xlarge:pr-4"
33+
class="sticky top-0 z-md-top-bar bg-surface-container text-on-surface xlarge:pr-4"
3434
data-ingot-component="default-header"
3535
>
3636
<!-- The top app bar: the title on the left, the account actions on the right. -->

‎reposilite-frontend/src/components/md/MdCheckbox.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ const labelClass = computed(() =>
156156
</svg>
157157
<span
158158
v-else-if="state === 'indeterminate'"
159-
class="block h-[2px] w-2.5 rounded-full bg-current"
159+
class="block h-[2px] w-2.5 rounded-corner-full bg-current"
160160
:class="markClass"
161161
/>
162162
</span>

‎reposilite-frontend/src/pages/IndexPage.vue‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ const activeLabel = computed((): string => pageLabel(section.value as string))
434434
-->
435435
<div
436436
v-if="hasNavigation"
437-
class="pointer-events-none sticky top-16 z-20 hidden h-0 medium:block"
437+
class="pointer-events-none sticky top-16 z-md-sticky hidden h-0 medium:block"
438438
aria-hidden="true"
439439
>
440440
<span class="pane-corner pane-corner-start" />
@@ -679,7 +679,7 @@ const activeLabel = computed((): string => pageLabel(section.value as string))
679679
</MdTransition>
680680
<div
681681
ref="barHost"
682-
class="fixed inset-x-0 bottom-0 z-20 bg-surface-container pb-[env(safe-area-inset-bottom)] medium:hidden"
682+
class="fixed inset-x-0 bottom-0 z-md-sticky bg-surface-container pb-[env(safe-area-inset-bottom)] medium:hidden"
683683
>
684684
<MdNavigationBar
685685
:items="barItems"
@@ -694,7 +694,7 @@ const activeLabel = computed((): string => pageLabel(section.value as string))
694694
</template>
695695
</MdNavigationBar>
696696
</div>
697-
<div class="fixed inset-y-0 left-0 z-20 hidden w-24 medium:block">
697+
<div class="fixed inset-y-0 left-0 z-md-sticky hidden w-24 medium:block">
698698
<MdNavigationRail
699699
class="h-full"
700700
:items="railItems"

‎reposilite-frontend/src/style-gate/baseline/non-md3-default.json‎

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
[
2-
{
3-
"file": "src/components/access/PrincipalsPanel.vue",
4-
"match": "z-20",
5-
"count": 1
6-
},
72
{
83
"file": "src/components/access/check/CheckPermissionView.vue",
94
"match": "z-10",
@@ -39,26 +34,11 @@
3934
"match": "z-10",
4035
"count": 1
4136
},
42-
{
43-
"file": "src/components/browser/FileList.vue",
44-
"match": "rounded",
45-
"count": 1
46-
},
47-
{
48-
"file": "src/components/browser/FileList.vue",
49-
"match": "rounded-full",
50-
"count": 1
51-
},
5237
{
5338
"file": "src/components/browser/FileUpload.vue",
5439
"match": "z-10",
5540
"count": 1
5641
},
57-
{
58-
"file": "src/components/card/SnippetsCard.vue",
59-
"match": "rounded",
60-
"count": 5
61-
},
6242
{
6343
"file": "src/components/dashboard/FailuresSheet.vue",
6444
"match": "leading-5",
@@ -69,16 +49,6 @@
6949
"match": "text-xs",
7050
"count": 1
7151
},
72-
{
73-
"file": "src/components/dashboard/StatusLabel.vue",
74-
"match": "rounded-full",
75-
"count": 1
76-
},
77-
{
78-
"file": "src/components/header/DefaultHeader.vue",
79-
"match": "z-30",
80-
"count": 1
81-
},
8252
{
8353
"file": "src/components/identity/SecretOnceDialog.vue",
8454
"match": "text-sm",
@@ -99,11 +69,6 @@
9969
"match": "opacity-0",
10070
"count": 1
10171
},
102-
{
103-
"file": "src/components/md/MdCheckbox.vue",
104-
"match": "rounded-full",
105-
"count": 1
106-
},
10772
{
10873
"file": "src/components/md/MdRadio.vue",
10974
"match": "opacity-0",
@@ -124,11 +89,6 @@
12489
"match": "text-sm",
12590
"count": 1
12691
},
127-
{
128-
"file": "src/pages/IndexPage.vue",
129-
"match": "z-20",
130-
"count": 3
131-
},
13292
{
13393
"file": "src/pages/IndexPage.vue",
13494
"match": "z-30",

0 commit comments

Comments
 (0)