Skip to content

chore(docs): Add demo for canvas - #901

Merged
rebeccaalpert merged 9 commits into
patternfly:mainfrom
rebeccaalpert:canvas
Sep 15, 2026
Merged

rebeccaalpert merged 9 commits into
patternfly:mainfrom
rebeccaalpert:canvas

Conversation

@rebeccaalpert

@rebeccaalpert rebeccaalpert commented Sep 8, 2026

Copy link
Copy Markdown
Member

@patternfly-build

patternfly-build commented Sep 8, 2026

Copy link
Copy Markdown

@rebeccaalpert
rebeccaalpert force-pushed the canvas branch 4 times, most recently from f7a1c15 to 58f59e2 Compare September 9, 2026 18:48

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

Thanks for working on this! This is looking really good. A few notes/adjustments per our discussion from yesterday.

  • Make the "generated by AI" label clickable with a popover that's initiated upon click. Here is a screenshot of the text that needs to be in the popover:
Image
  • I spoke to nicole about where this demo could live for better visibility and we agreed that it would fit nicely under our Patterns section in the left nav. Can you change the section field in the meta data so this lives under patterns?

  • Add in a redo and undo action(icon button) in the code editor toolbar

  • Add in a export icon button in the code editor toolbar

  • Add in a save icon button in the code editor toolbar

  • Add an "x" icon button into the left chatbot header

  • Add in the original history drawer icon button in the chatbot header

  • Add the "Always review AI-generated content prior to use." footnote below the message bar

@rebeccaalpert

rebeccaalpert commented Sep 12, 2026

Copy link
Copy Markdown
Member Author

I'm pushing a commit because it's easier for me to look at here, but I am still working on scoping the styles a little better with the drawerception thing. We are currently a little screwed up. I will work on it some more on Monday.

Also likely want to control focus, but that's complicated by none of the drawer things allowing ref forwarding. May be worth waiting to do that until we can add that in.

@rebeccaalpert
rebeccaalpert force-pushed the canvas branch 3 times, most recently from 4d82fbe to 61f326c Compare September 14, 2026 14:51

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

Some structure/verbiage tweaks below, curious of @kaylachumley thoughts. Essentially was thinking of 1) making the introductory content less specific to only 1 example on the page, since who knows if we'll ever add more, 2) having a specific section for the intended structure, and 3) having a "demos" section like wwe typically would.

Some additional comments/questions:

  • Is there a reason we aren't creating a wrapper component like CanvasDrawer or anything, and instead telling users the classes that need to be used? If we only want to export class names, I think we should include each class name that is needed in a list and provide a short description of its purpose. This could even just be a markdown table that Core uses for its class listing in docs.
  • For the demo, focus should return to the "Message actions" button upon selecting an option. Right noww focus goes back to the top of the page.
  • Same as above but when clicking the Canvas label to close it, focus gets lost until you press Tab. Focus could go back to the MessageBar input at that point, similar to wwhat Gemini does.
  • Having the message stating "The canvas mode text editor is ready..." already rendered in the demo might be okay, but I feel like we should also have something communicating that Canvas mode has been enabled when manually clicking the action from the actions menu.
  • For the Canvas label:
    • The clsoe button aria-label could instead be "Exit canvas mode"
    • The clickable label itself could maybe benefit from "aria-expanded" of true or false, since the Canvas drawer can be "hidden' rather than completely closed
    • When clicking the label to reopen the Canvas drawer, focus should go into the drawer
  • For the Canvas drawer, I'm wondering if the "X" icon + the "Close canvas" is appropriate. With the way the demo is setup, clicking the "X" in the Label is the only way to actually close the canvas; the "X" int he drawer more hides or collapses it. I guess the question is, should Canvas be a binary "enabled"/"disabled" state, or should it be a somewhat quais-tri state like it is in the demo: enabled, disabled, enabled but hidden/not active?

…mples/demos/Canvas.md

Co-authored-by: Eric Olkowski <70952936+thatblindgeye@users.noreply.github.com>
rebeccaalpert and others added 2 commits September 15, 2026 09:11
…mples/demos/Canvas.tsx

Co-authored-by: Eric Olkowski <70952936+thatblindgeye@users.noreply.github.com>

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

LGTM!

@rebeccaalpert
rebeccaalpert merged commit b5b08b9 into patternfly:main Sep 15, 2026
6 checks passed
@github-actions

Copy link
Copy Markdown

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

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.

Build first Canvas mode demo

4 participants