-
Notifications
You must be signed in to change notification settings - Fork 51
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(ras): allow skipping prerequisites; avoid dead end in onboarding #3738
Conversation
@thomasguillot this could use a design review as well, in case you have any feedback on the "skip"-related UX. |
The checkbox doesn't need to be yellow. I think it's fine to just keep the "radio" button empty. For the confirmation dialogue. Could we get a proper Modal:
|
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.
See #3738 (comment)
Thanks for the feedback, @thomasguillot! I'll amend the PR with those changes before putting this up for code review again. |
@thomasguillot 17a8223 changes the confirmation modal to a true ![]() It also simplifies the same functionality in the campaign setup view to use the same function and component as the other prerequisites. For future reference, this is implemented on the higher order confirmAction(
__( 'Modal title', 'newspack-plugin' ),
__( 'Modal message.', 'newspack-plugin' ),
() => {
// Some function to run when the user confirms
}
); |
@thomasguillot how does this look? 3dbec2d ![]() The HOC's /**
* Build a confirmation modal with the given title & message.
* Execute {callback} if confirmed.
*
* @property {Object} options Options for the confirmation modal.
* @property {string} options.title The title for the modal component.
* @property {string} options.message The message for the modal component body.
* @property {string} options.confirmText The text for the confirmation button.
* @property {string} options.cancelText The text for the cancel button.
* @property {Function} options.callback A function to call if the user confirms the action.
*/
confirmAction = ( options ) => {
const modalOptions = {
title: null,
message: __( 'Are you sure?', 'newpack-plugin' ),
confirmText: __( 'OK', 'newspack-plugin' ),
cancelText: __( 'Cancel', 'newspack-plugin' ),
callback: null,
...options,
}
this.setState( { confirmation: modalOptions } );
} |
@dkoo I prefer it. Thank you very much! ❤️ |
✅ Design |
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.
Oh I didn't see this! Yes, the border needs to be removed |
Whoops, good catch! 06ba10b should fix this: ![]() |
All Submissions:
Changes proposed in this Pull Request:
Allows certain prerequisites in the Audience Management onboarding flow to be skipped if not strictly required. Skipping prerequisites will allow you to enable Audience Management features, and skipped prerequisites can always be completed at a later time.
Also avoids a dead end state in the UI by decoupling the
newspack_reader_activation_enabled
option from the check of whether the default campaign was configured or skipped.How to test the changes in this Pull Request:
Other information: