Skip to content

Conversation

Anemy
Copy link
Member

@Anemy Anemy commented Aug 9, 2023

COMPASS-7051

Adds two buttons when there was a successful ai query generation. Submitting the feedback emits a telemetry event with the message.

feedback.example.mp4
Screenshot 2023-08-09 at 2 15 45 PM
light dark
Screenshot 2023-08-09 at 2 15 54 PM Screenshot 2023-08-09 at 2 16 05 PM
Screenshot 2023-08-09 at 2 15 50 PM Screenshot 2023-08-09 at 2 16 10 PM

@github-actions github-actions bot added the feat label Aug 9, 2023
@Anemy Anemy added the feature flagged PRs labeled with this label will not be included in the release notes of the next release label Aug 9, 2023
Copy link
Collaborator

@gribnoysup gribnoysup left a comment

Choose a reason for hiding this comment

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

Generally looks good, but I think we can isolate this form from redux state completely

@gribnoysup
Copy link
Collaborator

Oh, actually, a couple of things I spotted when double-checking locally:

  • When switching top level tabs, the feedback form stays on the screen. Probably another case where we don't unmount something causing this. We can either start unmouting top level tabs (but who knows what code relies on this, hopefully none, but risky) or you can use the same intersection observer behavior we use in other places to handle similar cases

image

  • There doesn't seem to be a way to dismiss the form without submitting, but you can submit an empty response (not sure if that's the expected behavior). On top of that pressing Esc also submits a form and this button should probably be more of an indicator that the form got dismissed instead of submitted?

@Anemy
Copy link
Member Author

Anemy commented Aug 11, 2023

@gribnoysup Thanks for catching the tab switching behavior. Updated it to dismiss when clicked outside. Also updated the component to close with Escape and submit with Enter.

Copy link
Collaborator

@gribnoysup gribnoysup left a comment

Choose a reason for hiding this comment

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

Nice handling of the keyboard events. Two small things I noticed, otherwise looks good

@Anemy Anemy merged commit 0ec535f into main Aug 14, 2023
@Anemy Anemy deleted the COMPASS-7051-add-ai-feedback branch August 14, 2023 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat feature flagged PRs labeled with this label will not be included in the release notes of the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants