Greater-London-Authority / ldn-viz-tools

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

Flexible sidebar #216

Closed jamesscottbrown closed 6 months ago

jamesscottbrown commented 7 months ago

What does this change?

Why?

How?

Related issues:

Does this introduce new dependencies?

How is it tested?

How is it documented?

Are light and dark themes considered?

Is it complete?

jamesscottbrown commented 7 months ago

This enables sidebars containing tab icons.

It has two types of sidebar headings: SidebarAppHeader for app headings with the blue flash, and SidebarHeader that matches the header in Figma.

image

image

jamesscottbrown commented 7 months ago

Preview: https://dev.ldn-gis.co.uk/storybook-flexible-sidebar/?path=/docs/ldn-viz-introduction--documentation

Preview of the components that go inside the sidebar: https://dev.ldn-gis.co.uk/storybook-flexible-sidebar/?path=/story/ui-sidebarelements-sidebarappheader--with-description-and-more-info

mikeldn commented 6 months ago

image

mikeldn commented 6 months ago

Sidebar toggle (custom icon) not showing a different icon in docs, so a bit confusing?!?

image

ChrisKnightLDN commented 6 months ago
  • Horizontal Siderbar Tabs in Storybook docs, aren't showing as Horizontal.
  • Selected tab state not correct by default in strory
  • Icon placement within tabs is different between Horz & Vert Tabs.

This was due to the use of context within the component. I have updated the story to use a context wrapper to reflect this.

ChrisKnightLDN commented 6 months ago

Sidebar toggle (custom icon) not showing a different icon in docs, so a bit confusing?!?

This was also due to context that is provided by the sidebar component - therefore absent in the story where the component is isolated. I have updated the story to provide the context that the functionality requires.