Skip to content
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

feat: Add Autocomplete wrapper for Menu and ListBox #7181

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c33ac96
scaffolding, copied Combobox and renamed to Autocomplete
LFDanLu Oct 9, 2024
a185473
get listbox rendering by default without open state
LFDanLu Oct 9, 2024
e6fa7c1
update intl file and more clean up to get rid of combobox stuff
LFDanLu Oct 10, 2024
61aab83
fix lint
LFDanLu Oct 10, 2024
66fecc8
rough working version of Menu instead of Listbox in autocomplete
LFDanLu Oct 11, 2024
779309b
fix submenu
LFDanLu Oct 11, 2024
78de7f8
Update autocomplete to have the wrapped menu filter itself
LFDanLu Oct 19, 2024
e0f098a
fix keyboard interactions, and clean up
LFDanLu Oct 22, 2024
5914d11
fix menu, add more stories, fix strict
LFDanLu Oct 22, 2024
12480fd
add announcements to menu and various clean up
LFDanLu Oct 22, 2024
ad8942a
update yarn.lock
LFDanLu Oct 22, 2024
70c2d0f
Merge branch 'main' of github.com:adobe/react-spectrum into autocomplete
LFDanLu Oct 22, 2024
9812c3c
get rid of dom node in Autocomplete and fix readOnly bugs
LFDanLu Oct 23, 2024
8478937
fix build failure
LFDanLu Oct 23, 2024
3fbd35f
test against popover experience
LFDanLu Oct 23, 2024
e15d999
fix popover story
LFDanLu Oct 24, 2024
368a677
properly clear aria-activedecendant
LFDanLu Oct 24, 2024
82b3120
cleanup
LFDanLu Oct 24, 2024
423b73c
fix build
LFDanLu Oct 24, 2024
6c498f1
Merge branch 'main' into autocomplete
LFDanLu Oct 28, 2024
fe5bfbe
properly focus trap the autocomplete popover
LFDanLu Oct 29, 2024
477ca7f
update interaction pattern as per discussion
LFDanLu Nov 1, 2024
9a58613
update yarn.lock
LFDanLu Nov 1, 2024
574bd67
dont autofocus if user hasnt typed in the field yet
LFDanLu Nov 5, 2024
ae7a00f
add delay for now to make NVDA announcement better
LFDanLu Nov 5, 2024
7b11c5d
fix lint and scrap custom announcements
LFDanLu Nov 5, 2024
04e8777
intial tests
LFDanLu Nov 6, 2024
79c9064
more tests and fixes to BaseCollection and keyboard interactions from…
LFDanLu Nov 6, 2024
b20b626
fix lint and add RAC test
LFDanLu Nov 7, 2024
28afe21
Merge branch 'main' of github.com:adobe/react-spectrum into autocomplete
LFDanLu Nov 7, 2024
2d0a15f
use MenuSection
LFDanLu Nov 7, 2024
c87a507
(WIP) Refactor autocomplete logic to use custom events to update virt…
LFDanLu Nov 20, 2024
682357f
Merge branch 'main' of github.com:adobe/react-spectrum into autocomplete
LFDanLu Nov 20, 2024
3871e7b
fix lint and test with wrapping Listbox
LFDanLu Nov 21, 2024
e3c3c35
refactor so that we defer to the child input as much as possible for …
LFDanLu Nov 23, 2024
04d9a8b
cleanup
LFDanLu Nov 23, 2024
0757832
fix listbox test
LFDanLu Nov 23, 2024
fd709a2
Merge branch 'main' of github.com:adobe/react-spectrum into autocomplete
LFDanLu Nov 23, 2024
9eede0c
fix build and react 19
LFDanLu Nov 23, 2024
6bd5270
get rid of leftover react 19 testing changes
LFDanLu Nov 25, 2024
150bd7e
clean up some todos
LFDanLu Nov 25, 2024
c13544b
fix listbox listeners not registering
LFDanLu Nov 25, 2024
0d68f68
updating tests and making enter trigger listbox link
LFDanLu Nov 26, 2024
d8c5259
initial review comments
LFDanLu Nov 26, 2024
00f67ad
update tests and remove menu id coercing in favor of user defined ids
LFDanLu Nov 27, 2024
1a26d79
fix lock
LFDanLu Nov 27, 2024
435c6dc
Merge branch 'main' of github.com:adobe/react-spectrum into autocomplete
LFDanLu Nov 27, 2024
df03339
update forward ref for react fast refresh
LFDanLu Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/ar-AE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "مقترحات"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/bg-BG.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Предложения"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/cs-CZ.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Návrhy"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/da-DK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Forslag"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/de-DE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Empfehlungen"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/el-GR.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Προτάσεις"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/en-US.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Suggestions"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/es-ES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Sugerencias"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/et-EE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Soovitused"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/fi-FI.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Ehdotukset"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/fr-FR.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Suggestions"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/he-IL.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "הצעות"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/hr-HR.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Prijedlozi"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/hu-HU.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Javaslatok"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/it-IT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Suggerimenti"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/ja-JP.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "候補"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/ko-KR.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "제안"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/lt-LT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Pasiūlymai"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/lv-LV.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Ieteikumi"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/nb-NO.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Forslag"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/nl-NL.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Suggesties"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/pl-PL.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Sugestie"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/pt-BR.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Sugestões"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/pt-PT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Sugestões"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/ro-RO.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Sugestii"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/ru-RU.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Предложения"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/sk-SK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Návrhy"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/sl-SI.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Predlogi"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/sr-SP.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Predlozi"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/sv-SE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Förslag"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/tr-TR.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Öneriler"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/uk-UA.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "Пропозиції"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "建议"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/intl/zh-TW.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"collectionLabel": "建議"
}
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@
},
"dependencies": {
"@react-aria/combobox": "^3.11.0",
"@react-aria/i18n": "^3.12.3",
"@react-aria/interactions": "^3.22.5",
"@react-aria/listbox": "^3.13.6",
"@react-aria/searchfield": "^3.7.11",
"@react-aria/utils": "^3.26.0",
"@react-stately/autocomplete": "3.0.0-alpha.1",
"@react-stately/combobox": "^3.10.1",
"@react-types/autocomplete": "3.0.0-alpha.27",
"@react-types/button": "^3.10.1",
Expand Down
3 changes: 3 additions & 0 deletions packages/@react-aria/autocomplete/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
* governing permissions and limitations under the License.
*/
export {useSearchAutocomplete} from './useSearchAutocomplete';
export {useAutocomplete} from './useAutocomplete';

export type {AriaSearchAutocompleteOptions, SearchAutocompleteAria} from './useSearchAutocomplete';
export type {AriaSearchAutocompleteProps} from '@react-types/autocomplete';
export type {AriaAutocompleteProps, AriaAutocompleteOptions, AutocompleteAria, CollectionOptions} from './useAutocomplete';
Loading