Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DT-1248 - consistent link styles #1589

Merged
merged 42 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
1f62e84
clean up all links
rossedfort Aug 24, 2023
55a7b7e
Merge branch 'main' into DT-1248-link-hover-styles
rossedfort Aug 24, 2023
32b6c62
fix cy
rossedfort Aug 24, 2023
d6aa517
fix pw
rossedfort Aug 24, 2023
9e08bbc
fix pw
rossedfort Aug 24, 2023
fed04a4
snaps
rossedfort Aug 24, 2023
e355a82
Merge branch 'main' into DT-1248-link-hover-styles
rossedfort Aug 24, 2023
261c913
fix cy
rossedfort Aug 24, 2023
85e65dc
Merge branch 'main' into DT-1248-link-hover-styles
rossedfort Aug 25, 2023
37ec0af
button overhaul with cva
rossedfort Aug 25, 2023
554d3ed
update tests and fix orderable list item
rossedfort Aug 25, 2023
062c11f
lint
rossedfort Aug 25, 2023
f9147ba
add lint script to lintstagedrc
rossedfort Aug 25, 2023
b2c4653
Merge branch 'main' into DT-1248-link-hover-styles
rossedfort Aug 28, 2023
d3f634d
fix link
rossedfort Aug 28, 2023
0a10849
snaps
rossedfort Aug 28, 2023
84f14c8
fix cy
rossedfort Aug 28, 2023
9fcb2b2
fix pw
rossedfort Aug 28, 2023
cc0bd74
fix icon button and button focus state
rossedfort Aug 28, 2023
cc45811
fix cy?
rossedfort Aug 28, 2023
79486a4
some cleanup
rossedfort Aug 28, 2023
3abebd2
combobox focus
rossedfort Aug 28, 2023
66b8fff
snaps
rossedfort Aug 28, 2023
f19e784
fix sticky filters
rossedfort Aug 28, 2023
7306951
snaps
rossedfort Aug 29, 2023
ba29894
remove style block from button
rossedfort Aug 29, 2023
b0866a1
fix chip button
rossedfort Aug 29, 2023
f673780
snaps
rossedfort Aug 29, 2023
2960727
add active state to btn
rossedfort Aug 29, 2023
3c42e57
snaps
rossedfort Aug 29, 2023
2afb742
clean up combobox a lil
rossedfort Aug 29, 2023
dcd4487
fix clipping and alignment on event summary rows
rossedfort Aug 30, 2023
c464b4d
focus combobox input on trigger click
rossedfort Aug 30, 2023
7b18446
change icon-button hover
rossedfort Aug 30, 2023
a9670f4
add unroundLeft to boolean filter
rossedfort Aug 30, 2023
882496f
clean up some stuff from CR
rossedfort Aug 30, 2023
da154de
remove table-header button hover styles
rossedfort Aug 30, 2023
f2bcc21
Merge branch 'main' into DT-1248-link-hover-styles
rossedfort Aug 30, 2023
ccec0bd
Merge branch 'main' into DT-1248-link-hover-styles
rossedfort Aug 30, 2023
4a656c6
Merge branch 'main' into DT-1248-link-hover-styles
rossedfort Aug 31, 2023
f1779c1
Update src/lib/components/workflow/filter-search/boolean-filter.svelte
rossedfort Aug 31, 2023
4aa74d7
fix truncation on event-summary rows
rossedfort Aug 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"*.{ts,js}": ["pnpm lint:fix", "prettier --write"],
"*.{css,postcss,svelte}": "stylelint --fix",
"*.{css,postcss}": ["stylelint --fix"],
"*.svelte": ["stylelint --fix", "pnpm lint:fix"],
"*.{json,md}": "prettier --write"
}
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
},
"editor.formatOnSave": true,
"css.customData": [".vscode/css-custom-data.json"],
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
]
}
6 changes: 3 additions & 3 deletions colors.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const colors = {
},
indigo: {
50: '#eef2ff',
100: '#e0e7ff',
100: '#E0EAFF',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not going to block on this, but the inconsistency between capital and lower case makes me sad.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair, I just copied the values from Figma, and figured we will be revisiting this file once Design finalizes our color palette.

200: '#c7d2fe',
300: '#a5b4fc',
400: '#818cf8',
Expand All @@ -38,7 +38,7 @@ const colors = {
300: '#d4d4d8',
400: '#a1a1aa',
500: '#71717a',
600: '#52525b',
600: '#4B5563',
700: '#3f3f46',
800: '#27272a',
900: '#18181b',
Expand Down Expand Up @@ -94,7 +94,7 @@ const colors = {
red: {
50: '#fef2f2',
100: '#fee2e2',
200: '#fecaca',
200: '#FFCFCF',
300: '#fca5a5',
400: '#f87171',
500: '#ef4444',
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/schedules.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('Schedules View', () => {
cy.get('.schedule-row').first().contains(scheduleId);
cy.get('.schedule-row').first().contains(name);

cy.get('.schedule-row').first().click();
cy.get('.schedule-row a').first().click();

cy.wait('@schedule-api');

Expand All @@ -63,7 +63,7 @@ describe('Schedules Edit', () => {
cy.get('.schedule-row').first().contains(scheduleId);
cy.get('.schedule-row').first().contains(name);

cy.get('.schedule-row').first().click();
cy.get('.schedule-row a').first().click();

cy.wait('@schedule-api');

Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/workflow-executions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe('Workflow Executions List', () => {
encodeURIComponent(`ExecutionStatus="Running"`),
);

cy.get('.workflow-summary-row > .time-cell').first().click();
cy.get('.workflow-summary-row a').first().click();

cy.wait('@workflow-api');
cy.wait('@event-history-api');
Expand Down
5 changes: 3 additions & 2 deletions src/lib/components/banner/banner.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import IconButton from '$lib/holocene/icon-button.svelte';
import Link from '$lib/holocene/link.svelte';
import { translate } from '$lib/i18n/translate';
import type { BannersState } from '$lib/models/banner-state';
import { close, closedBanners } from '$lib/stores/banner';
Expand All @@ -24,9 +25,9 @@
class={`relative block text-center leading-10 ${severity}`}
{...$$restProps}
>
<a href={link} target="_blank" rel="noreferrer">
<Link href={link} newTab>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe external as the prop? I hate the camel case props that don't jive with the rest of HTML.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure I agree, although newTab was already the name of the prop in <Link /> so I didn't change it. Can make a follow up PR for that.

{message}
laurakwhit marked this conversation as resolved.
Show resolved Hide resolved
</a>
</Link>

<IconButton
on:click={() => close(key)}
Expand Down
13 changes: 4 additions & 9 deletions src/lib/components/data-encoder-settings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import Accordion from '$lib/holocene/accordion.svelte';
import Button from '$lib/holocene/button.svelte';
import Link from '$lib/holocene/link.svelte';
import { clickOutside } from '$lib/holocene/outside-click';
import { translate } from '$lib/i18n/translate';
import { dataConverterPort } from '$lib/stores/data-converter-config';
Expand All @@ -17,10 +18,9 @@
} from '$lib/stores/data-encoder-config';
import { refresh } from '$lib/stores/workflow-run';
import { validateHttpOrHttps, validateHttps } from '$lib/utilities/is-http';

import CodecEndpointSettings from './codec-endpoint-settings.svelte';
import DataConverterPortSettings from './data-converter-port-settings.svelte';


export const viewDataEncoderSettings = writable<boolean>(false);
</script>
Expand Down Expand Up @@ -89,12 +89,9 @@
</h3>
</div>
<p class="text-sm">
{translate('data-encoder', 'codec-server-description-prefix')}<a
rel="noreferrer"
target="_blank"
{translate('data-encoder', 'codec-server-description-prefix')}<Link
href="https://docs.temporal.io/dataconversion#codec-server"
class="text-blue-700 underline decoration-blue-700"
>{translate('codec-server')}</a
newTab>{translate('codec-server')}</Link
>
{translate('data-encoder', 'codec-server-description-suffix', {
level: namespaceOrCluster,
Expand Down Expand Up @@ -156,14 +153,12 @@
<DataConverterPortSettings bind:port />
<div class="flex items-center gap-4">
<Button
thin
disabled={Boolean(error) || (override && !endpoint)}
data-testid="confirm-data-encoder-button"
on:click={onConfirm}
type="submit">{translate('apply')}</Button
>
<Button
thin
variant="ghost"
data-testid="cancel-data-encoder-button"
on:click={onCancel}>{translate('cancel')}</Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
}

.detail-row {
@apply block w-full items-start gap-4 py-2 text-left xl:flex;
@apply flex w-full items-center gap-4 py-2 text-left xl:flex;
}

.row:last-of-type .content {
Expand Down
12 changes: 6 additions & 6 deletions src/lib/components/event/event-details-row.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
{:else if shouldDisplayAsExecutionLink(key)}
<div class="flex w-full flex-wrap items-center gap-1 pr-1">
<p class="mr-3 truncate text-sm">{format(key)}</p>
<div class="truncate text-sm">
<div class="text-sm truncate">
<Copyable
copyIconTitle={translate('copy-icon-title')}
copySuccessIconTitle={translate('copy-success-icon-title')}
content={value}
container-class=" xl:flex-row"
container-class="xl:flex-row h-12 pr-1"
>
<Link
class="truncate"
Expand All @@ -71,12 +71,12 @@
{:else if shouldDisplayChildWorkflowLink(key, attributes)}
<div class="flex w-full flex-wrap items-center gap-1 pr-1">
<p class="truncate text-sm">{format(key)}</p>
<div class="truncate text-sm">
<div class="text-sm truncate">
<Copyable
copyIconTitle={translate('copy-icon-title')}
copySuccessIconTitle={translate('copy-success-icon-title')}
content={value}
container-class="xl:flex-row"
container-class="xl:flex-row h-12 pr-1"
>
<Link
class="truncate"
Expand All @@ -95,12 +95,12 @@
{:else if shouldDisplayAsTaskQueueLink(key)}
<div class="flex w-full flex-wrap items-center gap-1 pr-1">
<p class="mr-3 truncate text-sm">{format(key)}</p>
<div class="truncate text-sm">
<div class="text-sm truncate">
<Copyable
copyIconTitle={translate('copy-icon-title')}
copySuccessIconTitle={translate('copy-success-icon-title')}
content={value}
container-class=""
container-class="h-12 pr-1"
>
<Link
class="truncate"
Expand Down
6 changes: 1 addition & 5 deletions src/lib/components/event/event-shortcut-keys.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
</script>

<div class="shortcut-key-button">
<Button class="!py-1.5 !px-1" variant="secondary" on:click={onOpen}
><span class="flex h-[24px] w-[24px] items-center justify-center text-xl"
>?</span
></Button
>
<Button variant="secondary" on:click={onOpen}>?</Button>
</div>
<Drawer
{open}
Expand Down
5 changes: 2 additions & 3 deletions src/lib/components/event/event-summary-row.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { fade } from 'svelte/transition';

import Icon from '$lib/holocene/icon/icon.svelte';
import Link from '$lib/holocene/link.svelte';
import { isEventGroup } from '$lib/models/event-groups';
import {
eventOrGroupIsCanceled,
Expand Down Expand Up @@ -82,9 +83,7 @@
>
<td />
<td class="w-24 text-left">
<a class="text-sm text-gray-500 md:text-base" href="#{event.id}"
><p class="truncate">{event.id}</p></a
>
<Link class="truncate" href="#{event.id}">{event.id}</Link>
</td>
<td class="text-left">
<div class="flex flex-col gap-0">
Expand Down
11 changes: 6 additions & 5 deletions src/lib/components/event/event-summary-table.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import EventCategoryFilter from '$lib/components/event/event-category-filter.svelte';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the links in the expanded row could use centering

Screenshot 2023-08-29 at 3 53 44 PM Screenshot 2023-08-29 at 3 52 47 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the same issue that Tideman commented on, should be fixed 👍

import EventDateFilter from '$lib/components/event/event-date-filter.svelte';
import Icon from '$lib/holocene/icon/icon.svelte';
import Button from '$lib/holocene/button.svelte';
import TableHeaderRow from '$lib/holocene/table/table-header-row.svelte';
import Table from '$lib/holocene/table/table.svelte';
import { translate } from '$lib/i18n/translate';
Expand Down Expand Up @@ -36,15 +36,16 @@
<th class="w-44"><EventCategoryFilter {compact} /></th>
<th class="w-auto xl:w-80">
<div class="flex w-full justify-end">
<button
class="relative flex w-28 items-center justify-end rounded sm:justify-between"
<Button
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want Button styling for any of the filters (e.g. Date & Time) in the header too?

Screenshot 2023-08-29 at 4 42 39 PM
Screenshot 2023-08-29 at 4 42 49 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think we need to sync up with Ash on the expected behavior here. The first 2 column headers are dropdown menus, which don't change background on hover, but the last column is a primary button with no dropdown.

size="sm"
variant="table-header"
trailingIcon={expandAll ? 'chevron-up' : 'chevron-down'}
on:click={handleChange}
>
<span class="hidden sm:block">
{expandAll ? translate('collapse-all') : translate('expand-all')}
</span>
<Icon name={expandAll ? 'chevron-up' : 'chevron-down'} />
</button>
</Button>
</div>
</th>
</TableHeaderRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@
accept=".json"
on:change={onFileSelect}
/>
<Button icon="file-upload" on:click={onConfirm} disabled={!fileLoaded}
laurakwhit marked this conversation as resolved.
Show resolved Hide resolved
<Button leadingIcon="file-upload" on:click={onConfirm} disabled={!fileLoaded}
>{translate('import')}</Button
>
34 changes: 0 additions & 34 deletions src/lib/components/navigation-link.svelte

This file was deleted.

31 changes: 16 additions & 15 deletions src/lib/components/schedule/schedule-advanced-settings.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import Icon from '$lib/holocene/icon/icon.svelte';
import Accordion from '$lib/holocene/accordion.svelte';
import { translate } from '$lib/i18n/translate';

import ScheduleNotes from './schedule-notes.svelte';
Expand All @@ -10,17 +10,23 @@
export let state: ScheduleState;
export let policies: SchedulePolicies;
export let notes = '';

let show = false;
</script>

<ScheduleNotes {notes} />
<div>
<button on:click={() => (show = !show)} class="settings">
{translate('schedules', 'advanced-settings')}
<Icon class="inline" name={show ? 'chevron-up' : 'chevron-down'} />
</button>
{#if show}
<Accordion title={translate('schedules', 'advanced-settings')}>
<p>
{translate('schedules', 'start-time')}
{spec?.startTime ?? translate('none')}
</p>
<p>
{translate('schedules', 'end-time')}{spec?.endTime ?? translate('none')}
</p>
<p>{translate('schedules', 'jitter')}{spec?.jitter ?? translate('none')}</p>
<p>
{translate('schedules', 'exclusion-calendar')}{spec?.excludeCalendar?.[0] ??
translate('none')}
</p>
{#if state?.limitedActions}
<p>
{translate('schedules', 'start-time')}
{spec?.startTime ?? translate('none')}
Expand All @@ -44,10 +50,5 @@
translate('none')}
</p>
{/if}
</div>
</Accordion>

<style lang="postcss">
.settings {
@apply mb-4 underline decoration-gray-900;
}
</style>
Loading
Loading