Skip to content

Commit 0c3b3dd

Browse files
[DT-158] Core UI Scrub (#1044)
* Update bg color * Update table border Co-authored-by: Grace Gardner <[email protected]>; * Update primary button color from blue to gradient with border * Update border radius and width on panels, cards, etc. * Update workflow status badge colors * Add hover state for copy and filter buttons on workflow rows * Move workflow details to summary and relationships cards * Persist workflow summary view open setting in local storage * Add relationships badges * Fix relationship links layout * Update retry button styling * Update direction of gradient on buttons * Update direction of gradient on rows * Fix cypress test * Fix snapshot tests Co-authored-by: Ross Edfort <[email protected]> * Fix empty state in tables * Fix tab border * Update api pagination arrows and increase gray contrast * Fix simple table and namespace details page * Fix hover state for disabled primary Button * Fix spacing on ChipInput * Update namespace list border and hover state Co-authored-by: Ross Edfort <[email protected]>
1 parent da5a920 commit 0c3b3dd

File tree

59 files changed

+561
-344
lines changed

Some content is hidden

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

59 files changed

+561
-344
lines changed

cypress/integration/workflow-input-and-results.spec.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('Workflow Input and Results', () => {
5454
cy.wait('@event-history-end');
5555
cy.wait('@event-history-descending');
5656

57-
cy.get('.accordion-open').click();
57+
cy.get('[data-cy="input-and-results"]').click();
5858

5959
const firstEvent = eventsCompletedFixture.history.events[0];
6060
const input = Buffer.from(
@@ -102,7 +102,7 @@ describe('Workflow Input and Results', () => {
102102
cy.wait('@event-history-end');
103103
cy.wait('@event-history-descending');
104104

105-
cy.get('.accordion-open').click();
105+
cy.get('[data-cy="input-and-results"]').click();
106106

107107
const firstEvent = eventsCompletedNullFixture.history.events[0];
108108
const input = Buffer.from(
@@ -153,7 +153,7 @@ describe('Workflow Input and Results', () => {
153153
cy.wait('@event-history-end');
154154
cy.wait('@event-history-descending');
155155

156-
cy.get('.accordion-open').click();
156+
cy.get('[data-cy="input-and-results"]').click();
157157

158158
const firstEvent = eventsRunningFixture.history.events[0];
159159
const input = Buffer.from(
@@ -190,7 +190,7 @@ describe('Workflow Input and Results', () => {
190190
cy.wait('@event-history-end');
191191
cy.wait('@event-history-descending');
192192

193-
cy.get('.accordion-open').click();
193+
cy.get('[data-cy="input-and-results"]').click();
194194

195195
const firstEvent = eventsFailedFixture.history.events[0];
196196
const input = Buffer.from(
@@ -235,7 +235,7 @@ describe('Workflow Input and Results', () => {
235235
cy.wait('@event-history-end');
236236
cy.wait('@event-history-descending');
237237

238-
cy.get('.accordion-open').click();
238+
cy.get('[data-cy="input-and-results"]').click();
239239

240240
const firstEvent = eventsCanceledFixture.history.events[0];
241241
const input = Buffer.from(
@@ -272,7 +272,7 @@ describe('Workflow Input and Results', () => {
272272
cy.wait('@event-history-end');
273273
cy.wait('@event-history-descending');
274274

275-
cy.get('.accordion-open').click();
275+
cy.get('[data-cy="input-and-results"]').click();
276276

277277
const firstEvent = eventsTimedOutFixture.history.events[0];
278278
const input = Buffer.from(
@@ -309,7 +309,7 @@ describe('Workflow Input and Results', () => {
309309
cy.wait('@event-history-end');
310310
cy.wait('@event-history-descending');
311311

312-
cy.get('.accordion-open').click();
312+
cy.get('[data-cy="input-and-results"]').click();
313313

314314
const firstEvent = eventsContinuedAsNewFixture.history.events[0];
315315
const input = Buffer.from(

src/lib/components/copyable.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<Icon
2525
name={$copied ? 'checkmark' : 'copy'}
2626
stroke={color}
27-
class={`${visible ? 'visible' : 'invisible group-hover:visible'} h-4`}
27+
class={`${visible ? 'visible' : 'invisible group-hover:visible'} h-fit`}
2828
/>
2929
</button>
3030
</div>

src/lib/components/event/event-empty-row.svelte

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
import EmptyState from '$lib/holocene/empty-state.svelte';
33
</script>
44

5-
<article class="row">
6-
<div class="cell">
5+
<tr class="row">
6+
<td class="table-cell" colspan="6">
77
<EmptyState
88
title="No Events Match"
99
content="There are no events that match your filters or selected view. Adjust your filters or view to see your events."
1010
/>
11-
</div>
12-
</article>
11+
</td>
12+
</tr>
1313

1414
<style lang="postcss">
1515
.row {
16-
@apply absolute left-0 right-0 border-2 p-2 text-center text-sm;
16+
@apply border-[3px] border-gray-900 p-2 text-center text-sm;
1717
}
1818
</style>

src/lib/components/event/event-group-details.svelte

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

1515
<div class="w-full border-gray-700 lg:w-1/3 lg:border-r-2">
16-
<Table class="w-full table-fixed pb-2">
16+
<Table class="w-full table-fixed pb-2" variant="simple">
1717
{#each [...eventGroup.events].reverse() as [id, eventInGroup] (id)}
1818
<tr
1919
class="row"
@@ -49,7 +49,7 @@
4949
}
5050
5151
.row:hover {
52-
@apply cursor-pointer bg-gradient-to-b from-blue-100 to-purple-100;
52+
@apply cursor-pointer bg-gradient-to-br from-blue-100 to-purple-100;
5353
}
5454
5555
.active.row {

src/lib/components/event/event-history-timeline-container.svelte

+5-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@
7979
</script>
8080

8181
<section class="flex w-full">
82-
<Accordion title="Timeline" icon="chart" class="select-none border-gray-900">
82+
<Accordion
83+
title="Timeline"
84+
icon="timeline"
85+
class="select-none border-gray-900"
86+
>
8387
<div
8488
class="mt-2 flex flex-col items-center justify-between gap-2 xl:flex-row"
8589
>

src/lib/components/event/event-summary-row.svelte

+4-4
Original file line numberDiff line numberDiff line change
@@ -227,18 +227,18 @@
227227
}
228228
229229
.active {
230-
@apply z-50 cursor-pointer bg-gradient-to-b from-blue-100 to-purple-100;
230+
@apply z-50 cursor-pointer bg-gradient-to-br from-blue-100 to-purple-100;
231231
}
232232
233233
.active.canceled {
234-
@apply bg-gradient-to-b from-yellow-100 to-yellow-200;
234+
@apply bg-gradient-to-br from-yellow-100 to-yellow-200;
235235
}
236236
237237
.active.failure {
238-
@apply bg-gradient-to-b from-red-100 to-red-200;
238+
@apply bg-gradient-to-br from-red-100 to-red-200;
239239
}
240240
241241
.active.terminated {
242-
@apply bg-gradient-to-b from-pink-100 to-pink-200;
242+
@apply bg-gradient-to-br from-pink-100 to-pink-200;
243243
}
244244
</style>

src/lib/components/namespace-list.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
{/if}
4848
</div>
4949

50-
<div class="mb-5 flex rounded-full border p-1 pr-4">
50+
<div class="mb-5 flex rounded-md border border-gray-900 p-1 pr-4">
5151
<div class="ml-4 mr-2">
5252
<Icon name="search" />
5353
</div>
@@ -67,7 +67,7 @@
6767
{#if namespacesResult}
6868
{#each namespacesResult.filter( ({ namespace }) => namespace.includes(searchValue), ) as namespace}
6969
<li
70-
class="first:rounded-t-md first:border-t last:rounded-b-md border-b border-l border-r p-3 flex border-collapse gap-2 hover:bg-gray-50 cursor-pointer"
70+
class="first:rounded-t-xl first:border-t-[3px] last:rounded-b-xl last:border-b-[3px] border-b border-l-[3px] border-r-[3px] border-gray-900 p-3 flex border-collapse gap-2 hover:bg-gradient-to-br from-blue-100 to-purple-100 cursor-pointer"
7171
on:click={() => namespace?.onClick(namespace.namespace)}
7272
>
7373
<div class="w-6 h-6 pl-3 active">

src/lib/components/panel.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
export let error: boolean = false;
33
</script>
44

5-
<div class="panel" class:error>
5+
<div class="panel bg-white {$$props.class}" class:error>
66
<slot />
77
</div>
88

99
<style lang="postcss">
1010
.panel {
11-
@apply rounded-lg border-2 border-gray-300 p-8;
11+
@apply rounded-xl border-[3px] border-gray-900 p-8;
1212
}
1313
1414
.error {

src/lib/components/schedule/schedules-table.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import Table from '$lib/holocene/table/table.svelte';
44
</script>
55

6-
<Table variant="fancy" class="w-full md:table-fixed">
6+
<Table variant="fancy" class="w-full bg-white md:table-fixed">
77
<TableHeaderRow slot="headers">
88
<th class="w-28 md:table-cell">Status</th>
99
<th class="md:table-cell md:w-80 xl:w-auto">Schedule Name</th>

src/lib/components/workers-list.svelte

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
<h3 class="text-lg font-medium">
1616
Task Queue: <span class="select-all font-normal">{taskQueue}</span>
1717
</h3>
18-
<section class="flex w-full flex-col rounded-lg border-2 border-gray-900">
18+
<section
19+
class="flex w-full flex-col rounded-lg border-[3px] border-gray-900 bg-white"
20+
>
1921
<div class="flex flex-row bg-gray-900 p-2 text-white">
2022
<div class="w-6/12 text-left">ID</div>
2123
<div class="w-2/12 text-left">Last Accessed</div>

src/lib/components/workflow-status.svelte

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
1818
const colors = {
1919
Running: 'blue',
20-
TimedOut: 'red',
20+
TimedOut: 'orange',
2121
Completed: 'green',
2222
Failed: 'red',
23-
ContinuedAsNew: 'indigo',
23+
ContinuedAsNew: 'purple',
2424
Canceled: 'yellow',
25-
Terminated: 'pink',
25+
Terminated: 'gray',
2626
Paused: 'yellow',
2727
};
2828
@@ -57,15 +57,15 @@
5757
@apply bg-red-100 text-red-700;
5858
}
5959
60-
.indigo {
61-
@apply bg-indigo-100 text-indigo-700;
60+
.purple {
61+
@apply bg-purple-100 text-purple-900;
6262
}
6363
64-
.purple {
65-
@apply bg-purple-100 text-purple-700;
64+
.gray {
65+
@apply bg-gray-100 text-gray-900;
6666
}
6767
68-
.pink {
69-
@apply bg-pink-100 text-pink-700;
68+
.orange {
69+
@apply bg-orange-100 text-orange-900;
7070
}
7171
</style>

src/lib/components/workflow/advanced-filter/custom-button.svelte

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020

2121
<button
2222
on:click
23-
class="{$$props.class} button"
23+
class="button rounded {$$props.class}"
2424
class:active
2525
class:primary
26+
class:destructive
2627
data-cy={dataCy}
2728
{disabled}
2829
class:disabled
2930
class:add
30-
class:destructive
3131
class:unround
3232
class:unroundRight
3333
class:unroundLeft
@@ -48,23 +48,23 @@
4848

4949
<style lang="postcss">
5050
.button {
51-
@apply relative flex w-fit items-center justify-center gap-2 px-2 py-1 font-secondary text-sm transition hover:bg-gradient-to-r hover:from-blue-100 hover:to-purple-200 hover:text-gray-900;
51+
@apply relative flex w-fit items-center justify-center gap-2 border-[3px] border-primary bg-white px-2 py-1 font-secondary text-sm transition hover:bg-primary hover:text-white;
5252
}
5353
5454
.disabled {
55-
@apply cursor-not-allowed bg-gray-100 hover:bg-gradient-to-r hover:from-gray-100 hover:to-gray-200;
55+
@apply cursor-not-allowed bg-gray-100 hover:bg-gray-100 hover:text-primary;
5656
}
5757
5858
.destructive {
59-
@apply hover:bg-gradient-to-r hover:from-red-100 hover:to-red-200;
59+
@apply border-danger bg-danger text-white hover:border-red-900 hover:bg-red-900;
6060
}
6161
6262
.active {
63-
@apply bg-black text-white;
63+
@apply bg-primary text-white;
6464
}
6565
6666
.primary {
67-
@apply bg-blue-700 text-white hover:from-gray-900 hover:to-gray-900 hover:text-white;
67+
@apply bg-primary from-blue-100 to-purple-200 text-white hover:bg-gradient-to-r hover:text-primary;
6868
}
6969
7070
.unround {

src/lib/components/workflow/dropdown-filter/workflow-datetime-filter.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@
255255
</div>
256256
</Select>
257257
<SimpleSplitButton
258-
class="rounded-tr rounded-br bg-offWhite"
258+
class="rounded-tr rounded-br bg-white"
259259
buttonClass="border border-gray-900"
260260
id="datetime"
261261
label={capitalize($timeFormat)}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</script>
3131

3232
{#if pendingActivities.length}
33-
<section class="rounded-lg border-2 border-gray-300 p-4">
33+
<section class="rounded-xl border-[3px] border-gray-900 bg-white p-4">
3434
<h3 class="mb-2 flex gap-2 text-lg font-medium">
3535
Pending Activities
3636
{#if canceled}

src/lib/components/workflow/workflow-advanced-filters.svelte

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

5050
<div class="flex flex-col">
51-
<div
52-
class="rounded-tr-lg rounded-tl-lg border border-gray-900 bg-offWhite p-6"
53-
>
51+
<div class="rounded-tr-lg rounded-tl-lg border border-gray-900 bg-white p-6">
5452
<div class="mb-2 flex items-center justify-between">
5553
<div class="flex items-center gap-2">
5654
<Tooltip top text="Back">

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

+22-10
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,33 @@
22
import Copyable from '$lib/components/copyable.svelte';
33
import Link from '$lib/holocene/link.svelte';
44
5-
export let title: string;
5+
export let title = '';
66
export let content: string;
7+
export let copyable = false;
78
export let href: string = null;
89
export let textSize = 'md';
910
</script>
1011

11-
<article class="flex gap-2 text-{textSize}">
12-
<div class="font-medium">{title}:</div>
13-
<div>
12+
<p class="flex items-center gap-2 text-{textSize} whitespace-nowrap pt-2">
13+
{#if copyable}
14+
<Copyable {content} visible container-class="gap-1 w-full">
15+
{#if title}
16+
{title}:
17+
{/if}
18+
{#if href}
19+
<Link {href} class="truncate">{content}</Link>
20+
{:else}
21+
<span class="select-all truncate">{content}</span>
22+
{/if}
23+
</Copyable>
24+
{:else}
25+
{#if title}
26+
{title}:
27+
{/if}
1428
{#if href}
15-
<Copyable {content}>
16-
<Link {href}>{content}</Link>
17-
</Copyable>
29+
<Link {href} class="truncate">{content}</Link>
1830
{:else}
19-
<div class="select-all">{content}</div>
31+
<span class="select-all truncate">{content}</span>
2032
{/if}
21-
</div>
22-
</article>
33+
{/if}
34+
</p>

0 commit comments

Comments
 (0)