feat(Messages): added edit action#604
Merged
rebeccaalpert merged 5 commits intopatternfly:mainpatternfly/chatbot:mainfrom Jul 28, 2025
thatblindgeye:iss534_inlineEditMsgthatblindgeye/chatbot:iss534_inlineEditMsgCopy head branch name to clipboard
Merged
feat(Messages): added edit action#604rebeccaalpert merged 5 commits intopatternfly:mainpatternfly/chatbot:mainfrom thatblindgeye:iss534_inlineEditMsgthatblindgeye/chatbot:iss534_inlineEditMsgCopy head branch name to clipboard
rebeccaalpert merged 5 commits intopatternfly:mainpatternfly/chatbot:mainfrom
thatblindgeye:iss534_inlineEditMsgthatblindgeye/chatbot:iss534_inlineEditMsgCopy head branch name to clipboard
Conversation
|
Preview: https://chatbot-pr-chatbot-604.surge.sh A11y report: https://chatbot-pr-chatbot-604-a11y.surge.sh |
rebeccaalpert
suggested changes
Jul 15, 2025
packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessage.tsx
Outdated
Show resolved
Hide resolved
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. |
rebeccaalpert
approved these changes
Jul 16, 2025
edonehoo
reviewed
Jul 16, 2025
|
|
||
| - 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. |
Contributor
There was a problem hiding this comment.
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. |
edonehoo
reviewed
Jul 16, 2025
|
|
||
| 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. |
Contributor
There was a problem hiding this comment.
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!
kaylachumley
requested changes
Jul 16, 2025
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? |
edonehoo
approved these changes
Jul 21, 2025
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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