Open elephantcatdog opened 1 year ago
Previous issue description:
// 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)'The activeElement in the document is the body.
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: https://github.com/iTwin/iTwinUI-react/pull/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.