Repository navigation
feat(Tokenizer): forward BaseTypeahead's menu, onOpenChange and open handle #10624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cixzhang
wants to merge
27
commits into
main
Choose a base branch
from
feat/tokenizer-menu
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,507
−347
Open
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
15dd368
feat(BaseTypeahead): a menu config with listbox and dialog roles, and…
cixzhang 2d4bded
fix(BaseTypeahead): the dialog role runs through usePopover; only ope…
cixzhang fd768d0
fix(BaseTypeahead): a dialog's focus return does not reopen the list;…
cixzhang ca5dc7f
fix(BaseTypeahead): focus return tied to the trap; the opener read at…
cixzhang 91f2921
feat(Tokenizer): forward BaseTypeahead's menu, onOpenChange and open …
cixzhang 3e96725
Merge #10544 (DEC-2 record) into the Tokenizer layer
cixzhang 265a3f2
docs(BaseTypeahead): record DEC-2, no controlRef on TextInput
cixzhang 863f6fa
Merge feat/typeahead-menu (main) into feat/tokenizer-menu
cixzhang b216a2b
Merge main into feat/typeahead-menu
cixzhang 944e86f
review(Tokenizer): focus guards read the shared tracker and the menu'…
cixzhang 9716e63
fix(Tokenizer): the menu returns to a pressed token, and a token's co…
cixzhang 8135090
fix(Tokenizer): keep the pressed token through the press's blur; use …
cixzhang f74d44d
fix(Tokenizer): record the token control only while its click passes …
cixzhang 29b4b0d
fix(Tokenizer): end the token-control record with the click's task
cixzhang 82a3e3e
refactor(Typeahead): pass Tokenizer's focus wiring through an interna…
cixzhang 4bbbc22
test(BaseTypeahead): wait for the active option before Enter picks it
cixzhang 778c472
Merge #10544's spec wait into the Tokenizer layer
cixzhang a4faf6f
fix(Typeahead): a closed dialog menu returns focus to the token, not …
cixzhang 49a6e14
Merge #10544's Typeahead focus-return fix into the Tokenizer layer
cixzhang 8c593c0
fix(Typeahead): return a closed dialog menu's focus to the token at t…
cixzhang 3a17bfd
Merge #10544's restore-point focus fix into the Tokenizer layer
cixzhang 1f58a0e
test(BaseTypeahead): every pick flow in the menu spec waits for the a…
cixzhang ff4d67a
Merge #10544's spec waits into the Tokenizer layer
cixzhang 910d188
test(BaseTypeahead): make the spec's poll callbacks async; end the ch…
cixzhang 8aa37d5
Merge #10544's lint fix into the Tokenizer layer
cixzhang e26f00e
Merge main (7f45363bd4) into feat/typeahead-menu
cixzhang 9f908c0
Merge #10544 (with main) into the Tokenizer layer
cixzhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [feat] Tokenizer forwards BaseTypeahead's `menu` and `onOpenChange` in its inline presentation, and its handle gains `open()` and `close()`. A token whose own button calls `open()` with a dialog-role menu opens the dialog, and Escape returns focus to that token: focus that a press puts on a token's control, and the menu's focus return, stay there instead of moving to the input. The sheet presentation keeps its own sheet. | ||
|
|
||
| @cixzhang | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [feat] BaseTypeahead takes `menu`, which chooses what its anchored menu shows while Astryx keeps the layer: its position, top layer, outside press, Escape, focus return and ARIA. `{role: 'listbox', render}` places information such as a header or a key hint around the result list, and anything a person acts on stays a result, so the arrow keys reach it (a control outside the list warns in development). `{role: 'dialog', label, render}` shows content that takes focus in a dialog named by `label`; closing it returns focus to the element focused when it opened, or to the input. A new `handleRef` exposes `open()` and `close()`, and `onOpenChange` reports each change; there is no controlled open state. Calling `open()` from `onChange` keeps the menu open, so a pick can switch the list to a dialog on the same layer. Typeahead forwards `menu` and `handleRef`. | ||
|
|
||
| @cixzhang |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.