You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The combined timepicker needs to have virtualization added as it's very slow to open and respond because of the amount of data/times in the dropdown.
I started this, and the work I did is copied onto the branch leah/customize-time-picker-copy-with-virtualization. [Update: This branch might be on the iTwinUI-react project instead of this one, iTwinUI.] There were quite a few problems I encountered when doing the virtualization. Most of them should be documented on the combined timepicker column PR: iTwin/iTwinUI-react#844
The lines expect(document.activeElement).toEqual(selectedTime); in TimePicker.test.tsx do not work with the virtualization. I made an issue previously about this, but removed it and consolidated that into this issue. The text of that issue is a comment on this issue.
Also mentioned in the previous issue - it would be nice if the tests for the virtualized timepicker were integration tests instead of mocked tests. I tried to do this initially but couldn't get it to work.
The problem that stopped work on virtualization was scrolling. Mouse, trackpad, and keyboard arrow keys - none allowed scrolling past the selected item unless you scrolled really hard and continuously; eventually you can get unstuck, but... that's not a solution. There is more info about this in the the PR.
Another problem I found is that if the selected time is not 'visible' in the DOM, pressing tab from the menu will not allow you to enter the time dropdown. (ie scroll so that selected time is not visible, then trying to tab to it does not work because apparently unselected times are not allowed to be tabbed to)
The text was updated successfully, but these errors were encountered:
Uncomment the commented out lines // expect(document.activeElement).toEqual(selectedTime); found in two tests 'should navigate with keyboard in combined renderer' and 'should navigate with keyboard in combined renderer (12 hours)'
Run tests
Actual behavior
The activeElement in the document is the body.
Expected behavior
The activeElement in the document should be the selected time.
The related tests for the regular version of the timepicker ('should navigate with keyboard' and 'should navigate with keyboard (12 hours)') work for this test. This part of the test failing doesn't seem to indicate any actual problems with the component, as far as I can tell, though. Maybe it's not important? [UPDATE: I now think this might be related to the scrolling problem]
Also, it'd be nice if the tests for the combined/virtualized timepicker were integrated tests rather than mocked tests. I tried to do this initially and it didn't work out.
The combined timepicker needs to have virtualization added as it's very slow to open and respond because of the amount of data/times in the dropdown.
I started this, and the work I did is copied onto the branch
leah/customize-time-picker-copy-with-virtualization
. [Update: This branch might be on the iTwinUI-react project instead of this one, iTwinUI.] There were quite a few problems I encountered when doing the virtualization. Most of them should be documented on the combined timepicker column PR: iTwin/iTwinUI-react#844A related issue I made is Escape keyboard functionality in TimePicker and DatePicker
Notes about the problems I was facing:
expect(document.activeElement).toEqual(selectedTime);
inTimePicker.test.tsx
do not work with the virtualization. I made an issue previously about this, but removed it and consolidated that into this issue. The text of that issue is a comment on this issue.The text was updated successfully, but these errors were encountered: