Skip to content

Feedback utility functions #5088

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

Open
wants to merge 3 commits into
base: unstable
Choose a base branch
from

Conversation

akolson
Copy link
Member

@akolson akolson commented Jun 6, 2025

Summary

This pr does the following;

  • Implements the feedback UI you to collect feedback about search recommendations.
  • Adds events to track, added, rejected, previewed and ignored recommendations.

References

#5057
#5058

Reviewer guidance

  • import from other channels
  • Interact with recommendations
  • Feedback should be submitted correctly and there should be no regressions.
  • Ensure that recommendations are stored in successfully. You may need to shell into the models to determine that storage is happening in the RecommendationsEvent and RecommendationsInteractionEvent models

Copy link
Member

@ozer550 ozer550 left a comment

Choose a reason for hiding this comment

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

Logically, everything in the code makes sense! Just a few small tweaks and some debugging is needed to resolve the UI issues encountered during testing. Additionally, I have a few thoughts on potential optimizations we could explore further.

},
submitRejectedRecommendationFeedback() {
const rejectedEvent = new RecommendationsInteractionEvent({
recommendation_event_id: this.recommendationsEvent.id,
Copy link
Member

Choose a reason for hiding this comment

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

We are missing contentnode_id, content_id, context and feedback_type field here.

feedback_type: FeedbackTypeOptions.ignored,
feedback_reason: '',
});
sendRequest(ignoredEvent);
Copy link
Member

Choose a reason for hiding this comment

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

It seems that we are currently sending a separate RecommendationsInteractionFeedback event for each "ignored" node. It might be better to send a single object that contains all the ignored node information, or at least consider batching or debouncing these requests.

Even if a user imports just 2 or 3 nodes on average, we end up generating a large number of these events, since other nodes are marked as ignored for each session.

This may not be something that needs to be addressed in this PR, as it could require some backend changes as well. I'm just thinking out loud here about potential optimizations we could explore.

<KIconButton
icon="thumbDown"
:tooltip="$tr('markNotRelevantTooltip')"
@click.stop="markNotRelevant"
Copy link
Member

@ozer550 ozer550 Jun 9, 2025

Choose a reason for hiding this comment

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

It seems like there is an error stating URL is not defined for the FeedBack Object at RecommendationsInteractionEvent.getUrl while testing the thumbs down button, this is probably due to my last PR setting the value export const RECOMMENDATION_INTERACTION_EVENT_URL = urls['recommendations-interaction']; in feedbackApiUtils.js.

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.

2 participants