Skip to content

feat(ConversationHistoryNav): Allow support for favorites, tooltips, etc.#653

Merged
rebeccaalpert merged 2 commits intopatternfly:mainfrom
rebeccaalpert:custom-nodes
Aug 25, 2025
Merged

feat(ConversationHistoryNav): Allow support for favorites, tooltips, etc.#653
rebeccaalpert merged 2 commits intopatternfly:mainfrom
rebeccaalpert:custom-nodes

Conversation

@rebeccaalpert
Copy link
Member

@rebeccaalpert rebeccaalpert commented Aug 12, 2025

With pass-through props and swap back to Menu implementation:
Screenshot 2025-08-18 at 4 08 03 PM
Screenshot 2025-08-18 at 4 07 54 PM

@patternfly-build
Copy link

patternfly-build commented Aug 12, 2025

@rebeccaalpert rebeccaalpert force-pushed the custom-nodes branch 4 times, most recently from ccba122 to bb5b171 Compare August 18, 2025 21:34
Revert back to menu implementation and ensure props passage down to appropriate Menu components to enable behavior.
@rebeccaalpert rebeccaalpert changed the title feat(ConversationHistoryNav): Allow support for custom React nodes feat(ConversationHistoryNav): Allow support for favorites, tooltips, etc. Aug 18, 2025
@rebeccaalpert rebeccaalpert marked this pull request as ready for review August 18, 2025 21:36
Copy link
Collaborator

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

File comment below. Overall I'm good with reverting back to the Menu implementation - while IFD findings mentioned a concern about this section of the Chatbot being a menu, I do think it makes sense semantically (it's a list of options/actions you select from). The main reason for moving away from Menu was due to the inline "rename" input ask; since that pivoted to a Modal approach, using Menu should be fine (barring any future asks that may cause issues with using menu roles, but that's a problem for future us).

One thing I think I'd be a little confused about is the "enabling favorites" aspect of the linked issue. Is there a difference that we are (or would) convey between "favoriting" and "pinning" something? Typically the PF component favorite implementations are setup in a way where favoriting something in an example will pin it to the top of the list (exception being Table, but that's within a sortable implementation as well so you can manually sort by favorited or not favorited).

We may just need to tweak some verbiage in the "pin conversations" example since no net new logic was added at a component level - replace instances of "pin" with "favorite" - but just wanted to mention it since we did recently add an example specifically for what is essentially favoriting something (difference being that in the example Melissa bult out, the pin action is inside a kebab vs a dedicated "favorite" button typically seen in Menu examples).

Comment on lines +243 to +248
<MenuGroup
className="pf-chatbot__menu-item-header"
label={navGroup}
key={navGroup}
{...menuGroupProps?.[navGroup]}
>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should default the heading level of the MenuGroups to an H3. From what I can tell it seems like in our examples this is rendered after an H2 "Chat history" heading, so these groups should be sub-sections of that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call-out! All set.

@rebeccaalpert rebeccaalpert merged commit 76eea47 into patternfly:main Aug 25, 2025
7 checks passed
@github-actions
Copy link

🎉 This PR is included in version 6.4.0-prerelease.15 🎉

The release is available on:

Your semantic-release bot 📦🚀

rebeccaalpert added a commit to rebeccaalpert/virtual-assistant that referenced this pull request Oct 24, 2025
…etc. (patternfly#653)

Revert back to menu implementation and ensure props passage down to appropriate Menu components to enable behavior.
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.

Allow chat history to take React nodes with props, as well as Conversation[] or { [key: string]: Conversation[]}

3 participants