Repository navigation
feat(Typeahead): Backspace or Delete on the selected Token clears the value - #10847
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 6120af1 |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| PowerSearch | 291.4 kB (+105 B) · 24.2 kB CSS (0) | — | — · — · — |
| Typeahead | 81.6 kB (+94 B) · 12.4 kB CSS (0) | — | ✓ · ✓ · ✓ |
| BaseTypeahead | 72.7 kB (0) · 10.9 kB CSS (0) | — | ✓ · ✓ · ✓ |
1 more component
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| TypeaheadItem | 6.4 kB (0) · 3.6 kB CSS (0) | — | ✓ · ✓ · ✓ |
Package size: @astryxdesign/core 7.25 MB packed (+721 B); no new dependencies.
API changes: none in this pull request
Committed API report behind this build: cli 36 rows, core 36 rows; run pnpm api:report.
Touched components checked; add ci:run-visual or ci:run-rtl to run the full suites.
Current run: CI concluded failure; parts of this report may be missing.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
This pull request needs an owner decision and changes before it can be approved.
Blocking:
- The diff from
mainis 2,252 authored lines, 2,126 of them from #10544's open head, and this pull request is not in a declared stack: land #10544's stack first and rebase ontomainso the diff is the 126-line Typeahead change, or rebase onto the stack's top and add this pull request to every listed pull request's identicalStack:line. BaseTypeahead.menu,BaseTypeahead.handleRef,BaseTypeaheadHandle,BaseTypeaheadMenu,BaseTypeaheadListboxMenuInfoandBaseTypeaheadDialogMenuInfo(BaseTypeahead) are outside this pull request's scope (Typeahead): name them in the scope and get an owner decision, or split them into their own pull request (the rebase above does that).
Approval also waits on an engineering owner's decision about two Typeahead behaviors that no record states at this head: the announcement words "Cleared {label}" (FR12 says only that the announcement names the cleared value), and a closed dialog menu returning focus to the Token's button rather than the input (FR11 defers to BaseTypeahead FR15, which names the input). Stating both in FR12 and FR11 would settle it; an engineering owner then records the decision by commenting /approve-spec <full head SHA> on that head, which the author may do as an engineering owner.
The keyboard change itself works as described: the new tests fail before it and pass after it, and a real-browser check shows the value cleared, focus in the input and the announcement made.
[Automated review]
| // Backspace or Delete on the selected token. With a clear button, it clears | ||
| // the value as that button does and says so in the shared live region. | ||
| // Without one, it starts editing, as a click does. |
There was a problem hiding this comment.
Non-blocking (INV29): this restates the handler below it. Drop it, or keep only the reason, for example: "Matches the clear button, and a click without one."
|
/approve-spec 6120af1 |
|
/approve-spec 11c5cf3 |
There was a problem hiding this comment.
#10847: approve. Backspace or Delete on Typeahead's selected Token now clears the value when the clear button shows (onChange(null), one polite “Cleared {label}”, focus in the empty input) and starts editing when it does not, as the approved component:Typeahead FR12 says; the new tests fail without the change and pass with it, and CI passes.
#10544: approve.
#10624: approve.
#10625: approve.
Whole stack: pass. A pull request lands only when it and every pull request below it are approved, and all four are.
- Optional: the comment at
Typeahead.tsx:625-627restates the handler below it; keep only the reason, or drop it.
[Automated review]
|
/approve-spec 11c5cf3 |
|
/approve-spec 18a6855 |
There was a problem hiding this comment.
Approved pending CI: the heavy suites (build, test, docsite-test) are deferred on this head and have not run yet.
#10847: approve. Backspace or Delete on Typeahead's selected Token now clears the value when the clear button shows (onChange(null), one polite "Cleared {label}", focus in the empty input) and starts editing when it does not, as the approved component:Typeahead FR12 says; the new tests fail without the change and pass with it.
#10544: approve.
#10624: approve.
#10625: approve.
Whole stack: pass. A pull request lands only when it and every pull request below it are approved; all four are, so the stack can land together once CI passes.
- Optional: the comment at
Typeahead.tsx:625-627restates the handler below it; keep only the reason, or drop it.
[Automated review]
18a6855 to
e493038
Compare
|
/approve-spec e493038 |
There was a problem hiding this comment.
Approved pending CI: the heavy suites (build, test, docsite-test) are deferred on this head and have not run yet.
Backspace or Delete on Typeahead's selected Token now clears the value when the clear button shows (onChange(null), one polite "Cleared {label}", focus in the empty input) and starts editing when it does not, as the approved component:Typeahead FR12 says; the new tests fail without the change and pass with it. The pull requests listed below this one in its Stack: line have merged, so it is reviewed on its own.
- Optional: the comment at
Typeahead.tsx:625-627restates the handler below it; keep only the reason, or drop it.
[Automated review]
Stack: #10544 → #10624 → #10625 → #10847
This stack lands bottom-first as a chain: #10544 merged; #10624 next; then #10625 and #10847 rebased on each merge, each with a fresh spec stamp, CodeBunny review and CI.
The top of the menu group's stack: it contains #10625's head (2249839); review only its own commit (Typeahead).
What changes
On a Typeahead with a selected value, the Token's button is the field's Tab stop. Backspace or Delete on that button now acts on the value:
hasClear, the default): it clears the value exactly as the clear button does.onChange(null)fires, a polite announcement says "Cleared {label}" through the shared live region, and focus moves to the empty input. This matches how a Tokenizer token is removed.hasClear: it enters edit mode, as a click on the Token does.Scope
Components: Typeahead. Record:
component:TypeaheadFR12 (added here, with its verification row). New message:@astryx.typeahead.selectionCleared("Cleared {label}").Test plan
Typeahead.test.tsxcases ("Backspace and Delete on the token") failed before the change and pass after it.packages/core/src/Typeaheadandpackages/core/src/Tokenizerunit suites: 447 pass.(Posted by Cindy's agent on her behalf.)