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): added a customizable submit button text color #24170

Merged
merged 8 commits into from
Aug 5, 2024

Conversation

dmarticus
Copy link
Contributor

Hospitable asked for this, and it was super easy to do. Feels worth it.

Ships with the posthog-js changes here: PostHog/posthog-js#1339

Video demo: https://www.loom.com/share/07e3409daded4bf4908442286a88b009?sid=a7c6d250-bb82-4ce0-905c-cc89a7d20716

<LemonInput
value={appearance?.placeholder || defaultSurveyAppearance.placeholder}
onChange={(placeholder) => onAppearanceChange({ ...appearance, placeholder })}
disabled={!surveysStylingAvailable}
/>
</>
)}
<div className="mt-2">
<div className="mt-4">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

noticed that the customization elements seemed too crowded; added a little space here to let the different parts breathe.

Before:
image

After:
image

{surveyQuestionItem.type === SurveyQuestionType.Open && (
<>
<div className="mt-2">Placeholder</div>
<div className="mt-2">Placeholder text</div>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

imo this is clearer than just saying "Placeholder"

@@ -164,6 +164,7 @@ const surveyActionsMapping: Record<
backgroundColor: 'background color',
submitButtonColor: 'submit button color',
submitButtonText: 'submit button text',
submitButtonTextColor: 'submit button text color',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

added to the activity log

@@ -32,6 +32,7 @@ export const SurveyUrlMatchTypeLabels = {
export const defaultSurveyAppearance = {
backgroundColor: '#eeeded',
submitButtonColor: 'black',
submitButtonTextColor: 'white',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

default

Copy link
Contributor

github-actions bot commented Aug 2, 2024

Size Change: 0 B

Total Size: 1.07 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.07 MB

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

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.

Looks good, ship it

@dmarticus dmarticus enabled auto-merge (squash) August 5, 2024 18:49
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@dmarticus dmarticus merged commit 6b17c9c into master Aug 5, 2024
92 checks passed
@dmarticus dmarticus deleted the feat/modify-submit-button-text-for-surveys branch August 5, 2024 19:25
silentninja pushed a commit to silentninja/posthog that referenced this pull request Aug 8, 2024
…#24170)

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
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.

3 participants