Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose a context/provider to allow access to sidebar state #2397

Open
antictor opened this issue May 27, 2021 · 7 comments
Open

Expose a context/provider to allow access to sidebar state #2397

antictor opened this issue May 27, 2021 · 7 comments
Labels
Package: react-component-library Package/code type Size: Small Assessed as small task Type: Enhancement New feature or request

Comments

@antictor
Copy link
Contributor

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

@m7kvqbe1
Copy link
Member

m7kvqbe1 commented Jun 2, 2021

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

@elglup elglup added Status: Awaiting triage Issues not yet triaged by the Design System cra-template-royalnavy Status: Needs discussion Issue requires discussion before it can be progressed and removed Needs Discussion labels Jun 4, 2021
@hxltrhuxze hxltrhuxze removed the Status: Awaiting triage Issues not yet triaged by the Design System cra-template-royalnavy label Jun 9, 2021
@antictor
Copy link
Contributor Author

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

@hxltrhuxze hxltrhuxze added Status: Needs more detail Issue requires more detail before it can be progressed and removed Status: Needs discussion Issue requires discussion before it can be progressed labels Jun 16, 2021
@github-actions
Copy link

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

@github-actions github-actions bot added the Status: Stale Issue with no activity for the past 60 days label Aug 16, 2021
@k9dh3zij k9dh3zij removed Status: Stale Issue with no activity for the past 60 days Status: Needs more detail Issue requires more detail before it can be progressed labels Sep 8, 2021
@github-actions
Copy link

github-actions bot commented Nov 8, 2021

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

@github-actions github-actions bot added the Status: Stale Issue with no activity for the past 60 days label Nov 8, 2021
@m7kvqbe1
Copy link
Member

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

@m7kvqbe1 m7kvqbe1 added Status: Needs discussion Issue requires discussion before it can be progressed Package: react-component-library Package/code type and removed Status: Stale Issue with no activity for the past 60 days labels Jan 19, 2022
@m7kvqbe1 m7kvqbe1 added this to Ideas in Tactical Board Jan 19, 2022
@k9dh3zij
Copy link

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

@github-actions
Copy link

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

@github-actions github-actions bot added the Status: Stale Issue with no activity for the past 60 days label Mar 28, 2022
@m7kvqbe1 m7kvqbe1 moved this from Ideas to Candidates for Ready in Tactical Board Mar 25, 2024
@markhigham markhigham added the Type: Bug Inconsistencies or issues which have caused a problem for users or implementors label Apr 5, 2024
@markhigham markhigham added Size: Small Assessed as small task and removed Status: Stale Issue with no activity for the past 60 days Status: Needs discussion Issue requires discussion before it can be progressed Type: Enhancement New feature or request labels Apr 5, 2024
@m7kvqbe1 m7kvqbe1 moved this from Candidates for Ready to Ready in Tactical Board May 8, 2024
@m7kvqbe1 m7kvqbe1 added Type: Enhancement New feature or request and removed Type: Bug Inconsistencies or issues which have caused a problem for users or implementors labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: react-component-library Package/code type Size: Small Assessed as small task Type: Enhancement New feature or request
Projects
Development

No branches or pull requests

6 participants