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

Recurring Payments: Remove BlockIcon Wrappers #13324

Merged
merged 4 commits into from
Feb 1, 2022

Conversation

ockham
Copy link
Contributor

@ockham ockham commented Aug 26, 2019

This is arguably coming from a place of ignorance, so please forgive me if I'm missing something obvious, and consider this PR a request-for-comment.

Changes proposed in this Pull Request:

Recurring Payments: Remove BlockIcon Wrappers from icon props.

All of these are passed as an icon prop to Placeholder components, which accepts a string, or ReactElement. The icon we're using here is React element for an SVG:

export const icon = (
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
<Rect x="0" fill="none" width="24" height="24" />
<G>
<Path d="M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 2v2H4V6h16zM4 18v-6h16v6H4zm2-4h7v2H6v-2zm9 0h3v2h-3v-2z" />
</G>
</SVG>
);

The BlockIcon wrapper component is arguably less public -- it's part of the @wordpress/editor, and I couldn't find any documentation for it. It mostly wraps the component tree that's passed to it in an Icon component.

(To be continued -- maybe we should wrap in Icon instead?)

  • This can also be done for other blocks in the repo, since other blocks follow that pattern.
After

image

Is this a new feature or does it add/remove features to an existing part of Jetpack?

Existing part.

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

No.

Testing instructions:

  • Start with a site with a Jetpack bundled plan, such as a complete plan.
  • Go to Posts > Add New, and add a Payment block
    • Check the different statuses of the block; icons should always be displayed properly.

@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello ockham! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer, review, and approve D31984-code before merging this PR. Thank you!

@jetpackbot
Copy link

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: September 3, 2019.
Scheduled code freeze: August 27, 2019

Generated by 🚫 dangerJS against 5d05be1

@stale
Copy link

stale bot commented Nov 24, 2019

This PR has been marked as stale. This happened because:

  • It has been inactive in the past 3 months.
  • It hasn’t been labeled `[Pri] Blocker`, `[Pri] High`.

No further action is needed. But it's worth checking if this PR has clear testing instructions, is it up to date with master, and it is still valid. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.

@stale stale bot added the [Status] Stale label Nov 24, 2019
@jeherve jeherve marked this pull request as ready for review January 31, 2022 17:25
@jeherve jeherve self-assigned this Jan 31, 2022
@github-actions github-actions bot added the [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ label Jan 31, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jan 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: March 1, 2022.
  • Scheduled code freeze: February 22, 2022.

@jeherve jeherve added this to the jetpack/10.7 milestone Feb 1, 2022
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

I don't see why we couldn't go about that, this simplifies things quite a bit. 🚢

@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] In Progress labels Feb 1, 2022
@jeherve jeherve merged commit 7d15e1e into master Feb 1, 2022
@jeherve jeherve deleted the remove/recurring-payments-block-icon-wrapper branch February 1, 2022 11:01
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Feb 1, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2022

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

Thank you!

@jeherve
Copy link
Member

jeherve commented Feb 1, 2022

r239320-wpcom

@jeherve
Copy link
Member

jeherve commented Feb 1, 2022

This can also be done for other blocks in the repo, since other blocks follow that pattern.

To be continued in #22590.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Payment Button aka Recurring Payments [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ Touches WP.com Files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants