-
Notifications
You must be signed in to change notification settings - Fork 800
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
SSO: Add custom message to new user email #35395
SSO: Add custom message to new user email #35395
Conversation
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped. Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Great! Works for me, @agrullon95 👍 |
public function jetpack_users_new_form_styles() { | ||
?> | ||
<style> | ||
#createuser .form-field textarea { | ||
width: 25em; | ||
} | ||
</style> | ||
<?php | ||
} |
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.
This works! I wonder if we could leverage jetpack-sso-admin-create-user.css
, enqueued by render_invitation_email_message
when in user-new
?
Maybe with a different wording we could use that function to add the Notice and enqueue all the CSS for that page.
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.
@escapemanuele - That's a good idea. We can leverage that CSS file. I'll move my styling into jetpack-sso-admin-create-user.css
.
I think it makes more sense to use add_action( 'admin_print_styles-user-new.php', array( $this, 'jetpack_users_new_form_styles' ) );
, move my styling into jetpack-sso-admin-create-user.css
, then enqueue the CSS in that function (function jetpack_users_new_form_styles
).
This way we can separate the styling and the notice logic.
WDYT?
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.
That makes totally sense for me @agrullon95 👍
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.
Thanks for addressing my feedback, looks great now!
IMHO, this message field seems like an attribute of the user when it's not. Remember, the point of this project is gaining the trust of people who are used to WP Core. This field doesn't exist in Core and will be confusing unless explained well. Let's give it a placeholder, something like: "This user will be invited to WordPress.com, you can include a customized welcoming message that we'll make sure to pass along with the invitation". |
Makes total sense 👍 |
Placeholder works! Would it be better if we change the color to looks a little less like text and more like a placeholder? @agrullon95 |
Hi! We can do this instead of a placeholder. This way the message is always visible, even if they edit the textarea. WDYT? Figma file: DASWajWXHUUjF4pu1yo4fI-fi-246_1228 |
I like this more than the placeholder for sure. I was a bit reluctant to suggest the placeholder idea because it misuses the field. |
Fixes Automattic/wp-calypso#86760
Proposed changes:
New user form:
Email:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
/wp-admin/user-new.php