Skip to content

Add docked navigation demos - #913

Merged
rebeccaalpert merged 10 commits into
patternfly:mainfrom
gabipodolnikova:feat/fullscreen-docked-nav-demo
Sep 30, 2026
Merged

rebeccaalpert merged 10 commits into
patternfly:mainfrom
gabipodolnikova:feat/fullscreen-docked-nav-demo

Conversation

@gabipodolnikova

@gabipodolnikova gabipodolnikova commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add a Canvas demo with docked navigation.
  • Add a fullscreen ChatBot demo with docked navigation and chat history.
  • The Canvas demo lives under the Canvas pattern page.
  • The fullscreen ChatBot demo lives under the ChatBot extension pages.

Jira

https://redhat.atlassian.net/browse/PF-4634

@patternfly-build

patternfly-build commented Sep 21, 2026 •

Copy link
Copy Markdown

@kaylachumley

Copy link
Copy Markdown

Hey! Is this the right area for the demo? https://chatbot-pr-chatbot-913.surge.sh/extensions/chatbot/overview/demo#fullscreen-chatbot-with-docked-navigation

Im not seeing a docked nav rail? Im also not seeing a canvas demo with a docked nav either.

Note on the icon question you sent on slack: technically both the hamburger bars and the bars with an arrow are correct. If you check out this demo you can see that we added a micro animation that changes the icon on hover to show the user the direction in which the nav or drawer opens. in this case, our history drawer would open on click next to the docked nav rail. The animation is newer since you came back!

@rebeccaalpert

rebeccaalpert commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

@kaylachumley

kaylachumley commented Sep 22, 2026 •

Copy link
Copy Markdown

Looking good! Are we able to add the hamburger menu micro animation? I know you mentioned that having some custom css.. also can we please add a tooltip to the pencil icon in the docked nav on hover? the tooltip to say "New chat". Thank you!!

@gabipodolnikova gabipodolnikova changed the title WIP: Add docked navigation demos Add docked navigation demos Sep 23, 2026

@kaylachumley kaylachumley left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rebeccaalpert rebeccaalpert left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is looking good to me! Thank you. We're missing some functionality from the other Canvas demo - can you take a look to get parity? I think @kaylachumley will want consistency there. We may also want a border around the avatar in the docked nav due to the background color.

Docked nav avatar ChatBot avatar
Screenshot 2026-09-23 at 1 50 03 PM Screenshot 2026-09-23 at 1 50 06 PM

Close button should have tooltip/label:
Image

Popover on label:
Image

Launch canvas from menu/hide Canvas label when closed:
Image

CodeEditor content is different:
Screenshot 2026-09-23 at 1 46 28 PM

I see that Page is required for Hamburger navigations - I think your workaround works. I mentioned this to @mcoker so he is aware.

