Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Refactor feedback component #606

Merged
merged 2 commits into from
Oct 9, 2023
Merged

Refactor feedback component #606

merged 2 commits into from
Oct 9, 2023

Conversation

chriswhong
Copy link
Contributor

@chriswhong chriswhong commented Sep 15, 2023

Overhauls the Feedback component, introducing a simpler UX:

  • Prompts with a simple question "Was this [content type] helpful? Yes/No"
  • Text entry is not required unless the user selects "Another reason" (users can easily submit simple feedback with 3 clicks)
  • Text input is not shown until the user selects the categoryType.
  • Segment events are simplified, there is one when the user first clicks Yes or No, and one when they submit.
  • UI is simplified, there is no longer a close button, and no link to support. Internal state is simplified as well since we no longer need to track these items.
image image

@chriswhong chriswhong marked this pull request as ready for review October 9, 2023 17:46
@chriswhong chriswhong changed the title wip: refactoring feedback component Refactor feedback component Oct 9, 2023
Copy link
Contributor

@AlexanderBelokon AlexanderBelokon left a comment

Choose a reason for hiding this comment

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

Awesome! Looks a lot less intimidating in terms of required text fields, and decisions on first steps also feel easier 🚀

One thing I do miss is the ability to go back if I clicked Yes instead of No or vice versa, but I guess this is mostly useful for testing, not so much for actual users

For reference, this is how it looked before:

image

});

// click Yes
const btn = feedback.find('button').first();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is relying on the order of buttons a safe practice? The usefulness of the comment above suggests that code itself is not specific enough to be understandable on its own.

Would finding the button by label text instead be more robust (and more similar to how a real person would look for it)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I will fix this and push a commit.

src/components/feedback/components/icons.js Show resolved Hide resolved
@chriswhong chriswhong merged commit e7ea1a6 into main Oct 9, 2023
4 checks passed
@chriswhong chriswhong deleted the improve-feedback branch October 9, 2023 21:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants