-
Notifications
You must be signed in to change notification settings - Fork 17
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
[HOLD] feat: default segments #809
Conversation
…h a click Starts the "reasonable defaults" part of the roadmap. Allows site admins to generate a set of default segments with a button click. If they've already been created and edited, clicking the button will restore the default segments to the default configuration. #674
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for requiring some kind of user action (in this case a button click) is to accommodate sites that may have been up and running with Campaigns for a while now—we don't want to automatically generate new segments which may conflict with existing segments that are running live prompts.
What if there are no segments on the site – should defaults be set up then? This would be a surprise in the "Campaigns" tab, but there would be no disruption to the existing campaigns setup. WDYT @dkoo @aschweigert ?
I can get behind this. Maybe if there are no segments AND no active prompts? This would avoid creating confusion for sites that may have active prompts running for "everyone" and don't intend to use the segmentation features. EDIT: further, we could trigger the auto-generation when you navigate to the Campaigns wizard, this way we could show a short message explaining what happened. And if a site admin never visits Campaigns, we don't need to run the extra functions. |
@adekbadek I pushed some changes to address your feedback. I think the auto-generation we're discussing can probably live in the main plugin if we trigger it upon rendering the Campaigns wizard. |
], | ||
], | ||
'everyone_else' => [ | ||
'name' => __( ' Other Readers', 'newspack-popups' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: there are extra leading spaces in the segments names:
'name' => __( ' Other Readers', 'newspack-popups' ), | |
'name' => __( 'Other Readers', 'newspack-popups' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, fixed in 86337ae.
Adding the default segments won't disrupt their prompt delivery in any way, and I think the user should be encouraged to make use of segmentation. So I'd say the defaults should be created if there are no segments, regardless of whether there are prompts.
Seems to me it'd be simpler to create the default segments on WP initialisation, without the extra API call. But it's not a strong opinion. |
a315d73 implements the auto-generation if the site doesn't have any segments. |
Note to @thomasguillot: after some discussion we've decided we'd like to build this out into a more guided onboarding/wizard experience to guide users toward one of several sets of default segments, based on their input. @aschweigert will work on a suggested flow for this, but let's hold these changes until we can flesh that out a bit more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving in the current state – as noted above it's likely to change, though.
After some internal discussion we're going to be moving in a different direction for this. I'm going to close this for now—we can reopen if we change our minds about wanting to release it as an interim step. |
All Submissions:
Changes proposed in this Pull Request:
Starts the "reasonable defaults" part of the roadmap. Allows site admins to generate a set of default segments with a button click. If they've already been created and edited, clicking the button will restore the default segments to the default configuration.
The reason for requiring some kind of user action (in this case a button click) is to accommodate sites that may have been up and running with Campaigns for a while now—we don't want to automatically generate new segments which may conflict with existing segments that are running live prompts.
Closes #673.
How to test the changes in this Pull Request:
Before testing, make sure your Newspack Plugin is running Automattic/newspack-plugin#1524.
Other information: