Skip to content

feat(ResponseActions): added opt-in for hiding actions until interaction#806

Merged
thatblindgeye merged 4 commits intopatternfly:mainfrom
thatblindgeye:iss792_hoverActions
Feb 18, 2026
Merged

feat(ResponseActions): added opt-in for hiding actions until interaction#806
thatblindgeye merged 4 commits intopatternfly:mainfrom
thatblindgeye:iss792_hoverActions

Conversation

@thatblindgeye
Copy link
Collaborator

@thatblindgeye thatblindgeye commented Feb 10, 2026

closes #792

Updated the message actions example to include a Message that has this feature

Comment on lines 158 to 161
// We want to append the tooltip inline so that hovering the tooltip keeps the actions container visible
// when showActionsOnInteraction is true. Otherwise hovering the tooltip causes the actions container
// to disappear but the tooltip will remain visible.
const getTooltipContainer = (): HTMLElement => {
Copy link
Collaborator Author

@thatblindgeye thatblindgeye Feb 10, 2026

Choose a reason for hiding this comment

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

Just to call this out: if we want to for now we could remove this logic and just deal with the visual oddity that occurs, as Gemini has this exact behavior when you try hovering a message action and then hover over the action tooltip (action isn't visible, but the tooltip remains)

@patternfly-build
Copy link

patternfly-build commented Feb 10, 2026


&:hover .pf-m-visible-interaction,
.pf-m-visible-interaction:focus-within {
opacity: 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want any sort of transition token to allow this to fade in/out or anything like that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Yeah! let use pf-t--global--motion--duration--fade--short

@kaylachumley
Copy link

kaylachumley commented Feb 17, 2026

this looks good! actually we could try this token instead for the animation pf-t--global--motion--duration--icon--short

also not sure if it needs a timing function paired with a fade so you could try this pf-t--global--motion--timing-function--default

@thatblindgeye thatblindgeye force-pushed the iss792_hoverActions branch 2 times, most recently from fcb4fa7 to ae49f0e Compare February 17, 2026 19:15
@edonehoo
Copy link
Contributor

edonehoo commented Feb 17, 2026

I think a small note about this would be handy! I also tweaked a couple of things in the existing example description to just make myself happier, which led to this suggestion (if you like it too):

To let users interact with a bot's responses, you can add support for message actions. While you can customize message actions to your needs, default options include the following:

  • Positive and negative feedback: Allows users to rate a message as "good" or "bad."
  • Copy: Allows users to copy the message content to their clipboard.
  • Download: Allows users to download the message content.
  • Listen: Reads the message content out loud using text-to-speech.

You can display message actions by default, or use the showActionsOnInteraction prop to reveal actions on hover or keyboard focus.

Note: The underlying logic for these actions is not built-in and must be implemented within the consuming application.

@thatblindgeye thatblindgeye merged commit 45c7788 into patternfly:main Feb 18, 2026
7 checks passed
@github-actions
Copy link

🎉 This PR is included in version 6.6.0-prerelease.6 🎉

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.

Feature: add variant to reveal message actions on hover/focus

6 participants

Comments