Skip to content

Commit 023f034

Browse files
DT-3523 - standalone activities UI (#3124)
* DT-3531 - start standalone activity (#3074) * WIP - start standalone activity * change routes, add duration input, fix imports * use queryparams for initial form values * clean up - update go api module - clean up api routes - add placeholder page for activity execution details - add support for query params to pre-fill form * add page components * add integration tests * DT-3526 describe standalone activity (#3099) * standalone activity details * decode and refactor * clean up * clean up * add page titles * add default param * remove pause, update and reset buttons * fix pnpm lock * add error state * increase toast duration * Standalone Activities List (#3103) * Add standalone activities UI * Upgrade to svelte5 * Don't allow onclick on button until we migrate it to Svelte5 * Remove batch functionality * Fix up some table stuff * Add filterable/copiable cells * Add Start Activity Like this One * DT-3532 - activity execution actions (#3115) * add terminate and cancel to activity details page * update api * add disabled state for standalone activities (#3122) * Standalone activities design scrub (#3123) * design scrub * fix i18n * rename and reorganize * fix poller * fix test * fix test * add alert for when no workers * 404 standalone activities for now * refetch activity after terminate and cancel * add search attributes for filters * fix duration input dark mode * add fallback values for activity header * remove postscss * better way to do search attributes * fix screaming enums * trigger actions * bump api version to v1.62.0 * fix some strict mode * fix some more strict * use timestamp store --------- Co-authored-by: Alex Tideman <alex.tideman@temporal.io>
1 parent 6209f9b commit 023f034

107 files changed

Lines changed: 5284 additions & 114 deletions

File tree

Some content is hidden

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
"@storybook/addon-essentials": "^8.6.11",
131131
"@storybook/addon-interactions": "^8.6.11",
132132
"@storybook/addon-links": "^8.6.11",
133-
"@storybook/addon-svelte-csf": "^5.0.0-next.23",
133+
"@storybook/addon-svelte-csf": "^5.0.10",
134134
"@storybook/addon-themes": "^8.6.11",
135135
"@storybook/blocks": "^8.6.11",
136136
"@storybook/icons": "^1.4.0",

pnpm-lock.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/labstack/echo/v4 v4.13.4
1212
github.com/stretchr/testify v1.10.0
1313
github.com/urfave/cli/v2 v2.3.0
14-
go.temporal.io/api v1.57.0
14+
go.temporal.io/api v1.62.0
1515
golang.org/x/net v0.47.0
1616
golang.org/x/oauth2 v0.30.0
1717
google.golang.org/grpc v1.66.1

server/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6Kllzaw
6868
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
6969
github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=
7070
github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
71-
go.temporal.io/api v1.57.0 h1:vJGbU6RqMqCAXP03Jq4KEL61sCxAdJx4Yj7PxtbsrF0=
72-
go.temporal.io/api v1.57.0/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM=
71+
go.temporal.io/api v1.62.0 h1:rh7LqqV+pxaLNwPLsFRZgYoDJ/NvCNDv0EnWe6oS7A4=
72+
go.temporal.io/api v1.62.0/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM=
7373
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
7474
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
7575
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=

src/lib/components/detail-list/detail-list-label.svelte

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
<script lang="ts">
22
import type { Snippet } from 'svelte';
3+
import { type ClassNameValue, twMerge } from 'tailwind-merge';
34
45
import Link from '$lib/holocene/link.svelte';
56
67
interface Props {
78
children: Snippet;
9+
class?: ClassNameValue;
810
href?: string;
911
}
1012
11-
const { children, href }: Props = $props();
13+
const { children, href, class: className = '' }: Props = $props();
1214
</script>
1315

14-
<dd class="col-[1]">
16+
<dd class={twMerge('col-[1]', className)}>
1517
{#if href}
1618
<Link {href} newTab>{@render children()}</Link>
1719
{:else}

src/lib/components/detail-list/detail-list-text-value.svelte

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<script lang="ts">
2+
import Badge, { type BadgeType } from '$lib/holocene/badge.svelte';
23
import type { IconName } from '$lib/holocene/icon';
34
import Icon from '$lib/holocene/icon/icon.svelte';
45
import Tooltip from '$lib/holocene/tooltip.svelte';
@@ -11,23 +12,34 @@
1112
text: string;
1213
tooltipText?: string;
1314
isBadge?: boolean;
15+
badgeType?: BadgeType;
1416
iconName?: IconName | undefined;
1517
}
1618
17-
let { copyable, copyableText, text, tooltipText, isBadge, iconName }: Props =
18-
$props();
19+
let {
20+
copyable,
21+
copyableText,
22+
text,
23+
tooltipText,
24+
iconName,
25+
isBadge = false,
26+
badgeType = 'default',
27+
}: Props = $props();
1928
</script>
2029

2130
{#snippet content()}
22-
<div
23-
class="flex select-all items-center gap-1 truncate rounded-sm"
24-
class:surface-subtle={isBadge}
25-
>
26-
{#if iconName}
27-
<Icon name={iconName} class="shrink-0" />
28-
{/if}
29-
<span class="truncate">{text}</span>
30-
</div>
31+
{#if isBadge}
32+
<Badge type={badgeType}>
33+
{text}
34+
</Badge>
35+
{:else}
36+
<div class="flex select-all items-center gap-1 truncate rounded-sm">
37+
{#if iconName}
38+
<Icon name={iconName} class="shrink-0" />
39+
{/if}
40+
<span class="truncate">{text}</span>
41+
</div>
42+
{/if}
3143
{/snippet}
3244

3345
<DetailListValue {copyable} {copyableText}>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<script lang="ts">
2+
import type { Snippet } from 'svelte';
3+
4+
import Tooltip from '$lib/holocene/tooltip.svelte';
5+
import { relativeTime } from '$lib/stores/time-format';
6+
import type { ValidTime } from '$lib/utilities/format-time';
7+
8+
import { timestamp } from '../timestamp.svelte';
9+
10+
import DetailListValue from './detail-list-value.svelte';
11+
12+
interface Props {
13+
timestamp: ValidTime | undefined | null;
14+
children?: Snippet;
15+
fallback?: string;
16+
}
17+
18+
let { timestamp: t, children, fallback }: Props = $props();
19+
20+
let formattedTimestamp = $derived(
21+
t ? $timestamp(t) : fallback ? fallback : '',
22+
);
23+
let relativeTimestamp = $derived(
24+
t ? $timestamp(t, { relative: true }) : fallback ? fallback : '',
25+
);
26+
</script>
27+
28+
{#snippet content()}
29+
<div class="flex select-all items-center gap-1 truncate rounded-sm">
30+
{$relativeTime ? relativeTimestamp : formattedTimestamp}
31+
</div>
32+
{/snippet}
33+
34+
<DetailListValue>
35+
<Tooltip
36+
hide={!t}
37+
text={$relativeTime ? formattedTimestamp : relativeTimestamp}
38+
top
39+
class="min-w-0"
40+
>
41+
{@render content()}
42+
{@render children?.()}
43+
</Tooltip>
44+
</DetailListValue>

src/lib/components/detail-list/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ export { default as DetailListValue } from './detail-list-value.svelte';
44
export { default as DetailListTextValue } from './detail-list-text-value.svelte';
55
export { default as DetailListLinkValue } from './detail-list-link-value.svelte';
66
export { default as DetailListColumn } from './detail-list-column.svelte';
7+
export { default as DetailListTimestampValue } from './detail-list-timestamp-value.svelte';

src/lib/components/payload-input-with-encoding.svelte

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
<script context="module" lang="ts">
2-
const encoding = ['json/plain', 'json/protobuf'] as const;
3-
export type PayloadInputEncoding = (typeof encoding)[number];
4-
export const isPayloadInputEncodingType = (
5-
x: unknown,
6-
): x is PayloadInputEncoding => encoding.includes(x as PayloadInputEncoding);
7-
</script>
8-
91
<script lang="ts">
10-
import { type Writable } from 'svelte/store';
2+
import type { Writable } from 'svelte/store';
113
124
import Card from '$lib/holocene/card.svelte';
135
import Input from '$lib/holocene/input/input.svelte';
146
import RadioGroup from '$lib/holocene/radio-input/radio-group.svelte';
157
import RadioInput from '$lib/holocene/radio-input/radio-input.svelte';
168
import { translate } from '$lib/i18n/translate';
9+
import type { PayloadInputEncoding } from '$lib/models/payload-encoding';
1710
1811
import PayloadInput from './payload-input.svelte';
1912
@@ -44,7 +37,7 @@
4437
<div class="flex w-full flex-col gap-2">
4538
<RadioGroup
4639
description={translate('workflows.encoding')}
47-
bind:group={encoding}
40+
group={encoding}
4841
name="encoding"
4942
>
5043
<RadioInput id="json/plain" value="json/plain" label="json/plain" />
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<script lang="ts">
2+
import DurationInput from '$lib/holocene/duration-input/duration-input.svelte';
3+
import Input from '$lib/holocene/input/input.svelte';
4+
5+
interface Props {
6+
initialInterval: string;
7+
backoffCoefficient: string;
8+
maximumInterval: string;
9+
maximumAttempts: string;
10+
}
11+
12+
let {
13+
initialInterval = $bindable(),
14+
backoffCoefficient = $bindable(),
15+
maximumAttempts = $bindable(),
16+
maximumInterval = $bindable(),
17+
}: Props = $props();
18+
</script>
19+
20+
<div class="space-y-2">
21+
<DurationInput
22+
label="Initial Interval"
23+
id="initial-interval-input"
24+
bind:value={initialInterval}
25+
/>
26+
<Input
27+
type="number"
28+
label="Backoff Coefficient"
29+
id="backoff-coefficient-input"
30+
bind:value={backoffCoefficient}
31+
/>
32+
<DurationInput
33+
label="Maximum Interval"
34+
id="maximum-interval-input"
35+
bind:value={maximumInterval}
36+
/>
37+
<Input
38+
type="number"
39+
label="Maximum Attempts"
40+
id="maximum-attempts-input"
41+
bind:value={maximumAttempts}
42+
/>
43+
</div>

0 commit comments

Comments
 (0)