Skip to content

Commit d39dd5e

Browse files
authored
Text styles audit (#2236)
* Add responsive font sizing for h1 * Update font family * Add responsive font sizing and update h2 elements * Add responsive font sizing and update other heading elements * Add default font size and weight for body * Remove set icon size in Link component * Add fixed text styles for heading elements and use apply * Add body text style classes to base * Move text styles to separate plugin
1 parent af0d545 commit d39dd5e

File tree

72 files changed

+163
-156
lines changed

Some content is hidden

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

72 files changed

+163
-156
lines changed

.vscode/settings.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@
1111
"tailwindCSS.experimental.classRegex": [
1212
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
1313
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
14-
]
14+
],
15+
"files.associations": {
16+
"*.css": "tailwindcss"
17+
}
1518
}

src/app.css

+3-17
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,14 @@
1010
*,
1111
html,
1212
body {
13-
box-sizing: border-box;
13+
@apply box-border;
1414
}
1515

1616
body {
17-
@apply surface-background;
18-
font-family: theme('fontFamily.primary');
19-
position: relative;
20-
overscroll-behavior: none;
21-
}
22-
23-
h1,
24-
h2,
25-
h3,
26-
h4,
27-
h5,
28-
h6,
29-
titles,
30-
labels {
31-
font-family: theme('fontFamily.secondary');
17+
@apply body-normal surface-background relative overscroll-none;
3218
}
3319

3420
input[type='search']::-webkit-search-cancel-button {
35-
display: none;
21+
@apply hidden;
3622
}
3723
}

src/lib/components/batch-operations/header.svelte

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@
3232

3333
<div class="flex items-center justify-between">
3434
<div class="flex flex-col gap-2">
35-
<div class="flex flex-row gap-2 max-sm:flex-col">
36-
<h1 class="text-2xl">
35+
<div class="flex flex-row items-center gap-2 max-sm:flex-col">
36+
<h1>
3737
{translate('batch.describe-page-title')}
3838
</h1>
3939
<Badge type={jobStateToBadgeType[operation.state]}>
4040
{operation.state}
4141
</Badge>
4242
</div>
43-
<h2 class="text-sm">
43+
<p>
4444
{operation.jobId}
45-
</h2>
45+
</p>
4646
</div>
4747
{#if operation.state === 'Running'}
4848
<Tooltip

src/lib/components/data-encoder-settings.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
>
8181
<div class="flex w-full flex-col gap-4 xl:w-1/2">
8282
<div class="flex items-center justify-between space-x-2">
83-
<h3 data-testid="data-encoder-title" class="text-xl">
83+
<h3 data-testid="data-encoder-title">
8484
{translate('common.codec-server')}
8585
</h3>
8686
</div>

src/lib/components/lines-and-dots/input-and-results-payload.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</script>
2424

2525
<div class="flex w-full grow flex-col gap-2 py-4 {$$restProps.class}">
26-
<h3 class="flex items-center gap-2 text-2xl">
26+
<h3 class="flex items-center gap-2">
2727
{title}
2828
</h3>
2929
{#if content}

src/lib/components/lines-and-dots/workflow-details.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</script>
2424

2525
<div class="flex flex-col gap-2">
26-
<h3 class="flex items-center text-2xl">Summary</h3>
26+
<h3 class="flex items-center">Summary</h3>
2727
<div
2828
class="surface-primary grid w-full grid-flow-row grid-cols-1 gap-2 rounded-xl border-2 border-primary p-2 md:grid-cols-2 xl:grid-cols-3"
2929
>

src/lib/components/schedule/schedule-day-of-month-view.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</script>
1313

1414
<div class="my-2 flex flex-col gap-4">
15-
<h3 class="text-lg font-medium">
15+
<h3>
1616
{translate('schedules.recurring-dates-heading')}
1717
</h3>
1818
<p>{translate('schedules.recurring-dates-description')}</p>

src/lib/components/schedule/schedule-day-of-week-view.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</script>
1111

1212
<div class="my-2 flex flex-col gap-4">
13-
<h3 class="text-lg font-medium">
13+
<h3>
1414
{translate('schedules.recurring-days-heading')}
1515
</h3>
1616
<p>{translate('schedules.recurring-days-description')}</p>

src/lib/components/schedule/schedule-form-view.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
<Link href={backHref} icon="chevron-left">
143143
{backTitle}
144144
</Link>
145-
<h1 class="font-base text-2xl">{title}</h1>
145+
<h1>{title}</h1>
146146
</header>
147147
<form class="mb-4 flex w-full flex-col gap-4 md:w-2/3 xl:w-1/2">
148148
<Alert intent="error" title="" hidden={!$error}>

src/lib/components/schedule/schedule-frequency-panel.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</script>
1414

1515
<Panel>
16-
<h2 class="mb-4 text-lg">{translate('schedules.schedule-spec')}</h2>
16+
<h2 class="mb-4">{translate('schedules.schedule-spec')}</h2>
1717
<div class="pr-2">
1818
<ScheduleFrequency {calendar} {interval} {timezoneName} class="text-base" />
1919
</div>

src/lib/components/schedule/schedule-input-payload.svelte

+1-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@
3939
/>
4040
{/key}
4141
</PayloadDecoder>
42-
<span
43-
class="font-secondary text-xs font-light italic"
44-
class:text-red-700={error}
45-
>
42+
<span class="text-xs font-light italic" class:text-red-700={error}>
4643
{translate('workflows.signal-payload-input-label-hint')}
4744
</span>
4845
</div>

src/lib/components/schedule/schedule-notes.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
</script>
66

77
<div>
8-
<h2 class="mb-4 text-lg">{translate('common.notes')}</h2>
8+
<h2 class="mb-4">{translate('common.notes')}</h2>
99
<p>{notes}</p>
1010
</div>

src/lib/components/schedule/schedule-recent-runs.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
<Panel class="w-full">
3737
<div class="flex justify-between">
38-
<h2 class="mb-4 text-lg">{translate('schedules.recent-runs')}</h2>
38+
<h2 class="mb-4">{translate('schedules.recent-runs')}</h2>
3939
<Link
4040
href={routeForWorkflowsWithQuery({
4141
namespace,

src/lib/components/schedule/schedule-upcoming-runs.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</script>
1111

1212
<Panel>
13-
<h2 class="mb-4 text-lg">{translate('schedules.upcoming-runs')}</h2>
13+
<h2 class="mb-4">{translate('schedules.upcoming-runs')}</h2>
1414
{#each futureRuns.slice(0, 5) as run}
1515
<div class="row">
1616
<p>

src/lib/components/schedule/schedules-calendar-view.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
</script>
4646

4747
<Tabs class="mt-8 w-full">
48-
<h2 class="mb-4 text-lg">{translate('schedules.schedule-spec')}</h2>
48+
<h2 class="mb-4">{translate('schedules.schedule-spec')}</h2>
4949
<TabList label="Schedule Tabs" class="flex flex-wrap gap-6">
5050
{#if schedule}
5151
<Tab
@@ -112,7 +112,7 @@
112112
</TabPanel>
113113
<TabPanel id="string-panel" tabId="string-tab">
114114
<div class="my-2 flex w-full flex-col gap-4">
115-
<h3 class="text-lg font-medium">
115+
<h3>
116116
{translate('schedules.cron-view-title')}
117117
</h3>
118118
<p>{translate('schedules.cron-view-description')}</p>

src/lib/components/schedule/schedules-interval-view.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
</script>
3636

3737
<div class="my-2 flex flex-col gap-4">
38-
<h3 class="text-lg font-medium">
38+
<h3>
3939
{translate('schedules.interval-view-heading')}
4040
</h3>
4141
<p>
@@ -94,7 +94,7 @@
9494
error={error(second)}
9595
/>
9696
</div>
97-
<h3 class="mt-4 text-lg font-medium">
97+
<h3 class="mt-4">
9898
{translate('schedules.offset-heading')}
9999
</h3>
100100
<p>

src/lib/components/schedule/schedules-time-view.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</script>
99

1010
<div class="flex flex-col gap-4">
11-
<h3 class="text-lg font-medium">
11+
<h3>
1212
{translate('schedules.time-view-heading')}
1313
</h3>
1414
<p>

src/lib/components/worker-compatibility.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
$: defaultVersion = getCurrentCompatibilityDefaultVersion(compatibility);
3434
</script>
3535

36-
<h2 class="text-base font-medium" data-testid="version-sets">
36+
<h2 data-testid="version-sets">
3737
{translate('workers.version-sets')}
3838
</h2>
3939
<Table class="mb-6 w-full min-w-[600px] table-fixed">
@@ -77,7 +77,7 @@
7777
</tr>
7878
{/each}
7979
</Table>
80-
<h2 class="flex items-center gap-2 text-base font-medium" data-testid="workers">
80+
<h2 class="flex items-center gap-2" data-testid="workers">
8181
{translate('workers.workers')}
8282
<Badge type="count" class="rounded-sm">{workers?.pollers?.length || 0}</Badge>
8383
</h2>

src/lib/components/worker-rules.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
};
3333
</script>
3434

35-
<h2 class="text-base font-medium" data-testid="worker-rules">
35+
<h2 data-testid="worker-rules">
3636
{translate('workers.assignment-rules')}
3737
</h2>
3838
<Table class="mb-6 w-full table-fixed">
@@ -81,7 +81,7 @@
8181
{/if}
8282
</Table>
8383

84-
<h2 class="text-base font-medium" data-testid="worker-rules">
84+
<h2 data-testid="worker-rules">
8585
{translate('workers.redirect-rules')}
8686
</h2>
8787
<Table class="mb-6 w-full table-fixed">

src/lib/components/worker-table.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
export let workers: GetPollersResponse;
1515
</script>
1616

17-
<h2 class="flex items-center gap-2 text-base font-medium" data-testid="workers">
17+
<h2 class="flex items-center gap-2" data-testid="workers">
1818
{translate('workers.workers')}
1919
<Badge type="count" class="rounded-sm">{workers?.pollers?.length || 0}</Badge>
2020
</h2>

src/lib/components/workflow-status.svelte

+1-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@
4242
};
4343
4444
const workflowStatus = cva(
45-
[
46-
'flex items-center rounded-sm px-1 py-0.5 font-secondary whitespace-nowrap text-black',
47-
],
45+
['flex items-center rounded-sm px-1 py-0.5 whitespace-nowrap text-black'],
4846
{
4947
variants: {
5048
status: {

src/lib/components/workflow/client-actions/signal-confirmation-modal.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@
7979
bind:value={name}
8080
/>
8181
<div>
82-
<span class="font-secondary text-sm font-medium"
82+
<span class="text-sm font-medium"
8383
>{translate('workflows.signal-payload-input-label')}</span
8484
>
85-
<span class="font-secondary text-xs font-light italic">
85+
<span class="text-xs font-light italic">
8686
{translate('workflows.signal-payload-input-label-hint')}
8787
</span>
8888
<CodeBlock

src/lib/components/workflow/input-and-results.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
</script>
4949

5050
<article class="flex w-full flex-col" {...$$restProps}>
51-
<h3 class="mb-2 flex items-center gap-2 text-lg">
51+
<h3 class="mb-2 flex items-center gap-2">
5252
{title}
5353
{#if showParsedContentCount}
5454
<Badge type="count" class="rounded-sm">{payloads.length}</Badge>

src/lib/components/workflow/pending-activities.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
{#each pendingActivities as { id, ...pendingActivity } (id)}
5656
{@const failed = pendingActivity.attempt > 1}
5757
<div class="pending-activity-row-container">
58-
<h3 class="w-full self-start text-sm font-normal text-slate-500">
58+
<h3 class="w-full self-start text-sm text-secondary">
5959
{pendingActivity.activityId}
6060
</h3>
6161
<div class="pending-activity-row">

src/lib/components/workflow/workflow-summary.svelte

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
>
3434
<div class="flex flex-col gap-2 xl:flex-row">
3535
<div class="grow basis-1/3 overflow-hidden">
36-
<h3 class="font-medium">{translate('common.execution-details')}</h3>
36+
<h4>{translate('common.execution-details')}</h4>
3737
<div class="h-0.5 rounded-full bg-inverse" />
3838
<WorkflowDetail
3939
title={translate('common.workflow-type')}
@@ -55,7 +55,7 @@
5555
/>
5656
</div>
5757
<div class="grow overflow-hidden">
58-
<h3 class="font-medium">{translate('common.task-queue')}</h3>
58+
<h4>{translate('common.task-queue')}</h4>
5959
<div class="h-0.5 rounded-full bg-inverse" />
6060
<WorkflowDetail
6161
content={workflow?.taskQueue}
@@ -74,9 +74,9 @@
7474
/>
7575
</div>
7676
<div class="grow-0">
77-
<h3 class="font-medium">
77+
<h4>
7878
{translate('workflows.start-and-close-time')}
79-
</h3>
79+
</h4>
8080
<div class="h-0.5 rounded-full bg-inverse" />
8181
<WorkflowDetail
8282
title={translate('common.start-time')}

src/lib/components/workflow/workflows-summary-configurable-table/table-empty-state.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
{#if updating}
3737
<Loading />
3838
{:else}
39-
<h2 class="text-lg font-medium">
39+
<h2>
4040
{#if query}
4141
{translate('workflows.workflow-query-empty-state-title')}
4242
{:else}

src/lib/components/workflow/workflows-summary-configurable-table/table-header-cell.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515

1616
<style lang="postcss">
1717
.workflows-summary-table-header-cell {
18-
@apply whitespace-nowrap px-2 text-left font-secondary text-sm font-medium;
18+
@apply whitespace-nowrap px-2 text-left text-sm font-medium;
1919
}
2020
</style>

src/lib/components/workflow/workflows-summary-configurable-table/table-header-row.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
}
6666
6767
.batch-actions-table-cell {
68-
@apply overflow-visible whitespace-nowrap px-2 text-left font-secondary text-sm font-medium;
68+
@apply overflow-visible whitespace-nowrap px-2 text-left text-sm font-medium;
6969
}
7070
7171
.configuration-button-table-cell {

src/lib/holocene/accordion.svelte

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@
5454
on:click={toggleAccordion}
5555
>
5656
<div class="space-between flex w-full flex-row items-center">
57-
<h2 class="flex w-full items-center gap-2 text-lg font-medium">
57+
<h3 class="flex w-full items-center gap-2">
5858
{#if icon}<Icon name={icon} />{/if}
5959
{title}
6060
<slot name="summary" />
61-
</h2>
61+
</h3>
6262
<div
6363
class="flex flex-row items-center gap-2 pr-2"
6464
on:click|stopPropagation
@@ -68,7 +68,7 @@
6868
</div>
6969
<Icon class="m-2" name={open ? 'chevron-up' : 'chevron-down'} />
7070
</div>
71-
<p class="flex items-center font-secondary">
71+
<p class="flex items-center">
7272
{#if error}
7373
<Badge class="mr-2" type="danger">{error}</Badge>
7474
{/if}

src/lib/holocene/alert.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
<style lang="postcss">
6666
.alert {
67-
@apply items-start gap-2 break-words rounded-lg border-2 p-5 font-primary text-sm text-primary;
67+
@apply items-start gap-2 break-words rounded-lg border-2 p-5 text-sm text-primary;
6868
}
6969
7070
.alert.success {
@@ -84,6 +84,6 @@
8484
}
8585
8686
.content :global(> *) {
87-
@apply font-secondary text-sm font-normal;
87+
@apply text-sm font-normal;
8888
}
8989
</style>

0 commit comments

Comments
 (0)