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): add support for a 7 point likert scale #1319

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

dmarticus
Copy link
Contributor

@dmarticus dmarticus commented Jul 24, 2024

Changes

New survey behavior

2024-07-24 12 51 32

No backend changes needed, the response is just a number under the hood. Just needed some UI love to support this.

Closes PostHog/posthog#23922

Ships with associated PostHog app changes here: PostHog/posthog#23956

Copy link

vercel bot commented Jul 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Jul 24, 2024 9:07pm

Copy link

github-actions bot commented Jul 24, 2024

Size Change: +303 B (+0.03%)

Total Size: 1.16 MB

Filename Size Change
dist/array.full.js 331 kB +101 B (+0.03%)
dist/surveys-preview.js 59.7 kB +101 B (+0.17%)
dist/surveys.js 64.9 kB +101 B (+0.16%)
ℹ️ View Unchanged
Filename Size
dist/array.js 152 kB
dist/exception-autocapture.js 10.4 kB
dist/main.js 153 kB
dist/module.js 152 kB
dist/recorder-v2.js 110 kB
dist/recorder.js 110 kB
dist/tracing-headers.js 8.26 kB
dist/web-vitals.js 5.79 kB

compressed-size-action

Copy link
Contributor

@Phanatic Phanatic left a comment

Choose a reason for hiding this comment

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

Left a comment for better readability of the ternary condition.

@@ -158,7 +158,14 @@ export function RatingQuestion({
className="rating-options-number"
style={{ gridTemplateColumns: `repeat(${scale - starting + 1}, minmax(0, 1fr))` }}
>
{(question.scale === 5 ? fiveScaleNumbers : tenScaleNumbers).map((number, idx) => {
{(question.scale === 5
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should break this out into a variable. Its pretty confusing to read nested ternary statements here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump minor Bump minor version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature requests: Surveys - Allow scales of 1-7 and 1-10 in addition to 1-5
2 participants