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

WordPress 6.7 compatibility: Add __nextHasNoMarginBottom to controls to prevent deprecation notices #39877

Merged

Conversation

coder-karen
Copy link
Contributor

@coder-karen coder-karen commented Oct 23, 2024

Fixes #39823

Proposed changes:

  • This PR adds __nextHasNoMarginBottom={ true } to multiple BaseControl-based components, to prevent deprecation notices (more context about these here, and the changes generally). As much as possible, the addition of this prop has been tested for each change. The intention here is to cleanup as many of the notices as possible prior to the next release - not all are covered:
    • In several cases I was unable to test features so to be safe have left those out (inc. VideoPress Video chapters (DetailsControl), LikeEdit component for Like block on Simple (as it only affects Simple), among a few others).
    • Some I was unable to test but the change was most likely needed, so added them. These were generally ToggleControl related, where all other tested examples had needed the addition. Examples include visibilityAdvancedControls related to the Widget Visibility module.
    • No changes were made to CRM Automations files, as that feature was never implemented.
    • I did not make any changes in the jetpack-mu-wpcom package, partially due to testing issues (eg. Newspack related blocks), and also due to releases on WoA being more frequent should anything obvious be spotted otherwise.
    • Deprecated versions of files
    • Also any component that has imported ToggleControl from @automattic/jetpack-components does not need changing, as the Jetpack component has the prop added.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

#39823

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

No.

Testing instructions:

Self-hosted site test instructions

To replicate the issue:

  • On a test site, connected to WordPress.com, install the WordPress Beta Tester plugin
  • Go to Tools > Beta Testing, and set the plugin to use Beta/RC Only
  • Go to Dashboard > Updates, and update to the most recent version of WP.
  • Ensure script debug is enabled on your site - define( 'SCRIPT_DEBUG', true ); in wp-config.php.
  • Open up the post editor for a post, and in the browser console there should be several deprecation notices showing.
  • There are multiple places to test and check - browsing the code for changes files can help but as a quick guide the post editor, testing blocks (particularly the block settings sidebar, checking each panel, also the pre-publish panel and Jetpack setting panel), the Jetpack settings pages. Some blocks to test include Form blocks, Opentable, Tock, VideoPress, AI chat, Podcast player.
  • Note you will see some 6.6 related notices too, they will be dealt with separately: https://github.com/Automattic/vulcan/issues/562

To test the changes:

  • Apply this PR, making sure to rebuild any plugins / packages you are testing changes related to.
  • Confirm the notices are gone, and for any specific features tested confirm there are no style adjustments (bottom margin related) that appear or look out of place.

Copy link
Contributor

github-actions bot commented Oct 23, 2024

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin, and enable the update/base-control-bottom-margin-style-deprecation branch.

  • To test on Simple, run the following command on your sandbox:

    bin/jetpack-downloader test jetpack update/base-control-bottom-margin-style-deprecation
    

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions bot added [Package] My Jetpack [Package] Search Contains core Search functionality for Jetpack and Search plugins [Package] VideoPress [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. [Plugin] Social Issues about the Jetpack Social plugin Admin Page React-powered dashboard under the Jetpack menu RNA labels Oct 23, 2024
Copy link
Contributor

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.
  • ✅ 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.


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Choose a review path based on your changes:
    • A. Team Review: add the "[Status] Needs Team Review" label
      • For most changes, including minor cross-team impacts.
      • Example: Updating a team-specific component or a small change to a shared library.
    • B. Crew Review: add the "[Status] Needs Review" label
      • For significant changes to core functionality.
      • Example: Major updates to a shared library or complex features.
    • C. Both: Start with Team, then request Crew
      • For complex changes or when you need extra confidence.
      • Example: Refactor affecting multiple systems.
  3. Get at least one approval before merging.

Still unsure? Reach out in #jetpack-developers for guidance!


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen semi-continuously (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly. The next release is scheduled for November 5, 2024 (scheduled code freeze on November 4, 2024).

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Boost plugin:

  • Next scheduled release: none scheduled.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Social plugin:

  • Next scheduled release: none scheduled.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Protect plugin:

  • Next scheduled release: none scheduled.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@coder-karen coder-karen marked this pull request as ready for review October 23, 2024 15:41
@coder-karen coder-karen requested a review from a team October 23, 2024 15:42
Copy link
Contributor

@fgiannar fgiannar left a comment

Choose a reason for hiding this comment

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

Tested following the PR instructions and I didn't notice any styling issues with the suggested components. The relevant deprecation notices in the browser console were also gone 👍

@fgiannar fgiannar added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Team Review labels Oct 25, 2024
@coder-karen coder-karen merged commit 291b09e into trunk Oct 28, 2024
71 checks passed
@coder-karen coder-karen deleted the update/base-control-bottom-margin-style-deprecation branch October 28, 2024 12:40
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WordPress 6.7 compatibility: Add __nextHasNoMarginBottom to remaining BaseControl based components
2 participants