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.
feat: Async loading support for S2 ComboBox/Picker #7938
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: Async loading support for S2 ComboBox/Picker #7938
Changes from all commits
c4ca76d
8ee20f9
c2a1cf9
765b757
7708b81
2da7d04
0bb9f21
0049153
76e1a05
68033b2
54fcbaa
4d3bb6c
f6ba68a
3fe09f6
0b06824
da166f2
0ef52ef
51580d7
76dc08a
27260f4
41a28cb
4fb8aeb
f8b1745
b272469
7a2877c
4c5bc69
5c423d4
fdf423f
711dff6
286d8b8
0938fb9
1eeb798
5fc224f
18c65b2
85b7edb
7f57506
d493fc4
a69a794
4523888
3052001
6a98ac5
6fb2c01
97b21a2
e1bd8f3
d4bec98
7f062b8
561d914
dc6e80a
0c3a3b4
2085f8c
a9b7ea6
f60cbe3
0fa17cc
95beec7
fc193c5
cbd91b5
4a62993
f664da0
85440fc
09825f4
d98691f
f34fc0c
abfcde0
5258d8b
48caf94
379fba7
160e9a0
fac1920
f87438b
7c5f1e8
63db21e
1eb421e
15bc7d1
77b4b62
1bbd69c
bebc44b
9976091
9c51d0d
f7a1e20
53f9158
ebba44e
4755b91
5e8b6ae
e2b8c00
a0b9e5d
cb52f58
112df59
be7d233
69b7db1
3cbb286
923e260
a2049ab
65c2aca
01ead63
3ae8f29
32c3792
1680885
935e439
8bd923f
f4e5f0d
a69f298
67423b2
52e04bc
fb0aff3
f35df51
4637d34
b9e2ad7
875d9a3
9026acb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems fine, certainly more readable than separating it into some other effect and has the benefit of being queued in the same way as the rest of the IntersectionObserver updates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why? is there some event we could hook into instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to specifically fix the tests where the order in which things run (such as when the ref is connected to the ScrollView and when we perform rect measurements) vs how focus is moved by simulated clicks/presses from userEvent was causing odd behaviors (i.e. focus would move to the trigger button -> the dropdown -> back to the button specifically due to the order in which the dropdown becomes available/focusable +
preventFocus
's logic thinking it should then restore focus to the button vs how it happens in the browser with the dropdown becoming available after thatpreventFocus
logic runs).The only way to fix this was to make sure the size of the ScrollView updates in a separate render but within the same act, but ideally the high level flow should be that focus moves to the Picker trigger on click -> all press handling finishes -> collection is fully formed -> dropdown opens and focus moves into it.