From 8d2e1ad7c2c024affe67ef6db36fc64180e81171 Mon Sep 17 00:00:00 2001 From: Yuliia Pominchuk Date: Wed, 5 Aug 2026 14:36:04 +0200 Subject: [PATCH] fix(editor): Fix the catalog card chrome MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three problems, one of them a real bug. The icon buttons carried `type="tertiary"`, but `N8nIconButton` takes `variant` — `type` fell through to the DOM as an HTML attribute and the buttons rendered in the default solid style. All three actions therefore looked equally primary, and a disabled schedule button looked no different from an enabled one. They are `variant="ghost"` now, so only Run reads as the primary action. The footer put the badges and the buttons on one row. A card is ~280px and the badges alone can fill it, so the buttons were pushed past the card's edge — and because a grid item defaults to `min-width: auto`, a nowrap badge wider than its track dragged the whole card out of its column. The two now stack, and the card may shrink. The next-run badge showed seconds, which are always `00` for a schedule that fires on the minute. Co-Authored-By: Claude Opus 5 (1M context) --- .../src/features/catalog/CatalogView.vue | 141 +++++++++++------- 1 file changed, 83 insertions(+), 58 deletions(-) diff --git a/packages/frontend/editor-ui/src/features/catalog/CatalogView.vue b/packages/frontend/editor-ui/src/features/catalog/CatalogView.vue index cd0f5b8e9bd..bb3192ba2b7 100644 --- a/packages/frontend/editor-ui/src/features/catalog/CatalogView.vue +++ b/packages/frontend/editor-ui/src/features/catalog/CatalogView.vue @@ -161,10 +161,14 @@ const scheduleAction = (entry: CatalogEntry) => { }; }; +/** + * To the minute, not the second. A schedule fires on the minute, so the seconds + * are always `00` — three characters of noise on a badge that has to fit a card. + */ const displayTime = (value: string | null) => { if (!value) return ''; const { date, time } = convertToDisplayDate(value); - return `${date} ${time}`; + return `${date} ${time.slice(0, 'HH:MM'.length)}`; }; /** @@ -291,62 +295,69 @@ const removeSchedule = async (subscription: CatalogSubscription) => { @@ -395,7 +406,7 @@ const removeSchedule = async (subscription: CatalogSubscription) => { { { align-items: stretch; gap: var(--spacing--2xs); + // A grid item defaults to min-width: auto, so a nowrap badge wider than the + // track pushes the card past its column instead of letting the text clip. + min-width: 0; +} + +.footer { + display: flex; + flex-direction: column; + gap: var(--spacing--2xs); + width: 100%; + min-width: 0; } .name { @@ -499,6 +521,9 @@ const removeSchedule = async (subscription: CatalogSubscription) => { .actions { display: flex; align-items: center; + // Right-aligned so the primary action sits where the eye lands last, and the + // two icon buttons read as secondary to it. + justify-content: flex-end; gap: var(--spacing--4xs); }