Skip to content

Commit

Permalink
Add some padding to json view and don't include status filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Tideman committed Sep 20, 2024
1 parent 3dd591e commit 6cbb6fa
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 24 deletions.
4 changes: 3 additions & 1 deletion src/lib/components/event/event-summary.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@
<div
class="flex w-full flex-col items-center justify-end gap-4 px-4 lg:flex-row"
>
<EventStatusFilter />
{#if $eventViewType !== 'json'}
<EventStatusFilter />
{/if}
<EventTypeFilter {compact} />
</div>
</div>
Expand Down
48 changes: 25 additions & 23 deletions src/lib/components/workflow/workflow-json-navigator.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -79,34 +79,36 @@
</div>
<slot name="decode" />
</div>
{#if $decodeEventHistory}
{#key [index, $decodeEventHistory]}
<PayloadDecoder
value={fromEventToRawEvent(events[index - 1])}
let:decodedValue
>
<div class="py-4">
{#if $decodeEventHistory}
{#key [index, $decodeEventHistory]}
<PayloadDecoder
value={fromEventToRawEvent(events[index - 1])}
let:decodedValue
>
<CodeBlock
content={decodedValue}
testId="event-history-json"
copyIconTitle={translate('common.copy-icon-title')}
copySuccessIconTitle={translate('common.copy-success-icon-title')}
/>
</PayloadDecoder>
{/key}
{:else}
{#key index}
<CodeBlock
content={decodedValue}
content={stringifyWithBigInt(
fromEventToRawEvent(events[index - 1]),
undefined,
2,
)}
testId="event-history-json"
copyIconTitle={translate('common.copy-icon-title')}
copySuccessIconTitle={translate('common.copy-success-icon-title')}
/>
</PayloadDecoder>
{/key}
{:else}
{#key index}
<CodeBlock
content={stringifyWithBigInt(
fromEventToRawEvent(events[index - 1]),
undefined,
2,
)}
testId="event-history-json"
copyIconTitle={translate('common.copy-icon-title')}
copySuccessIconTitle={translate('common.copy-success-icon-title')}
/>
{/key}
{/if}
{/key}
{/if}
</div>

<style lang="postcss">
.caret {
Expand Down

0 comments on commit 6cbb6fa

Please sign in to comment.