-
Notifications
You must be signed in to change notification settings - Fork 799
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
Revue Block: Minor Fixes #14792
Revue Block: Minor Fixes #14792
Conversation
Caution: This PR has changes that must be merged to WordPress.com |
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: March 3, 2020. |
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 for me. I only have one minor remark, unlinked to this PR, but since we're bundling a few changes in this PR already, I think it would make sense to fix that too.
@@ -35,16 +35,18 @@ function jetpack_render_revue_block( $attributes ) { | |||
$last_name_placeholder = jetpack_get_revue_attribute( 'lastNamePlaceholder', $attributes ); | |||
$last_name_show = jetpack_get_revue_attribute( 'lastNameShow', $attributes ); | |||
$url = sprintf( 'https://www.getrevue.co/profile/%s/add_subscriber', $attributes['revueUsername'] ); |
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.
I know that's not part of this PR, but I think we need to escape this username. I had missed that before, sorry!
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.
We escape the URL a few lines later though: action="<?php echo esc_url( $url ); ?>"
Do I still need to escape the username here too? 🤔
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.
True. I just realized others are having the same conversation elsewhere. :)
#14590 (comment)
Let's keep things as they are in here then. Ideally, maybe we should validate the username to avoid the use of characters like /
for example.
* Proper block and responsive inputs * Move username field in the sidebar * Create CSS classes dynamically
Cherry-picked to |
r203456-wpcom |
Changes proposed in this Pull Request:
These minor fixes were partly requested in the post-merge comments on the original Revue Block PR (starting from this comment).
Screenshots
In some themes, labels and input fields are inline elements. In others, like Twenty Twenty, they are block elements.
25d3f05 makes them block elements regardless.
The following comparison screenshots contains the Revue block followed by the Contact Form block, which is the look we are trying to obtain.
1dc853c removes the "Edit Username" button from the block toolbar that reverted the block to the placeholder view, and replaces it with a simple text field in the block sidebar.
Testing instructions:
Proposed changelog entry for your changes: