Greater-London-Authority / ldn-viz-tools

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

Hide sidebar toggle without forcing always open state #369

Open PaulioRandall opened 1 week ago

PaulioRandall commented 1 week ago

Is your feature request related to a problem? Please describe.

There is no way to hide the <Sidebar> toggle so that it's open state is always controlled indirectly. See planning-sites app.

Describe the solution you'd like

Replace sidebarAlwaysOpen property with hideToggle. Hiding the toggle achieves the objective of sidebarAlwaysOpen but also allows indirect sidebar opening and closing via other user interactions or state changes.

Describe alternatives you've considered

A toggle slot could be provided with the standard toggle as default. An empty div <div slot="toggle" /> can be passed to hide the toggle without affecting other parts of the sidebar. This solution would allow other types of toggles to be used if a use case arises.