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

Avoid sidebar resize when clicking points #675

Open
kylebarron opened this issue Oct 7, 2024 · 4 comments
Open

Avoid sidebar resize when clicking points #675

kylebarron opened this issue Oct 7, 2024 · 4 comments
Milestone

Comments

@kylebarron
Copy link
Member

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?

@kylebarron
Copy link
Member Author

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 kylebarron added this to the 0.10.1 milestone Oct 7, 2024
@vgeorge
Copy link
Member

vgeorge commented Oct 8, 2024

@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.

resize

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.

kylebarron added a commit that referenced this issue Dec 17, 2024
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
Copy link
Member Author

@vgeorge is this closed by #701?

@vgeorge
Copy link
Member

vgeorge commented Dec 17, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants