Skip to content

Newsletter: Move admin notices and JITMs below page header#47714

Merged
vianasw merged 3 commits into
trunkfrom
fix/newsletter-admin-notices-below-header
Mar 23, 2026
Merged

Newsletter: Move admin notices and JITMs below page header#47714
vianasw merged 3 commits into
trunkfrom
fix/newsletter-admin-notices-below-header

Conversation

@vianasw

@vianasw vianasw commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

Fixes JETPACK-1484

Proposed changes

  • Move GlobalNotices to render immediately after the <AdminPage> open tag, before the form content (was previously at the bottom after all sections)
  • Add a #jp-admin-notices container for JITM injection, positioned below the header in its own zero-spacing Container/Col pair
  • Use CSS logical properties (margin-inline-end, margin-block) for RTL-safe JITM card styling

This follows the same pattern established in #47558 for My Jetpack, Social, and Search — the Newsletter page was missed in that PR.

Other information

  • Generate changelog entries for this PR (using AI).

Related product discussion/links

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

No.

Testing instructions

  1. Enable the Newsletter settings page feature flag by adding this to a mu-plugin:
    add_filter( 'jetpack_wp_admin_newsletter_settings_enabled', '__return_true' );
  2. Navigate to Jetpack → Newsletter in wp-admin
  3. Trigger a notice (e.g., save a setting) — verify it appears below the header, not inside it
  4. Optionally inject a fake JITM via the jetpack_jitm_received_envelopes filter to verify JITM placement below the header

@vianasw vianasw added the [Status] Needs Review This PR is ready for review. label Mar 20, 2026
@vianasw vianasw self-assigned this Mar 20, 2026
@github-actions

github-actions Bot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

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 WoA dev 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 (Jetpack or WordPress.com Site Helper), and enable the fix/newsletter-admin-notices-below-header branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fix/newsletter-admin-notices-below-header
bin/jetpack-downloader test jetpack-mu-wpcom-plugin fix/newsletter-admin-notices-below-header

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

Copy link
Copy Markdown
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 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 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@jp-launch-control

jp-launch-control Bot commented Mar 20, 2026

Copy link
Copy Markdown

Code Coverage Summary

This PR did not change code coverage!

That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷

Full summary · PHP report · JS report

@vianasw
vianasw requested a review from a team March 20, 2026 14:29

@enejb enejb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Works well.

Image

I think this is an improvement from before. :shipit:

Although I am not a big fan of the current max-width approach.

Should it be 100% like this

Image

Or the same as the content like this. (660px)

Image

vianasw and others added 3 commits March 23, 2026 12:19
Move GlobalNotices to render before the form content instead of after it,
and add a #jp-admin-notices container for JITM injection. This follows
the same pattern established in PR #47558 for My Jetpack, Social, and
Search.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vianasw
vianasw force-pushed the fix/newsletter-admin-notices-below-header branch from e126584 to 71c2553 Compare March 23, 2026 11:20
@vianasw
vianasw merged commit fd510b0 into trunk Mar 23, 2026
72 of 73 checks passed
@vianasw
vianasw deleted the fix/newsletter-admin-notices-below-header branch March 23, 2026 13:43
@github-actions github-actions Bot removed the [Status] Needs Review This PR is ready for review. label Mar 23, 2026
vianasw added a commit that referenced this pull request Mar 23, 2026
* Newsletter: Move admin notices and JITMs below page header

Move GlobalNotices to render before the form content instead of after it,
and add a #jp-admin-notices container for JITM injection. This follows
the same pattern established in PR #47558 for My Jetpack, Social, and
Search.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Newsletter: Use CSS logical properties for JITM card margins

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add changelog for newsletter admin notices fix

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants