@shipfox/client-triggers 8.0.0 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shipfox/client-triggers",
3
3
  "license": "MIT",
4
- "version": "8.0.0",
4
+ "version": "9.0.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ShipfoxHQ/shipfox.git",
@@ -28,7 +28,7 @@
28
28
  "@swc/helpers": "^0.5.17",
29
29
  "@shipfox/api-triggers-dto": "9.0.2",
30
30
  "@shipfox/client-api": "6.0.1",
31
- "@shipfox/client-shell": "8.0.0",
31
+ "@shipfox/client-shell": "9.0.0",
32
32
  "@shipfox/client-ui": "6.0.2",
33
33
  "@shipfox/integration-icons": "0.2.2",
34
34
  "@shipfox/react-ui": "0.3.7"
@@ -26,8 +26,8 @@ const withRouter: Decorator = (Story) => {
26
26
  function StoryRoute() {
27
27
  return (
28
28
  <RelativeTimeProvider>
29
- <div className="min-h-screen bg-background-subtle-base p-24">
30
- <div className="ml-auto w-[400px]">
29
+ <div className="min-h-screen bg-background-subtle-base p-24 [--app-content-h:calc(100dvh_-_96px)]">
30
+ <div className="@container ml-auto w-[860px]">
31
31
  <Story />
32
32
  </div>
33
33
  </div>
@@ -30,6 +30,8 @@ import {TriggerSourceIcon} from './trigger-source-icon.js';
30
30
 
31
31
  const PANEL_CLASS =
32
32
  'min-h-0 rounded-8 border border-border-neutral-base bg-background-neutral-base';
33
+ const DETAIL_RAIL_CLASS =
34
+ '@min-[820px]:sticky @min-[820px]:top-16 @min-[820px]:max-h-[calc(var(--app-content-h,100dvh_-_96px)_-_32px)] @min-[820px]:min-h-[min(320px,calc(var(--app-content-h,100dvh_-_96px)_-_32px))]';
33
35
 
34
36
  export interface TriggerEventDetailProps {
35
37
  workspaceId: string;
@@ -69,7 +71,7 @@ export function TriggerEventDetailView({
69
71
  return (
70
72
  <aside
71
73
  aria-label="Event details"
72
- className={cn(PANEL_CLASS, 'flex min-h-0 flex-col overflow-hidden')}
74
+ className={cn(PANEL_CLASS, DETAIL_RAIL_CLASS, 'flex min-h-0 flex-col overflow-hidden')}
73
75
  >
74
76
  <div className="flex shrink-0 flex-col gap-12 border-b border-border-neutral-base p-16">
75
77
  <Button
@@ -77,7 +79,7 @@ export function TriggerEventDetailView({
77
79
  variant="transparentMuted"
78
80
  size="sm"
79
81
  iconLeft="arrowLeftLine"
80
- className="self-start min-[900px]:hidden"
82
+ className="self-start @min-[820px]:hidden"
81
83
  onClick={onBack}
82
84
  >
83
85
  Back to events
@@ -118,7 +120,10 @@ export function TriggerEventDetailView({
118
120
  </div>
119
121
  </div>
120
122
 
121
- <div className="flex min-h-0 flex-1 flex-col gap-20 overflow-y-auto p-16 scrollbar">
123
+ <div
124
+ key={event.id}
125
+ className="flex min-h-0 flex-1 flex-col gap-20 overflow-y-auto p-16 scrollbar"
126
+ >
122
127
  <EventRuns workspaceId={workspaceId} event={event} />
123
128
  <EventPayload payload={formattedPayload} />
124
129
  </div>
@@ -140,7 +145,7 @@ function TriggerEventDetailPlaceholder() {
140
145
  aria-label="Event details"
141
146
  className={cn(
142
147
  PANEL_CLASS,
143
- 'hidden min-h-[240px] items-center justify-center p-24 min-[900px]:flex',
148
+ 'hidden min-h-[240px] items-center justify-center p-24 @min-[820px]:flex',
144
149
  )}
145
150
  >
146
151
  <EmptyState icon="pulseLine" variant="compact" title="No event selected" />
@@ -152,14 +157,14 @@ function TriggerEventDetailLoading({onBack}: {onBack: () => void}) {
152
157
  return (
153
158
  <aside
154
159
  aria-label="Event details"
155
- className={cn(PANEL_CLASS, 'flex min-h-[320px] flex-col gap-16 p-16')}
160
+ className={cn(PANEL_CLASS, DETAIL_RAIL_CLASS, 'flex min-h-[320px] flex-col gap-16 p-16')}
156
161
  >
157
162
  <Button
158
163
  type="button"
159
164
  variant="transparentMuted"
160
165
  size="sm"
161
166
  iconLeft="arrowLeftLine"
162
- className="self-start min-[900px]:hidden"
167
+ className="self-start @min-[820px]:hidden"
163
168
  onClick={onBack}
164
169
  >
165
170
  Back to events
@@ -176,13 +181,16 @@ function TriggerEventDetailLoading({onBack}: {onBack: () => void}) {
176
181
 
177
182
  function TriggerEventDetailError({onBack, onRetry}: {onBack: () => void; onRetry: () => void}) {
178
183
  return (
179
- <aside aria-label="Event details" className={cn(PANEL_CLASS, 'flex flex-col gap-16 p-16')}>
184
+ <aside
185
+ aria-label="Event details"
186
+ className={cn(PANEL_CLASS, DETAIL_RAIL_CLASS, 'flex min-h-[320px] flex-col gap-16 p-16')}
187
+ >
180
188
  <Button
181
189
  type="button"
182
190
  variant="transparentMuted"
183
191
  size="sm"
184
192
  iconLeft="arrowLeftLine"
185
- className="self-start min-[900px]:hidden"
193
+ className="self-start @min-[820px]:hidden"
186
194
  onClick={onBack}
187
195
  >
188
196
  Back to events
@@ -293,15 +301,15 @@ function EventPayload({payload}: {payload: string}) {
293
301
  </Text>
294
302
  <CodeBlock
295
303
  data={data}
296
- className="flex h-auto max-h-[min(360px,45vh)] flex-col rounded-8 bg-background-contrast-base shadow-none"
304
+ className="flex h-auto flex-col overflow-visible rounded-8 bg-background-contrast-base shadow-none"
297
305
  >
298
- <CodeBlockHeader className="shrink-0 border-b border-border-contrast-base bg-background-contrast-base px-10 py-6">
306
+ <CodeBlockHeader className="sticky top-0 z-10 shrink-0 border-b border-border-contrast-base bg-background-contrast-base px-10 py-6">
299
307
  <CodeBlockFiles>
300
308
  {(item) => <CodeBlockFilename value={item.filename}>{item.filename}</CodeBlockFilename>}
301
309
  </CodeBlockFiles>
302
310
  <CodeBlockCopyButton />
303
311
  </CodeBlockHeader>
304
- <CodeBlockBody className="min-h-0 overflow-auto scrollbar">
312
+ <CodeBlockBody className="min-h-0 scrollbar">
305
313
  {(item) => (
306
314
  <CodeBlockItem
307
315
  value={item.filename}
@@ -37,7 +37,10 @@ export function EventsPage({workspaceId, filters, onFiltersChange}: EventsPagePr
37
37
 
38
38
  return (
39
39
  <RelativeTimeProvider>
40
- <section className="flex min-w-0 flex-col gap-16" aria-labelledby="trigger-events-heading">
40
+ <section
41
+ className="@container flex min-w-0 flex-col gap-16"
42
+ aria-labelledby="trigger-events-heading"
43
+ >
41
44
  <div className="flex flex-col gap-4">
42
45
  <Header id="trigger-events-heading" variant="h3">
43
46
  Events
@@ -48,8 +51,8 @@ export function EventsPage({workspaceId, filters, onFiltersChange}: EventsPagePr
48
51
  </Text>
49
52
  </div>
50
53
 
51
- <div className="grid min-h-0 gap-16 min-[900px]:grid-cols-[minmax(0,1fr)_minmax(360px,420px)]">
52
- <div className={cn('min-w-0', selectedEventId && 'max-[899px]:hidden')}>
54
+ <div className="grid min-h-0 items-start gap-16 @min-[820px]:grid-cols-[minmax(0,1fr)_minmax(360px,420px)]">
55
+ <div className={cn('min-w-0', selectedEventId && '@max-[820px]:hidden')}>
53
56
  <EventsList
54
57
  events={events}
55
58
  query={query}