Skip to content
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

feat(surveys): survey results summary #17815

Merged
merged 10 commits into from
Oct 9, 2023
Merged

Conversation

jurajmajerik
Copy link
Contributor

@jurajmajerik jurajmajerik commented Oct 5, 2023

feature flag: surveys-results-visualizations
Implemented a stacked bar showing survey status per user

Screenshot 2023-10-05 at 17 33 18

Edge case - when a sub-bar is too small, the value will overflow. In that case, I don't render the value, but there's always a tooltip available. Happy to hear feedback @corywatilo.

Screenshot 2023-10-05 at 17 34 10

Testing

Manually in the browser.

(SELECT COUNT(DISTINCT person_id)
FROM events
WHERE event = 'survey shown' AND properties.$survey_id = ${props.id}
AND person_id NOT IN (
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can do this subtraction in javascript once you get the three values, will be much faster :) - unless I'm missing a case where this count is different? 🤔

Also, add the timestamp filters like in surveyMetricsQuery :)

Otherwise, looking good!

@liyiy
Copy link
Contributor

liyiy commented Oct 5, 2023

Error state needs to be addressed

Screen Shot 2023-10-05 at 12 24 13 PM

@liyiy
Copy link
Contributor

liyiy commented Oct 5, 2023

  1. I think let's make the bar and numbers a little thicker? It looks a bit thin and the numbers are hard to read because of that, but maybe that's just from the screenshot? :o

  2. It would also be nice to include the absolute numbers of survey shown etc, below the percentage if we have that on hand anyway. Like we make the percentage number a bigger font and then the absolute number beneath it a bit smaller

  3. The primary colors are a bit strong on the eyes... especially the white on bright yellow, but we can address that later on as needed

Copy link
Contributor

@liyiy liyiy left a comment

Choose a reason for hiding this comment

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

Just the above with the error states and points 1+2, otherwise good to merge since it's feature flagged 👍

@corywatilo
Copy link
Contributor

corywatilo commented Oct 5, 2023

Looks pretty good! For the small bars, I was going to suggest just letting the minimum width just be as wide as the number inside of it. But this tooltip option works great too.

I'm having trouble getting the app running right now so I'll just base off the screenshots above:

  • Instead of using the literal color values from the wireframes, let's use the colors we use in insights that match the closest
    image
  • Whole numbers in the bars might work better than percentages. Why don't we use numbers in the bars, then percentages in the legend? Like: • Dismissed (32.1%)
  • Should we say "Viewed" instead of "Seen"? (This will match the metric label above the bar chart a little better)
  • Could also be nice to show the total responses count (value of the green segment) as a metric listed next to the viewed. (Don't need dismissed or abandoned up there since they're not as important, but having total seen and total responses seem like good stats to have up there.)

@jurajmajerik
Copy link
Contributor Author

Feedback incorporated!

Screenshot 2023-10-06 at 13 29 30

@jurajmajerik jurajmajerik merged commit e3bcb76 into master Oct 9, 2023
72 checks passed
@jurajmajerik jurajmajerik deleted the surveys/results-summary branch October 9, 2023 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants