Repository navigation
feat(web): clear the table and card search from a button in the field, or with Escape - #346
Merged
Merged
Conversation
…, or with Escape Every search box of the table and card toolkit gets a clear button inside the field, shown while it holds text. The button and Escape empty the field, filter again through the same input event as typing, and leave the focus in the field. The browser's own cancel button is hidden so there is one control everywhere.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #345
What
The search box of the table and card toolkit had no clear control of its own: Chromium drew its native cancel button, in its own colour and skipped by Tab.
i-xicon andaria-label="Clear search". It is hidden while the field is empty.inputevent as typing, and leaves the focus in the field. Escape used to clear the field without that event, so a page's own listener did not hear it.Every page that uses the toolkit's search gets it with no change of its own: Runs (All runs), Benchmarks, Agents, Capabilities, Kits, Workspaces (cards and table), Launches and Recipes when they list something, and the builder's Benchmark and Agent steps. The search boxes of Settings, Settings' providers, Data providers, the host picker and Compare's run menu are built apart from the toolkit and are unchanged.
Touches
templates and static (
app/templates/_tables.html,app/static/tables.js,app/static/style.css,app/static/builder/command-builder.css) · testsBefore and after
Verified
A Playwright check in Chromium, an empty profile with one job tree, on Runs (All runs), Benchmarks, Agents, Capabilities, Kits, Workspaces (cards and table) and the builder's Benchmark step, light and dark, at 1280 and 390 px: 32 cases. In each, typing a word from the first item narrows the list and shows the button inside the field; a click empties the field, shows every row or card again, hides the button and leaves the focus in the field; Escape does the same. No page errors.
app/ui_tests/test_tables.py: the button under Node on the toolkit's stand-in DOM: hidden at load, shown while typing, and a click or Escape empties the field, shows every row, hides the button, keeps the focus and is heard by a page's owninputlistener. Fails on upstream/main.app/ui_tests/test_routes.py: Runs, Benchmarks, Agents, Kits and Workspaces render the button, hidden. Fails on upstream/main.python:3.12container with Node:python3 app/tests/parallel.py: 2779 tests in 170 modules, OK.python3 app/tests/parallel.py app/ui_tests: 624 tests in 64 modules, OK.Risk