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

fix(surveys): fix textarea, and make it easier to query the survey question description in the DOM #1337

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

dmarticus
Copy link
Contributor

@dmarticus dmarticus commented Aug 1, 2024

Changes

Our textarea looked super bad, not sure if it's always been like that but I hate what it looks like now. Reported here: https://posthog.slack.com/archives/C074A08LP1B/p1722508627577449

Before:

image

After:

image

In addition to that change, I also fixed our survey question description selectors. This will help make our survey visual regression tests less flaky. Those changes ship with the posthog changes here:

Checklist

  • Tests for new code (see advice on the tests we use)
  • Accounted for the impact of any changes across different browsers
  • Accounted for backwards compatibility of any changes (no breaking changes in posthog-js!)

Copy link

vercel bot commented Aug 1, 2024

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

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Aug 1, 2024 4:47pm

@dmarticus dmarticus added the bump patch Bump patch version when this PR gets merged label Aug 1, 2024
Copy link

github-actions bot commented Aug 1, 2024

Size Change: +276 B (+0.02%)

Total Size: 1.16 MB

Filename Size Change
dist/array.full.js 333 kB +92 B (+0.03%)
dist/surveys-preview.js 59.6 kB +92 B (+0.15%)
dist/surveys.js 65.7 kB +92 B (+0.14%)
ℹ️ View Unchanged
Filename Size
dist/array.js 154 kB
dist/exception-autocapture.js 10.4 kB
dist/main.js 154 kB
dist/module.js 154 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

@@ -23,7 +23,7 @@ export function QuestionHeader({
<div className="survey-question">{question}</div>
{description &&
renderChildrenAsTextOrHtml({
component: h('div', { className: 'description' }),
component: h('div', { className: 'survey-question-description' }),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

makes our survey question descriptions easier to query in the DOM, see: PostHog/posthog#24143

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.

Ship it

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

Successfully merging this pull request may close these issues.

2 participants