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

Surveys: Can't remove user targeting options without setting rollout #22186

Open
3 tasks
corywatilo opened this issue May 8, 2024 · 0 comments
Open
3 tasks
Labels

Comments

@corywatilo
Copy link
Contributor

corywatilo commented May 8, 2024

Bug Description

Bug description

Can't save a survey if you've opened user targeting but not set any properties inside it. Clicking the save button doesn't do anything because of a hidden validation error.

Use case: I wanted to target users, but realized I needed to create a cohort first. So I wanted to save my work, go to another section, then come back.

First, I looked for a trash can icon to remove the first user property I didn't complete. (This should exist.) After not finding this, I clicked the Remove all user properties button.

The default state for the rollout form has no value set. (We should default this to something!) As a result of no value being set and this form now hidden (since I removed user properties), the page can't be submitted due to the validation error.

Loom demo

How to reproduce

  1. Create a survey
  2. Click Add user targeting
  3. Click Remove all user properties
  4. Try to save the form (which won't save)

Additional context

There are several things we could/should change here:

  • Default roll out to... to some default value (don't show error message by default)
  • If above is done, this should solve the original issue. If we don't do this, the user property should actually be destroyed, not just hidden from the UI
  • Add option to remove an individual user property (trash can icon next to duplicate icon)

Debug info

- [X] PostHog Cloud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant