Skip to content
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

Scrolling does not work on touch devices in virtualized Tree #2427

Open
1 task done
saskliutas opened this issue Feb 10, 2025 · 5 comments
Open
1 task done

Scrolling does not work on touch devices in virtualized Tree #2427

saskliutas opened this issue Feb 10, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@saskliutas
Copy link
Member

Describe the bug (current behavior)

Scrolling does not work on touch devices (a least on iPad) when virtualization is enabled.

TreeScroll.mov

Disabling virtualization fixes this issue.

Expected Behavior

Scroll should work in both modes: virtualized and non-virtualized.

Link to minimal repro

https://stackblitz.com/edit/github-ua98yj8r-ittcdqhn?file=src%2FApp.tsx

Steps To Reproduce

  1. Open sandbox on iPad
  2. Try scrolling tree.
  3. Tree scrolls only one node at the time.

Some iPads might struggle to run provided stackblitz sandox. In that case clone this repo: https://github.com/saskliutas/itwinui-sandbox/tree/main to run example locally.

Package Version

  • I'm using the latest version of iTwinUI.

Anything else?

I can only test this on iPad so not sure if this is reproducible on all touch devices. Might be reproducible with touch screen laptops but I cannot confirm that.

@r100-stack
Copy link
Member

Thanks for reporting it. I was able to confirm this issue on an iPad simulator. We've added this issue to our backlog.

@mayank99 mayank99 changed the title Scrolling does now work on touch devices in virtualized Tree Scrolling does not work on touch devices in virtualized Tree Feb 13, 2025
@r100-stack
Copy link
Member

We have been discussing about this but think we need some more context. Could you please elaborate a bit more on the following:

  • What percentage of your users are using touch devices?
  • Did any user report this issue? Or this is just something that came out from testing?
  • Any other general context related to your app and why you're using the virtualized Tree?

Also, just to mention, virtualization is something that we consider a beta feature. We will document it better. So some performance issues or some rare issues like this one could be there.

We will try to dive deeper once we have more context.

@grigasp
Copy link
Member

grigasp commented Feb 24, 2025

  • Any other general context related to your app and why you're using the virtualized Tree?

The issue was reported by a mobile app team for the Tree components in @itwin/tree-widget-react package. The trees in that package display data loaded from iModels, and we can get thousands of tree nodes, so virtualization is essential.

@ValdasSorys, can you comment on the other questions?

@ValdasSorys
Copy link

ValdasSorys commented Feb 25, 2025

@r100-stack We use the tree through @itwin/tree-widget-react in our mobile app (so all users use touch devices, Android or iOS, this specific issue I could only reproduce on iOS) to show imodel contents. This was found during testing (released app still uses old version that doesn't have this issue).

@grigasp
Copy link
Member

grigasp commented Feb 25, 2025

released app still uses old version

To avoid confusion I'll note that the old widget version is using ControlledTree for rendering the hierarchy. The new version that has the issue uses iTwinUI Tree component for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants