Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

feat(Messages): added edit action#604

Merged
rebeccaalpert merged 5 commits intopatternfly:mainpatternfly/chatbot:mainfrom
thatblindgeye:iss534_inlineEditMsgthatblindgeye/chatbot:iss534_inlineEditMsgCopy head branch name to clipboard
Jul 28, 2025
Merged

feat(Messages): added edit action#604
rebeccaalpert merged 5 commits intopatternfly:mainpatternfly/chatbot:mainfrom
thatblindgeye:iss534_inlineEditMsgthatblindgeye/chatbot:iss534_inlineEditMsgCopy head branch name to clipboard

Conversation

@thatblindgeye
Copy link
Collaborator

Closes #534

Design issue mentioend a group fo actions (copy and edit), but the chatbot issue only mentioned adding the edit action so went that route.

Originally was going to add logic to prevent an edit action being applied for a "bot" message, but since all these actions need to be manually added in that's probably redundant.

Also let me know fi how I setup the Markdown file is fine - originally was going to add the "edit" action to the "Message actions" example, but since it seemed like most examples were Bot related and I didn't want to have us convey that "you can have Bot messages be editable" (but still allow it).

@patternfly-build
Copy link

patternfly-build commented Jul 15, 2025

Copy link
Member

@rebeccaalpert rebeccaalpert left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! Only real comment is that it looks like we're using a different icon - I think Kayla wanted PencilAltIcon instead.

Screenshot 2025-07-15 at 1 09 56 PM

@thatblindgeye
Copy link
Collaborator Author

@rebeccaalpert @edonehoo updated per feedback above. Also added a little more logic + verbiage in the example for moving focus around when enabling and completing/canceling editing.


- Feedback responses that allow users to rate a message as "good" or "bad".
- Copy and share controls that allow users to share the message content with others.
- An edit action to allow users to edit a message they previously sent. This should only be applied to user messages - see the [user messages example](#user-messages) for details on how to implement this action.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- An edit action to allow users to edit a message they previously sent. This should only be applied to user messages - see the [user messages example](#user-messages) for details on how to implement this action.
- An edit action to allow users to edit a message they previously sent. This should only be applied to user messages: see the [user messages example](#user-messages) for implementation details.


Messages from users have a different background color to differentiate them from bot messages. You can also display a custom avatar that is uploaded by the user. You can further customize the avatar by applying an additional class or passing [PatternFly avatar props](/components/avatar) to the `<Message>` component via `avatarProps`.

User messages can also be made editable by passing an "edit" object to the `actions` property. Note that when editing is enabled focus should be placed on the text area, and when editing is completed or canceled the focus should be moved back to the edit button.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
User messages can also be made editable by passing an "edit" object to the `actions` property. Note that when editing is enabled focus should be placed on the text area, and when editing is completed or canceled the focus should be moved back to the edit button.
User messages can also be made editable by passing an "edit" object to the `actions` property. When editing is enabled focus should be placed on the text area. When editing is completed or canceled the focus should be moved back to the edit button.

small tweaks, but content looks great in general!

packages/module/src/Message/MessageInput.tsx Outdated Show resolved Hide resolved
@thatblindgeye thatblindgeye requested a review from edonehoo July 16, 2025 15:27
Copy link

@kaylachumley kaylachumley left a comment

Choose a reason for hiding this comment

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

one small thing! looks like when the edit action is clicked/active, the icon is floating below the update and cancel action list. I think we should remove the icon when its clicked and just have the update and cancel actions

Screenshot 2025-07-16 at 2 11 22 PM

@thatblindgeye
Copy link
Collaborator Author

@kaylachumley would we want the edit button to not be visible/rendered as part of chatbot logic, or should that be up to the consumer to hook up the logic?

Copy link

@kaylachumley kaylachumley left a comment

Choose a reason for hiding this comment

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

🫵🪨

@rebeccaalpert rebeccaalpert merged commit 3a1bda0 into patternfly:main Jul 28, 2025
7 checks passed
rebeccaalpert pushed a commit to rebeccaalpert/virtual-assistant that referenced this pull request Oct 24, 2025
Adds new response action for edit, as well as a demo for how to hook up "edit a message" functionality in an accessible way.

Co-authored-by: Eric Olkowski <git.eric@thatblindgeye.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inline edit message trigger

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.