-
Notifications
You must be signed in to change notification settings - Fork 35
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
Avoid sidebar resize when clicking points #675
Comments
I'm also surprised that there's full half-second lag to update the sidebar. It looks like every time you click there's a full map re-render (there's a flash), which is very bad. This is possibly linked to the sidebar resizing if it forces the size of the deck.gl canvas to reset. |
@kylebarron The component re-renders on any view size change, not only when the sidebar resizes. You can confirm this by resizing the browser window without clicking any element. Looking at a Deck.gl example, it doesn’t re-render on window resize, so the issue is very likely in our component implementation and probably existed before the sidebar. We can mitigate it by setting a fixed width to the sidebar, but it will still flash when closed and opened. The delay in showing the sidebar might be related to this. |
Contributes to #586 and #675. Currently, the side panel has a variable width that changes according to the length of the property values, causing layout shifts, occupying too much screen space, and generally providing a suboptimal UI experience. This PR aims to improve that by: - Setting a fixed width of 24rem - Adding a small space (4px) between the tooltip and the map - Truncating property names - Breaking words/lines in property values - Improving scroll behavior Demo, non-scrolled: ![non-scrolled](https://github.com/user-attachments/assets/52856db7-540e-4d01-8cac-9263d5b847b7) Scrolled: ![scrolled](https://github.com/user-attachments/assets/fe8aab9c-6b9f-40b8-b698-2260a31c1db2) @kylebarron can you please review? Co-authored-by: Kyle Barron <[email protected]>
@kylebarron I think so. The sidebar jittering should be gone, although the re-render issue is not fixed by #701 because it is not related to the sidebar implementation. |
Right now there's some jitter when clicking on geometries because the sidebar resizes based on the size of the columns:
Screen.Recording.2024-10-07.at.3.30.29.PM.mov
@vgeorge any thoughts?
The text was updated successfully, but these errors were encountered: