Greater-London-Authority / ldn-viz-tools

https://greater-london-authority.github.io/ldn-viz-tools/
1 stars 0 forks source link

Fix/sidebar jank #285

Closed ChrisKnightLDN closed 2 months ago

ChrisKnightLDN commented 2 months ago

What does this change? The appshell relies on an innerwidth calculation to position the sidebar, this transitions in the sidebar to display only after innerwidth is not 0 - therefore avoiding 'loading jank'

Why? better ui experience

How? waits for the variable to be dynamically set on initial page load and the transitions in the sidebar

Related issues:

283

Does this introduce new dependencies? no

How is it tested? Storybook

How is it documented? Storybook

Are light and dark themes considered? n/a

Is it complete? y

jamesscottbrown commented 2 months ago

Preview: https://dev.ldn-gis.co.uk/storybook-fix/sidebarJank/?path=/docs/ui-sidebar--documentation

This looks ok.