-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: add virtualization to S2 combobox and picker #8110
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
Changes from 41 commits
27260f4
f8b1745
b272469
7a2877c
5c423d4
fdf423f
711dff6
286d8b8
0938fb9
5fc224f
18c65b2
85b7edb
7f57506
d493fc4
a69a794
4523888
3052001
7f062b8
0c3a3b4
85440fc
48caf94
379fba7
160e9a0
fac1920
77b4b62
1bbd69c
bebc44b
9976091
9c51d0d
ebba44e
cb52f58
112df59
3cbb286
923e260
01ead63
3ae8f29
dd0a3f7
c5ddd4d
08437c7
2ba7e3d
cabcf11
6b45081
ad58e65
176868a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,6 +143,7 @@ describe('SearchAutocomplete', function () { | |
user = userEvent.setup({delay: null, pointerMap}); | ||
jest.spyOn(window.HTMLElement.prototype, 'clientWidth', 'get').mockImplementation(() => 1000); | ||
jest.spyOn(window.HTMLElement.prototype, 'clientHeight', 'get').mockImplementation(() => 1000); | ||
jest.spyOn(window.HTMLElement.prototype, 'scrollHeight', 'get').mockImplementation(() => 50); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this going to be problematic for users of v3 in their own tests? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably something we'd like to call out but we also we have this section in are docs where we do mock the scrollHeight for virtualized components There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just my 2 cents, would be good to call out in the release notes. Just spent some time trying to figure out why one of my Picker tests were failing and it turned out it also needed this scrollHeight mock lol |
||
window.HTMLElement.prototype.scrollIntoView = jest.fn(); | ||
simulateDesktop(); | ||
jest.useFakeTimers(); | ||
|
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.
should this wrap the below scrollIntoViewport as well? Not sure if the order is going to matter. Might be a good idea to clean up the raf as well
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.
maybe it would be good to test it without and see if it needs it?
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.
did some quick testing and haven't found any weirdness so ok for now. We can test more during the testing session