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

[enhancement]: UIShell/HeaderContainer with multiple expandable panels #14630

Open
1 task done
Tracked by #16296
lukas-kasticky opened this issue Sep 11, 2023 · 3 comments
Open
1 task done
Tracked by #16296

Comments

@lukas-kasticky
Copy link

Question for Carbon

Hi IBMer's,

UIShell/HeaderContainer has isSideNavExpanded and onClickSideNavExpand to control the sidenav/left-panel or the switcher/right-panel. The example containing both only implements the expand-logic of the side nav. How would I create a UI shell that uses two expandable panels? Am I supposed to implement my own version of HeaderContainer or is there a better way to go about this?

Thanks & have a nice day

Code of Conduct

@lukas-kasticky
Copy link
Author

As far as I can tell, carbondesignsystem.com itself uses the community maintained gatsby-theme-carbon, which implements this multi-expandable-panel behaviour in the Layout.js component where LeftNav, Switcher and Header aren't wrapped in a HeaderContainer. They all use NavContext.js instead. Are there maybe less complicated examples I could look into before I start hacking away?

@andreancardona andreancardona changed the title [Question]: UIShell/HeaderContainer with multiple expandable panels [enhancement]: UIShell/HeaderContainer with multiple expandable panels Sep 18, 2023
@tw15egan
Copy link
Member

@lukas-kasticky I see what you mean, it seems like we need to add isRightPanel / onRightPanelClick props added to HeaderContainer. Example of the issue when trying to use isSideNavExpanded for both: https://stackblitz.com/edit/github-9gaz77?file=src%2FApp.jsx

@lukas-kasticky
Copy link
Author

lukas-kasticky commented Sep 18, 2023

Exactly, or an array of isFooExpandeds and onClickFooExpands which would come in handy with #5152, where i mentioned this issue.

@sstrubberg sstrubberg added this to the 2023 Q4 milestone Nov 1, 2023
@sstrubberg sstrubberg modified the milestones: 2023 Q4, 2024 Q1 Jan 9, 2024
@sstrubberg sstrubberg removed this from the 2024 Q1 milestone Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Later 🧊
Development

No branches or pull requests

4 participants