From b21fc93e10642ea02b5681738bf7207cfaed3eae Mon Sep 17 00:00:00 2001 From: Christoph Brandau Date: Thu, 17 Sep 2026 23:12:05 +0200 Subject: [PATCH] feat(select-menu): add optionMeta slot and show repo details in create dialog Add an optional optionMeta snippet to SelectMenu to render richer, right-aligned content per option (falls back to option.meta when not provided). Update SelectMenu markup to render optionMeta if present. Style adjustments for .select-menu-option-meta to align items, allow inline SVGs, and preserve spacing/coloring. Use the new slot in CreateReviewDialog: - supply grouped repository options (owner + name) instead of raw names - show a branch icon for each option and a lock icon + last-updated date in the option meta - add helpers repositoryById and formatUpdatedAt to resolve repository data for the meta snippet No breaking changes: legacy option.meta still works when optionMeta is not supplied. --- src/app.css | 4 +++ src/lib/components/CreateReviewDialog.svelte | 31 ++++++++++++++++++-- src/lib/components/SelectMenu.svelte | 9 +++++- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/src/app.css b/src/app.css index f9747e8..cb3f754 100644 --- a/src/app.css +++ b/src/app.css @@ -327,12 +327,16 @@ .select-menu-option:hover .select-menu-option-icon { color: var(--color-accent); } .select-menu-option-icon svg { color: inherit; } .select-menu-option-meta { + display: inline-flex; + align-items: center; + gap: 5px; flex: 0 0 auto; color: var(--color-ink-faint); font-size: 9.5px; font-weight: 650; letter-spacing: 0; } + .select-menu-option-meta svg { color: inherit; } .select-menu-option svg { color: var(--color-primary); } .select-menu-option:hover:not(:disabled), .select-menu-option.active:not(:disabled) { border-color: var(--color-border-subtle); diff --git a/src/lib/components/CreateReviewDialog.svelte b/src/lib/components/CreateReviewDialog.svelte index 04352d5..e0fc748 100644 --- a/src/lib/components/CreateReviewDialog.svelte +++ b/src/lib/components/CreateReviewDialog.svelte @@ -1,7 +1,7 @@