lonboard icon indicating copy to clipboard operation
lonboard copied to clipboard

Avoid sidebar re-render when clicking points

Open kylebarron opened this issue 1 year ago • 4 comments

Right now there's some jitter when clicking on geometries because the sidebar resizes based on the size of the columns:

https://github.com/user-attachments/assets/03155387-ff27-4d6b-ae2d-7eb5c44679b8

@vgeorge any thoughts?

kylebarron avatar Oct 07 '24 19:10 kylebarron

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 avatar Oct 07 '24 19:10 kylebarron

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

vgeorge avatar Oct 08 '24 13:10 vgeorge

@vgeorge is this closed by #701?

kylebarron avatar Dec 17 '24 17:12 kylebarron

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

vgeorge avatar Dec 17 '24 17:12 vgeorge