Skip to content

Commit 6db4be9

Browse files
authored
[DT-156] Fix broken breakpoint UI on workflow detail page header (#960)
* Fix UI at different breakpoints * Center checked icon in toggle switch
1 parent 313a57b commit 6db4be9

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

Diff for: src/lib/components/auto-refresh-workflow.svelte

+6-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
$: checked = $autoRefreshWorkflow === 'on';
1010
</script>
1111

12-
<label for="autorefresh" class="font-secondary text-sm">Auto refresh</label>
13-
<Tooltip bottomLeft text="15 second page refresh">
14-
<ToggleSwitch id="autorefresh" {checked} on:change={onChange} />
15-
</Tooltip>
12+
<label for="autorefresh" class="flex items-center gap-4 font-secondary text-sm"
13+
>Auto refresh
14+
<Tooltip bottomLeft text="15 second page refresh">
15+
<ToggleSwitch id="autorefresh" {checked} on:change={onChange} />
16+
</Tooltip>
17+
</label>

Diff for: src/lib/holocene/toggle-switch.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
input:checked + .slider {
2525
@apply border-gray-900 bg-gray-900;
2626
&:before {
27-
@apply translate-x-4 bg-blue-100 text-center;
27+
@apply flex translate-x-4 items-center justify-center bg-blue-100;
2828
content: url('data:image/svg+xml, %3Csvg%20width=%2212%22%20height=%2210%22%20viewBox=%220%200%2012%2010%22%20fill=%22none%22%20xmlns=%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Cpath%20d=%22M4.36831%209.00391L0.572266%205.20786L1.52128%204.25885L4.36831%207.10588L10.4786%200.995582L11.4276%201.94459L4.36831%209.00391Z%22%20fill=%22%231D4ED8%22%2F%3E%0A%3C%2Fsvg%3E%0A');
2929
}
3030
}

Diff for: src/lib/layouts/workflow-header.svelte

+13-7
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,23 @@
100100
</a>
101101
</div>
102102
<div
103-
class="mb-8 flex flex-col items-center justify-between gap-4 xl:flex-row xl:gap-0"
103+
class="mb-8 flex w-full flex-col items-center justify-between gap-4 lg:flex-row"
104104
>
105-
<h1
106-
data-cy="workflow-id-heading"
107-
class="relative flex items-center gap-4 text-2xl"
105+
<div
106+
class="flex w-full items-center justify-start gap-4 overflow-hidden whitespace-nowrap lg:w-auto"
108107
>
109108
<WorkflowStatus status={workflow?.status} />
110-
<span class="select-all font-medium">{workflow.id}</span>
111-
</h1>
109+
<h1
110+
data-cy="workflow-id-heading"
111+
class="select-all overflow-hidden text-ellipsis text-2xl font-medium"
112+
>
113+
{workflow.id}
114+
</h1>
115+
</div>
112116
{#if isRunning}
113-
<div class="flex items-center justify-start gap-4 xl:justify-end">
117+
<div
118+
class="flex flex-col items-center justify-center gap-4 whitespace-nowrap sm:flex-row lg:justify-end"
119+
>
114120
<AutoRefreshWorkflow onChange={onRefreshChange} />
115121
<WorkflowActions {cancelInProgress} {workflow} {namespace} />
116122
</div>

0 commit comments

Comments
 (0)