Skip to content

Commit 092ca6f

Browse files
authored
UI Scrub Fixes (#1059)
* Fix hover state for event summary rows * Fix alignment of event row details * Make terminated badge darker * Add stopPropagation on keydown for inputs and textareas so they don't trigger keyboard shortcuts
1 parent 7b2240d commit 092ca6f

12 files changed

+23
-15
lines changed

Diff for: src/lib/components/event/event-details-row.svelte

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<CodeBlock content={getCodeBlockValue(value)} {inline} />
4141
</div>
4242
{:else if shouldDisplayAsExecutionLink(key)}
43-
<div class="flex w-full flex-wrap gap-1 pr-1">
43+
<div class="flex w-full flex-wrap items-center gap-1 pr-1">
4444
<p class="mr-3 truncate text-sm">{format(key)}</p>
4545
<div class="truncate text-sm">
4646
<Copyable content={value} container-class=" xl:flex-row">
@@ -59,7 +59,7 @@
5959
</div>
6060
</div>
6161
{:else if shouldDisplayChildWorkflowLink(key, attributes)}
62-
<div class="flex w-full flex-wrap gap-1 pr-1">
62+
<div class="flex w-full flex-wrap items-center gap-1 pr-1">
6363
<p class="truncate text-sm">{format(key)}</p>
6464
<div class="truncate text-sm">
6565
<Copyable content={value} container-class="xl:flex-row">
@@ -78,7 +78,7 @@
7878
</div>
7979
</div>
8080
{:else if shouldDisplayAsTaskQueueLink(key)}
81-
<div class="flex w-full flex-wrap gap-1 pr-1">
81+
<div class="flex w-full flex-wrap items-center gap-1 pr-1">
8282
<p class="mr-3 truncate text-sm">{format(key)}</p>
8383
<div class="truncate text-sm ">
8484
<Copyable content={value} container-class="">
@@ -93,7 +93,7 @@
9393
</div>
9494
</div>
9595
{:else}
96-
<div class="flex w-full flex-wrap gap-1 pr-1">
96+
<div class="flex w-full flex-wrap items-center gap-1 pr-1">
9797
<p class="mr-3 truncate text-sm">{format(key)}</p>
9898
<p class="truncate text-right text-sm xl:text-left">
9999
<span

Diff for: src/lib/components/event/event-summary-row.svelte

+9-9
Original file line numberDiff line numberDiff line change
@@ -172,37 +172,34 @@
172172

173173
<style lang="postcss">
174174
.row {
175-
@apply flex table-row flex-wrap items-center border-gray-900 text-sm no-underline xl:py-3 xl:text-base;
175+
@apply table-row flex-wrap items-center border-gray-900 text-sm no-underline xl:py-3 xl:text-base;
176176
}
177177
178178
.row:hover {
179-
@apply z-50 cursor-pointer bg-gray-50;
179+
@apply z-50 cursor-pointer bg-gradient-to-br from-blue-100 to-purple-100;
180180
}
181181
182182
.expanded.row {
183183
@apply bg-blue-50;
184184
}
185185
186-
.failure,
187-
.failure:hover {
186+
.failure {
188187
@apply bg-red-50;
189188
}
190189
191190
.failure .event-name {
192191
@apply text-red-700;
193192
}
194193
195-
.canceled,
196-
.canceled:hover {
194+
.canceled {
197195
@apply bg-yellow-50;
198196
}
199197
200198
.canceled .event-name {
201199
@apply text-yellow-700;
202200
}
203201
204-
.terminated,
205-
.terminated:hover {
202+
.terminated {
206203
@apply bg-pink-50;
207204
}
208205
@@ -211,7 +208,7 @@
211208
}
212209
213210
.expanded-cell {
214-
@apply flex table-cell w-full flex-wrap text-sm no-underline xl:text-base;
211+
@apply table-cell w-full flex-wrap text-sm no-underline xl:text-base;
215212
}
216213
217214
.typedError .expanded-cell {
@@ -230,14 +227,17 @@
230227
@apply z-50 cursor-pointer bg-gradient-to-br from-blue-100 to-purple-100;
231228
}
232229
230+
.canceled:hover,
233231
.active.canceled {
234232
@apply bg-gradient-to-br from-yellow-100 to-yellow-200;
235233
}
236234
235+
.failure:hover,
237236
.active.failure {
238237
@apply bg-gradient-to-br from-red-100 to-red-200;
239238
}
240239
240+
.terminated:hover,
241241
.active.terminated {
242242
@apply bg-gradient-to-br from-pink-100 to-pink-200;
243243
}

Diff for: src/lib/components/namespace-list.svelte

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
class="w-full"
5656
placeholder="Search"
5757
use:rootDocumentHandler
58+
on:keydown|stopPropagation
5859
bind:value={searchValue}
5960
bind:this={searchField}
6061
/>

Diff for: src/lib/components/search.svelte

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
{placeholder}
2828
autocomplete="off"
2929
on:input
30+
on:keydown|stopPropagation
3031
/>
3132
<div>
3233
<Button class="m-2" type="submit">{label}</Button>

Diff for: src/lib/components/workflow-status.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
}
6363
6464
.gray {
65-
@apply bg-gray-100 text-gray-900;
65+
@apply bg-gray-200 text-gray-900;
6666
}
6767
6868
.orange {

Diff for: src/lib/holocene/codec-endpoint-settings.svelte

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
placeholder="Endpoint"
3030
data-cy="data-encoder-endpoint-input"
3131
bind:value={endpoint}
32+
on:keydown|stopPropagation
3233
/>
3334
{#if error}
3435
<small data-cy="data-encoder-endpoint-error" class="text-red-700"

Diff for: src/lib/holocene/data-converter-port-settings.svelte

+1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
placeholder="Port"
1515
data-cy="data-encoder-port-input"
1616
bind:value={port}
17+
on:keydown|stopPropagation
1718
/>
1819
</div>

Diff for: src/lib/holocene/input/chip-input.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
bind:this={input}
107107
bind:value={displayValue}
108108
on:blur={handleBlur}
109-
on:keydown={handleKeydown}
109+
on:keydown|stopPropagation={handleKeydown}
110110
on:paste={handlePaste}
111111
/>
112112
</div>

Diff for: src/lib/holocene/textarea.svelte

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
on:change
2121
on:focus
2222
on:blur
23+
on:keydown|stopPropagation
2324
/>
2425
<div class="error-msg" aria-live={isValid ? 'off' : 'assertive'}>
2526
{#if !isValid}

Diff for: src/lib/pages/schedule-view.svelte

+1
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@
224224
class="block w-full border border-gray-200 rounded-md p-2 mt-4"
225225
placeholder="Enter a reason"
226226
bind:value={reason}
227+
on:keydown|stopPropagation
227228
/>
228229
</div>
229230
</Modal>

Diff for: src/routes/(app)/namespaces/[namespace]/archival/_filter-input.svelte

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
placeholder={name}
3131
{id}
3232
bind:value={_value}
33+
on:keydown|stopPropagation
3334
/>
3435
</div>
3536

Diff for: src/routes/(app)/select-namespace/+page.svelte

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
<input
5454
class="w-full"
5555
placeholder="Search"
56+
on:keydown|stopPropagation
5657
bind:value={searchValue}
5758
bind:this={searchField}
5859
/>

0 commit comments

Comments
 (0)