mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-24 06:39:33 +01:00
feat(mobile): search the case picker
The phone case sheet listed every case with no way to narrow it, while the desktop toolbar combobox has filtered for a while. The sheet now carries a search field that runs the same matcher (filterCasePickerOptions), so both pickers answer a query identically: every term has to appear in the option's searchText, which already carries the name, the rendered label, the path and the remote/docker fields. Details worth keeping: - The filter resets on every open. The sheet is a one-shot picker, and a leftover query would present a truncated list as the whole one. - No autofocus. Focusing raises the keyboard over a sheet anchored to the bottom of the screen, so the user asks for it. - The sheet is a third position:fixed bottom-anchored surface, so it joins the toolbar and the accessory bar in KeyboardHandler's keyboard lift. iOS does not shrink the layout viewport, so an unlifted sheet would sit behind the keyboard with its own search box out of sight. resetLayout() clears the offset unscoped, or a sheet closed while the keyboard was up would slide in already displaced next time. - Enter takes a single remaining match and otherwise just dismisses the keyboard; Escape drops the filter before it closes the sheet. - No match renders an empty state rather than a blank sheet. - The clear button needs an explicit [hidden] rule: the UA's display:none is specificity (0,0,0) and loses to the button's own display:flex. - The input drops the global input:focus-visible ring, which inside an already bordered row drew a second border a few pixels in. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
88e3faa456
commit
8e4606c57b
6 files changed
+237
-20
No files matched your search
@@ -692,11 +692,9 @@
|
||||
<button class="btn-toolbar btn-enter" onclick="app.sendEnterKey()" title="Send Enter">
|
||||
Enter
|
||||
</button>
|
||||
<div class="tab-count-group" title="Instance count">
|
||||
<button class="tab-count-btn" onclick="app.decrementShellCount()">−</button>
|
||||
<input type="number" id="shellCount" class="tab-count-input" value="1" min="1" max="20" readonly>
|
||||
<button class="tab-count-btn" onclick="app.incrementShellCount()">+</button>
|
||||
</div>
|
||||
<!-- Run Shell had a second, identical instance-count stepper here. The
|
||||
toolbar carried two of them side by side, so it is gone and Run
|
||||
Shell reads the one above (#tabCount) like the Run button does. -->
|
||||
<div class="case-select-group">
|
||||
<div class="case-combobox" id="quickStartCasePicker">
|
||||
<input
|
||||
@@ -3017,6 +3015,33 @@
|
||||
<h3>Select Case</h3>
|
||||
<button class="modal-close" onclick="app.closeMobileCasePicker()" aria-label="Close case picker">×</button>
|
||||
</div>
|
||||
<!-- Search: the desktop toolbar has had a filtering combobox for a while
|
||||
(#quickStartCaseSearch); this is the same matcher on the phone sheet,
|
||||
where a long case list is otherwise a long scroll. -->
|
||||
<div class="mobile-case-picker-search">
|
||||
<span class="mobile-case-search-icon" aria-hidden="true">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<circle cx="11" cy="11" r="7"/><line x1="21" y1="21" x2="16.65" y2="16.65"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input
|
||||
type="search"
|
||||
id="mobileCaseSearch"
|
||||
class="mobile-case-search-input"
|
||||
placeholder="Search cases"
|
||||
aria-label="Search cases"
|
||||
aria-controls="mobileCaseList"
|
||||
autocomplete="off"
|
||||
autocapitalize="none"
|
||||
autocorrect="off"
|
||||
spellcheck="false"
|
||||
enterkeyhint="search"
|
||||
oninput="app.filterMobileCaseList()"
|
||||
onkeydown="app.handleMobileCaseSearchKeydown(event)"
|
||||
>
|
||||
<button type="button" class="mobile-case-search-clear" id="mobileCaseSearchClear"
|
||||
onclick="app.clearMobileCaseSearch()" aria-label="Clear search" hidden>×</button>
|
||||
</div>
|
||||
<div class="mobile-case-picker-body">
|
||||
<div class="mobile-case-list" id="mobileCaseList">
|
||||
<!-- Cases populated by JS -->
|
||||
|
||||
Reference in new issue
Block a user