-
-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ChatMessage & ChatFeed edit functionality #7559
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7559 +/- ##
==========================================
- Coverage 81.78% 80.75% -1.04%
==========================================
Files 340 340
Lines 51533 51632 +99
==========================================
- Hits 42145 41694 -451
- Misses 9388 9938 +550 ☔ View full report in Codecov by Sentry. |
Needs rebasing. |
user = message_params.get("user", "") | ||
message_params["show_edit_icon"] = ( | ||
bool(self.edit_callback) and | ||
user.lower() not in (self.callback_user.lower(), "help") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user might be None. Type checks are complaining.
@@ -241,16 +247,16 @@ class ChatMessage(Pane): | |||
user = param.Parameter(default="User", doc=""" | |||
Name of the user who sent the message.""") | |||
|
|||
edited = param.Event(doc=""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep parameters alphabetically sorted.
Closes #5761
Useful for editing & re-triggering downstream chat events if necessary
Introduces:
enter_pressed
inChatAreaInput
because it's better than watchingvalue
change and parallelsTextInput
'senter_pressed
show_edit_icon
for the new edit icon that toggles the ChatMessage between original object &ChatAreaInput
; only shows if message is from useredited
for when an edit is submitted in ChatMessageedited
event; if so, calledit_callback
withcontents, index, instance
edit.mp4