design-system icon indicating copy to clipboard operation
design-system copied to clipboard

Expose a context/provider to allow access to sidebar state

Open antictor opened this issue 3 years ago • 8 comments

Description

I'm using the sidebar to show menu options and also the application version. It's hard to get the content to fit when in a closed state so it would really help if there was a context that could be used to get the current sidebar state and use that to determine the most appropriate content

antictor avatar May 27 '21 17:05 antictor

@antictor

Could you please provide a real-world example of what you are trying to achieve?

It sounds like you are trying to change the size of the sidebar to account for custom content?

m7kvqbe1 avatar Jun 02 '21 09:06 m7kvqbe1

I'm trying to detect if the sidebar is open or closed so I can change the content it shows to match the size, so the opposite of what you said. In this case when it's open I want to say 'version: 1.0.0' but when it's closed use v1

antictor avatar Jun 15 '21 08:06 antictor

This issue has been marked as stale because it has been open for 60 days with no activity

github-actions[bot] avatar Aug 16 '21 01:08 github-actions[bot]

This issue has been marked as stale because it has been open for 60 days with no activity

github-actions[bot] avatar Nov 08 '21 01:11 github-actions[bot]

@k9dh3zij Can you please cast an eye over this? Is this a misuse of sidebar?

m7kvqbe1 avatar Jan 19 '22 11:01 m7kvqbe1

@m7kvqbe1 @antictor Thanks for checking. I don't think this is a misuse of the sidebar, as we do allow content that adjusts depending on whether the sidebar is open or closed (eg. the classification bar which displays "OFFICIAL SENSITIVE" or "OS" respectively).

However, while it's OK to show a summary when closed, I'd be very careful to ensure the information displayed does not change. For example, "v1" is not a summary of "v1.6.99" and can be misleading (and also makes it potentially more difficult for tech support to explain to a user how to get the correct version; at the end of the day I'd ask "is it still useful to see just 'v1', or should I omit that altogether?"). In the example above, "OS" is a summary of "OFFICIAL SENSITIVE" and acts as a helpful reminder - it doesn't change the essence of "OFFICIAL SENSITIVE".

k9dh3zij avatar Jan 20 '22 10:01 k9dh3zij

This issue has been marked as stale because it has been open for 60 days with no activity

github-actions[bot] avatar Mar 28 '22 01:03 github-actions[bot]

This issue has been marked as stale because it has been open for 60 days with no activity

github-actions[bot] avatar Jul 08 '24 01:07 github-actions[bot]