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: Survey's placeholder customization not showing up #27089

Merged
merged 3 commits into from
Dec 20, 2024

Conversation

lucasheriques
Copy link
Contributor

  • fix survey default value
  • dont check just the first question, check all of them

Problem

Fixes the issue in #26750

Changes

We're only checking the first question to determine wether to show the placeholder option. Instead, check all questions to determine we want to show it.

And also allows an empty string to be set as the placeholder. Before, it always defaults to the default placeholder

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

How did you test this code?

Tested locally in the UI, as it's a bug fix

@lucasheriques lucasheriques changed the title fix survey default value fix: Survey's placeholder customization not showing up Dec 19, 2024
Copy link
Contributor

@dmarticus dmarticus left a comment

Choose a reason for hiding this comment

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

one comment that CI will probably catch for me, otherwise looks great!

@@ -2,8 +2,7 @@ import './EditSurvey.scss'

import { DndContext } from '@dnd-kit/core'
import { SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable'
import { IconInfo } from '@posthog/icons'
import { IconLock, IconPlus, IconTrash } from '@posthog/icons'
import { IconInfo, IconLock, IconPlus, IconTrash } from '@posthog/icons'
Copy link
Contributor

Choose a reason for hiding this comment

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

did you intend to add IconInfo here? I think this might cause CI to yap because we're not using it afaict.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i didn't intend to touch this! but I think what happened here is that my editor combined those two lines when formatting. if you see, ItemInfo was always there, and it's used in the file, but before we were importing it in a separate line

Comment on lines +140 to +144
value={
appearance?.placeholder !== undefined
? appearance.placeholder
: defaultSurveyAppearance.placeholder
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🚀

@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 (wasn't pushed!)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Contributor

github-actions bot commented Dec 19, 2024

Size Change: 0 B

Total Size: 1.11 MB

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

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

  • chromium: 0 added, 1 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.

@lucasheriques lucasheriques force-pushed the fix/survey-placeholder-issue branch from 68f5cd6 to f73cc00 Compare December 20, 2024 03:09
@lucasheriques lucasheriques requested a review from a team December 20, 2024 15:15
@lucasheriques lucasheriques force-pushed the fix/survey-placeholder-issue branch from f73cc00 to bed5419 Compare December 20, 2024 15:17
@marandaneto
Copy link
Member

Noice!

@lucasheriques lucasheriques merged commit 18198bb into master Dec 20, 2024
99 checks passed
@lucasheriques lucasheriques deleted the fix/survey-placeholder-issue branch December 20, 2024 20:04
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