-
Notifications
You must be signed in to change notification settings - Fork 7
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
👍👎 for UI feedback #1004
👍👎 for UI feedback #1004
Conversation
Add RESPONSE_RATING tag category and implement add_rating and rating methods
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
Additional details and impacted files📢 Thoughts on this report? Let us know! |
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.
looks great-- only blocking comment is the clarifying text for the icons
hx-swap="outerHTML" | ||
hx-target="#rating-{{message.id}}" | ||
class="text-sm p-1 rounded-md hover:bg-gray-50"> | ||
👍 |
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.
add in a title to indicate what the icon means-- in chatgpt they have "good response" which I think it pretty clear
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.
Good idea, I'll add. 85d5c5d
hx-target="#rating-{{message.id}}" | ||
class="text-sm p-1 rounded-md hover:bg-gray-50"> | ||
👎 | ||
</button> |
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.
same here but for "bad response"
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.
|
||
|
||
def rate_message(request, team_slug: str, message_id: int, rating: str): | ||
if rating not in ["👍", "👎"]: |
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.
will we have any issues with these emojis being updated/modified?
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.
I doubt it. I haven't encountered any so far
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.
wondering if we should use the html encodings or not 👍
👎
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.
These emoji's are part of unicode, which should make it fine to include as-is? Or am I missing something?
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.
The main concern if are we sure that all of our users are on environments that support Unicode emojis? I know there are some older software so I wonder if we should error on the safe side
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.
we can circle back on this in a future convo
is_system_tag=False, | ||
category=TagCategories.RESPONSE_RATING, | ||
) | ||
self.add_tag(tag, team=self.chat.team, added_by=None) |
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.
I like having the participant being anonymous, but then having the added_by=None feels not intuitive along with some of the filtering-- I'm curious if rather than a category if you considered going the route of a is_system_tag
that would also open the possibly of more participant guided tags in the future (which I think was discussed vaguely but perhaps not)-- either approach works just bringing up the idea
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.
Good question. I did consider the system tag route, but I think we should keep it reserved for cases where the server created the tag and added it to a message, with no human intervention. I agree that we can and should improve the meaning of system tag vs user tag vs participant tag. I think let's keep things as-is for now until we have a clearer solution to this. A mini spec might do.
There are two fundamental questions to answer:
- Who created this tag?
- Who added this tag to this message?
For the most part question 2 is the most interesting one for users I'd imagine. As for determining this, we could do it either at the application layer or DB layer. In the latter case, we can have a flag or something on the CustomTaggedItem
model to indicate which entity added this to the message i.e. user/system/participant.
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.
@coderabbitai please create a ticket for this.
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.
@SmittieC Thanks for confirming. It looks like your new ticket (#1006) has been created successfully. Let me know if there’s anything else!
🔗 Analysis chain
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
gh issue create \
--title "Clarify participant vs system vs user tags in chat messages" \
--body $'We need to improve the meaning of system tag vs user tag vs participant tag, specifically regarding who created and who added the tag to a message.\n\nFollow-up conversation:\n1) Who created this tag?\n2) Who added this tag?\n\nPR: https://github.com/dimagi/open-chat-studio/pull/1004\nComment: https://github.com/dimagi/open-chat-studio/pull/1004#discussion_r1890334694\nRequested by: @SmittieC' \
--assignee SmittieC
Length of output: 559
Resolves #927
Description
User Impact
All participants can give 👍👎 feedback in the UI
Demo
Docs