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

Remove border CSS from button block #23734

Merged
merged 4 commits into from
Apr 11, 2022
Merged

Conversation

jffng
Copy link
Contributor

@jffng jffng commented Mar 31, 2022

Changes proposed in this Pull Request:

👋 👋

#19595 ensures that the CSS for the core button block is enqueued when a button is rendered on the server. That way, the Jetpack button uses core's button styles.

However there is still some "default" button CSS that overrides the core + theme styles:

Screen Shot 2022-03-31 at 12 58 08 PM

This PR removes that CSS, allowing themes to provide a default value for button borders, fonts, and padding via theme.json that applies to Jetpack buttons.

Does this pull request change what data or activity we track or use?

No.

Testing instructions:

  • Sandbox remotedemo.wordpress.com
  • Vist /about and view the jetpack contact form button
  • Verify the core + theme button styles are not being overridden by Jetpack's

@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello jffng! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D77955-code works as expected before merging this PR. Once this PR is merged, please commit the changes to WP.com. Thank you!
This revision will be updated with each commit to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Mar 31, 2022

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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 (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: May 3, 2022.
  • Scheduled code freeze: April 25, 2022.

@github-actions github-actions bot added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Mar 31, 2022
@oskosk
Copy link
Contributor

oskosk commented Mar 31, 2022

Tests well.

  • Please add a changelog file
Use `jetpack changelogger add plugins/jetpack` to add a change file.
Guidelines: https://github.com/Automattic/jetpack/blob/master/docs/writing-a-good-changelog-entry.md

@jffng
Copy link
Contributor Author

jffng commented Apr 1, 2022

Please add a changelog file

👍

@jeherve jeherve added the [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it label Apr 1, 2022
@jffng jffng force-pushed the try/remove-default-button-style branch from bf4a250 to 38f19be Compare April 8, 2022 13:55
@jffng
Copy link
Contributor Author

jffng commented Apr 8, 2022

@oskosk thank you for the review, anything else I need to do to bring this PR in?

Looks like there is one failing test that I'm not sure what is about / how to address.

@jeherve
Copy link
Member

jeherve commented Apr 8, 2022

Looks like there is one failing test that I'm not sure what is about / how to address.

The codecov/project check is not required, so you should be good to go now! I've added both the "Needs Team Review" and the "Needs Review" labels to your PR, so someone from your team can review it as well as someone from Crew. Once it's been approved, you'll be able to merge and commit your changes to WordPress.com as well. 👍

@jeherve jeherve added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. [Status] Needs Team Review and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Apr 8, 2022
Copy link
Member

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @jffng, apologies for the delayed review — I missed the ping while I was AFK.

This is testing nicely for me, sandboxed via https://remotedemo.wordpress.com/about/ — before this PR, hovering over the "Ask me a question" button results in the border changing size, and after this PR, the hover changes the background color but the position / border remains the same 👍

From looking at the code, this looks like a safe change, too — since the Button styles from Gutenberg are loaded, which already include padding settings, etc, and the Jetpack button block uses the same classes as the core block, it looks like we don't need these rules anymore.

LGTM!

@coder-karen coder-karen self-requested a review April 11, 2022 12:37
Copy link
Contributor

@coder-karen coder-karen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tests well.

@coder-karen coder-karen added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Team Review [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Apr 11, 2022
@coder-karen coder-karen added this to the jetpack/10.9 milestone Apr 11, 2022
@coder-karen coder-karen merged commit 9b3c155 into master Apr 11, 2022
@coder-karen coder-karen deleted the try/remove-default-button-style branch April 11, 2022 13:26
@github-actions
Copy link
Contributor

Great news! One last step: head over to your WordPress.com diff, D77955-code, and deploy it.
Once you've done so, come back to this PR and add a comment with your changeset ID.

Thank you!

@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Apr 11, 2022
@coder-karen
Copy link
Contributor

Hey @jffng! Just wanted to check in about the WordPress.com diff (D77955-code) as I notice it is still open and looks like it needs deploying unless other changes were made elsewhere? The diff itself looks to be a little out of date though now with some failing tests.

@jffng
Copy link
Contributor Author

jffng commented May 6, 2022

Ah sorry I missed this ping @coder-karen — just rebased the branch and waiting for the tests to pass, once they ✅ I will deploy it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Button [Feature] Contact Form [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ Touches WP.com Files [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants