Closed elephantcatdog closed 1 year ago
Name | Link |
---|---|
Latest commit | d8788a1c46df72e4255f7dea300177c2cd6379c2 |
Latest deploy log | https://app.netlify.com/sites/itwinui/deploys/633f045faab32d0008887be1 |
I'm working on the virtualization
Virtualization has been added! I just made it automatic for data sets over 500. I tested out different numbers and the threshhold for slow rendering seems to be a little above here.
Oh! I need to make a PR for css so that it renders correctly.
Update: I made a PR in CSS for this: https://github.com/iTwin/iTwinUI/pull/786
Oh! I need to make a PR for css so that it renders correctly.
Update: I made a PR in CSS for this: iTwin/iTwinUI#786
no, you dont. The example you have provided is semantically incorrect (li
needs to be direct child of ol
).
Please check Combobox
virtualization example, how to achieve virtualization and keep correct semantics.
no, you dont. The example you have provided is semantically incorrect (li needs to be direct child of ol). Please check Combobox virtualization example, how to achieve virtualization and keep correct semantics.
Thanks for the help Vykintas
I had to remove some parts of the keyboard navigation tests for the virtualized timepicker BUT! I fixed the problem with actual keyboard navigation and it works well in storybook. I can come back to this at a later date but I want to push the combined timepicker with virtualization and not have to redo more of the work later please.
Updated visual tests
Keyboard nav is missing esc key functionality but I'm not sure where we could add it as "opened" state is controlled by the user.
It could be done like in Dialog: have a property 'onClose' (and maybe the property 'closeOnEsc' also) that takes a function that closes the component.
I think this can be a new issue though.
Made the issue: https://github.com/iTwin/iTwinUI/issues/855
Don't forget to add issues that was discussed in this PR (eg. test improvements, etc)
Added issue for test improvements: https://github.com/iTwin/iTwinUI/issues/856
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.
I will revert virtualization changes and make an issue for it.
Reverted to before virtualization. Will make a new issue in the morning and consolidate the others I already made.
Visual tests fail because focused time changed position from start to end. To make visual tests more stable you can change scrollIntoView position to center, or start/end.
When I do this, clicking on a new time moves it to the center/end/start. Is that okay? It seems worse than before. I tried to add behavior: 'smooth'
because I thought that at least it would visually scroll, but I can't because this definition of scrollIntoViewOptions
doesn't include behavior
.
When I do this, clicking on a new time moves it to the center/end/start. Is that okay? It seems worse than before. I tried to add
behavior: 'smooth'
because I thought that at least it would visually scroll, but I can't because this definition ofscrollIntoViewOptions
doesn't includebehavior
.
No, leave it as is, just update images. Let's hope it changed because of virtualisation.
nit: I think this got readded
This actually does change the look; I just didn't realize it before.
With div:
Without:
I hijacked the previous bug I filed and changed it to encompass all of virtualized timepicker: https://github.com/iTwin/iTwinUI/issues/856
Adds
useCombinedRenderer
andcombinedRenderer
properties toTimepicker
.useCombinedRenderer
combines the individual time columns into one column.combinedRenderer
allows users to customize the combined column.Some places I think could use some improvement:
return
function I am checking foruseCombinedRenderer
before each column addition so that only the combined column is shown ifuseCombinedRenderer
is true. I wanted to do a ternary, but it seemed like I wouldn't be able to have logical checks (egprecision != 'hours'
) within a set of{}
if it's not at the beginning?precision='seconds'
the reaction speed of the timepicker is noticeable slow. That's also why I have increased the time allowance in some of the tests to50000
ms. This is because I'm iterating through the times a significantly higher amount - 24 hrs 60 mins 60 secs vs the previous 24 hrs + 60 mins + 60 secs. I'm not sure how to alleviate this issue, but I think the relevant code is found in lines 32-54 and 333-391.Notes:
...Renderer
properties toDatepicker
so that users can customize the attachedTimepicker
.hourRenderer
,minuteRenderer
,secondRenderer
, andmeridiemRenderer
from the stories forTimepicker
because they were not visible in the control panel anyway and just appeared as dashes.LabeledInputs
for theTimepicker
stories so that they would show the relevant time precision.precision
property in the control panels of theTimepicker
stories show up as radio multichoice rather than typing it in?Closes #507
Checklist