Skip to content

Commit be0dfce

Browse files
committed
feat: UI improvements & tests
Improves the chat sidebar search component by adding a "search" type to the input for better mobile keyboard support and screen reader accessibility. Also, adds a story to test the focus state of the search input. Introduces new markdown fixtures for storybook.
1 parent 4632deb commit be0dfce

File tree

11 files changed

+1745
-694
lines changed

11 files changed

+1745
-694
lines changed

tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebarSearch.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
<Search
2323
class="text-muted-foreground absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 transform"
2424
/>
25-
<Input bind:value {placeholder} class="pl-10" oninput={handleInput} />
25+
26+
<Input bind:value type="search" {placeholder} class="pl-10" oninput={handleInput} />
2627
</div>

tools/server/webui/src/stories/ChatSidebarSearch.stories.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313

1414
<Story name="Default" args={{ class: 'w-80' }} />
1515

16+
<Story name="Focus" args={{ class: 'w-80' }} play={({ canvasElement }) => {
17+
canvasElement.querySelector('input')?.focus();
18+
}}/>
19+
1620
<Story
1721
name="WithValue"
1822
args={{

0 commit comments

Comments
 (0)