Logic is different for sending a message between the two Canvas demos as well (original mocks an AI call for Bot response; new demo doesn't).

Comment on lines +88 to +99
.pf-chatbot__canvas-history-toggle.pf-v6-c-button.pf-m-hamburger:is(:hover, :focus-visible) {
--pf-v6-c-button--hamburger-icon--top--path: path("M5,1 L9,1");
--pf-v6-c-button--hamburger-icon--arrow--path: path("M3,7 L1,5 L3,3");
--pf-v6-c-button--hamburger-icon--bottom--path: path("M9,9 L5,9");
--pf-v6-c-button--hover__icon--ScaleX: -1;
--pf-v6-c-button__icon--TransitionDelay: 0s;
--pf-v6-c-button--hover__icon--TransitionDelay: 0s;
}

.pf-chatbot__canvas-history-toggle.pf-v6-c-button.pf-m-hamburger[aria-expanded="true"]:is(:hover, :focus-visible) {
--pf-v6-c-button--hover__icon--ScaleX: 1;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is totally cool. But there are a couple of other ways you could do it.

  1. Use the button component vars here for these values. These will be a little more resistant to breaking changes than using the manual values. Also this will make the arrows work properly in RTL - right now the arrows don't change for RTL. You could use @patternfly/react-tokens instead of hardcoding the vars, but it doesn't look like you're importing that so I don't think it's worth the hassle.
Suggested change
.pf-chatbot__canvas-history-toggle.pf-v6-c-button.pf-m-hamburger:is(:hover, :focus-visible) {
--pf-v6-c-button--hamburger-icon--top--path: path("M5,1 L9,1");
--pf-v6-c-button--hamburger-icon--arrow--path: path("M3,7 L1,5 L3,3");
--pf-v6-c-button--hamburger-icon--bottom--path: path("M9,9 L5,9");
--pf-v6-c-button--hover__icon--ScaleX: -1;
--pf-v6-c-button__icon--TransitionDelay: 0s;
--pf-v6-c-button--hover__icon--TransitionDelay: 0s;
}
.pf-chatbot__canvas-history-toggle.pf-v6-c-button.pf-m-hamburger[aria-expanded="true"]:is(:hover, :focus-visible) {
--pf-v6-c-button--hover__icon--ScaleX: 1;
}
.pf-chatbot__canvas-history-toggle.pf-v6-c-button.pf-m-hamburger:is(:hover, :focus-visible) {
--pf-v6-c-button--hamburger-icon--top--path: var(--pf-v6-c-button--hamburger-icon--top--collapse--path);
--pf-v6-c-button--hamburger-icon--arrow--path: var(--pf-v6-c-button--hamburger-icon--arrow--collapse--path);
--pf-v6-c-button--hamburger-icon--bottom--path: var(--pf-v6-c-button--hamburger-icon--bottom--collapse--path);
--pf-v6-c-button__icon--TransitionDelay: 0s;
--pf-v6-c-button__icon--ScaleX: var(--pf-v6-c-button--m-hamburger__icon--m-expand--ScaleX);
}
.pf-chatbot__canvas-history-toggle.pf-v6-c-button.pf-m-hamburger[aria-expanded="true"]:is(:hover, :focus-visible) {
--pf-v6-c-button__icon--ScaleX: var(--pf-v6-c-button--m-hamburger__icon--m-collapse--ScaleX);
}
  1. Add an event listener for hover/focus/aria-expanded and apply hamburgerVariant="expand" and hamburgerVariant="collapse" as needed. That would be ideal as far as always staying in sync with core, but I realize that might be a little heavy handed for something CSS can do easily.

@mcoker mcoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked out the canvas demo and the fullscreen demo and both lgtm!

@thatblindgeye thatblindgeye left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • When closing the "+" attach menu in the MessageBar via Escape key when a menu option has focus (like the "Alerts" item), focus gets lost/send back to the top of the page. The "+" menu toggle should get focus back.
  • Similar to above, when selecting an option from that attach menu or the "Model" menu, focus should return to the toggle rather than getting lost/sent to the top of the page.
  • The Label in the canvas panel doesnt get triggered via keyboard Space or Enter.
  • The Canvas close button on the right panel doesnt have its tooltip triggered via focus, only hover.
  • When closing the Canvas via the close button in the right panel or via the Label in the MEssageBar, focus gets lost and should return similar to the other Canvas demos (they move focus to the MessageBar input upon closing canvas)
  • The close button in the Settings pane doesnt have a tooltip on hover or focus. Additionally, when clicking that button, focus should return to the "Settings" cog icon button.

From what I can tell the only thing that also applies to the "with code editor" Canvas demo that was previously merged in is the Canvas panel close button doesn't have its tooltip triggered on focus.

Comment on lines +139 to +145
{ id: 'theme', label: 'Theme', field: dropdownField('theme', theme, ['System', 'Light', 'Dark'], setTheme) },
{
id: 'language',
label: 'Language',
field: dropdownField('language', language, ['Auto-detect', 'English'], setLanguage)
},
{ id: 'voice', label: 'Voice', field: dropdownField('voice', voice, ['Bot', 'User'], setVoice) },

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For these 3 menu toggles, the accessible name should end up as "[current selection], [label]". So the Theme menu toggle should have a name of "System, Theme" if "System" is the currently selected option.

Also not sure if we should be using another <label> element for visible text to the left of all these controls. The Switch one is a little odd since the Switch can have its own visible label, but we're opting to not use that in favor of rendering a separate label that still gets tied to it. It's hard to tell with the normal buttons since I dont think there's any onClick handler on them in the demo, but I'd also worry about clicking text that's outside the button triggering the button action (especially for a "Delete all" button).

Could we instead just make the visible text plain text, and if we need to use that text to label a control, use aria-labelledby on the control? The Switch could really just be the only one to do this, since the MenuToggles could use aria-label to create the previously mentioned accessible name, and the buttons dont need any other label since they have visible text.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm so, this is taken from what was already in the repo - Settings.tsx also CompactSettings.tsx. So I can change it, but I'll change those files too. And yes there are no onClick actions now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well...I have not changed anything in Settings and I removed what was reused from it in the demos. I ended up making the row descriptions plain text in these demos so clicking text next to an action button—especially “Delete all”—doesn’t activate it. I kept the shared SettingsForm behavior unchanged so this demo-specific choice doesn’t alter label behavior in there.

@rebeccaalpert
rebeccaalpert merged commit 5948d8f into patternfly:main Sep 30, 2026
6 checks passed
@rebeccaalpert rebeccaalpert linked an issue Sep 30, 2026 that may be closed by this pull request
2 of 6 tasks
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 6.9.0-prerelease.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Chatbot] - Demo with Docked nav support in fullscreen and canvas mode

6 participants