From 0b1c537f7ace6a526a27fee712c3934303cdbe3f Mon Sep 17 00:00:00 2001 From: Tyom Semonov Date: Sun, 22 Feb 2026 13:39:51 +0000 Subject: [PATCH 1/5] feat: add missing input elements to showcase modal and fix input styling Add static_select, multi_static_select, file_input, and multiline plain_text_input to the /showcase modal command. Fix inconsistent text input heights (h-8 vs py-2) and add spacing between modal form fields. --- .../src/listeners/commands/showcase.ts | 91 +++++++++++++++++++ apps/ui/src/components/ModalOverlay.svelte | 8 +- .../blockkit/elements/EmailInput.svelte | 2 +- .../blockkit/elements/UrlInput.svelte | 2 +- 4 files changed, 100 insertions(+), 3 deletions(-) diff --git a/apps/showcase-bot/src/listeners/commands/showcase.ts b/apps/showcase-bot/src/listeners/commands/showcase.ts index 7df4069..c6b6ecb 100644 --- a/apps/showcase-bot/src/listeners/commands/showcase.ts +++ b/apps/showcase-bot/src/listeners/commands/showcase.ts @@ -228,6 +228,97 @@ export function register(app: App) { ], }, }, + { + type: 'input', + label: { type: 'plain_text', text: 'Department' }, + element: { + type: 'static_select', + action_id: 'showcase_modal_department', + placeholder: { + type: 'plain_text', + text: 'Select a department', + }, + options: [ + { + text: { type: 'plain_text', text: 'Engineering' }, + value: 'engineering', + }, + { + text: { type: 'plain_text', text: 'Design' }, + value: 'design', + }, + { + text: { type: 'plain_text', text: 'Marketing' }, + value: 'marketing', + }, + { + text: { type: 'plain_text', text: 'Sales' }, + value: 'sales', + }, + ], + }, + }, + { + type: 'input', + label: { type: 'plain_text', text: 'Skills' }, + element: { + type: 'multi_static_select', + action_id: 'showcase_modal_skills', + placeholder: { + type: 'plain_text', + text: 'Select your skills', + }, + options: [ + { + text: { type: 'plain_text', text: 'JavaScript' }, + value: 'javascript', + }, + { + text: { type: 'plain_text', text: 'TypeScript' }, + value: 'typescript', + }, + { + text: { type: 'plain_text', text: 'Python' }, + value: 'python', + }, + { + text: { type: 'plain_text', text: 'Rust' }, + value: 'rust', + }, + { + text: { type: 'plain_text', text: 'Go' }, + value: 'go', + }, + ], + }, + }, + { + type: 'input', + label: { type: 'plain_text', text: 'Attachments' }, + element: { + type: 'file_input', + action_id: 'showcase_modal_attachments', + max_files: 3, + }, + }, + { + type: 'input', + label: { type: 'plain_text', text: 'Additional Notes' }, + hint: { + type: 'plain_text', + text: 'Any extra details or comments', + }, + optional: true, + element: { + type: 'plain_text_input', + action_id: 'showcase_modal_notes', + multiline: true, + placeholder: { + type: 'plain_text', + text: 'Enter any additional notes here...', + }, + }, + }, ], }, }) diff --git a/apps/ui/src/components/ModalOverlay.svelte b/apps/ui/src/components/ModalOverlay.svelte index 0f9f992..0583665 100644 --- a/apps/ui/src/components/ModalOverlay.svelte +++ b/apps/ui/src/components/ModalOverlay.svelte @@ -339,7 +339,7 @@ -
+ {/if} + + diff --git a/apps/ui/src/components/blockkit/elements/EmailInput.svelte b/apps/ui/src/components/blockkit/elements/EmailInput.svelte index 92dbd2f..cf50d75 100644 --- a/apps/ui/src/components/blockkit/elements/EmailInput.svelte +++ b/apps/ui/src/components/blockkit/elements/EmailInput.svelte @@ -18,7 +18,7 @@ onChange?.(e.currentTarget.value)} diff --git a/apps/ui/src/components/blockkit/elements/UrlInput.svelte b/apps/ui/src/components/blockkit/elements/UrlInput.svelte index fdd8155..6421f55 100644 --- a/apps/ui/src/components/blockkit/elements/UrlInput.svelte +++ b/apps/ui/src/components/blockkit/elements/UrlInput.svelte @@ -18,7 +18,7 @@ onChange?.(e.currentTarget.value)} From 449dec2301bbb93b045753886da50bc2171f265c Mon Sep 17 00:00:00 2001 From: Tyom Semonov Date: Sun, 22 Feb 2026 14:05:25 +0000 Subject: [PATCH 2/5] fix: improve modal and input styling to match real Slack - Make input labels bold, bright, and clickable to focus their field - Update button styles: outlined secondary, solid primary/danger - Add global cursor:pointer on buttons - Show bot avatar icon in modal header - Show header border only when content is scrolled - Pass botId through view_open SSE event to UI --- apps/ui/src/app.css | 4 ++ apps/ui/src/components/Message.svelte | 4 +- apps/ui/src/components/ModalOverlay.svelte | 50 ++++++++++++++++--- .../blockkit/blocks/InputBlock.svelte | 12 ++++- .../blockkit/elements/Button.svelte | 21 ++++---- apps/ui/src/lib/dispatcher.svelte.ts | 2 +- apps/ui/src/lib/state.svelte.ts | 1 + apps/ui/src/lib/state/bots.svelte.ts | 8 ++- packages/slack/src/server/state.ts | 1 + 9 files changed, 81 insertions(+), 22 deletions(-) diff --git a/apps/ui/src/app.css b/apps/ui/src/app.css index 8520868..56e0cdf 100644 --- a/apps/ui/src/app.css +++ b/apps/ui/src/app.css @@ -3,6 +3,10 @@ @custom-variant dark (&:where(.dark, .dark *)); +button { + cursor: pointer; +} + @theme inline { /* Typography */ --font-sans: diff --git a/apps/ui/src/components/Message.svelte b/apps/ui/src/components/Message.svelte index 0dd9e15..8515aed 100644 --- a/apps/ui/src/components/Message.svelte +++ b/apps/ui/src/components/Message.svelte @@ -354,9 +354,7 @@
{#if isEphemeral}
- import { X } from '@lucide/svelte' + import { X, Sparkles } from '@lucide/svelte' import { simulatorState } from '../lib/state.svelte' import { submitView, @@ -41,6 +41,16 @@ // Track whether the user has attempted to submit (enables live revalidation) let hasSubmitted = $state(false) + // Track whether modal content is scrolled + let contentScrolled = $state(false) + + // Look up the bot that opened the modal + const modalBot = $derived.by(() => { + const botId = simulatorState.activeModal?.botId + if (!botId) return undefined + return simulatorState.connectedBots.get(botId) + }) + /** * Extract initial values from modal blocks to pre-populate formValues */ @@ -148,6 +158,7 @@ fileFormValues = {} validationErrors = {} hasSubmitted = false + contentScrolled = false } }) @@ -324,9 +335,31 @@ >
- @@ -370,7 +408,7 @@ {#if modal.view.submit} diff --git a/apps/ui/src/components/blockkit/blocks/InputBlock.svelte b/apps/ui/src/components/blockkit/blocks/InputBlock.svelte index ef23d4a..03214c2 100644 --- a/apps/ui/src/components/blockkit/blocks/InputBlock.svelte +++ b/apps/ui/src/components/blockkit/blocks/InputBlock.svelte @@ -87,7 +87,17 @@
{#if block.element.type !== 'file_input'} -