Show Notifications in Admin Bar#29755
Conversation
|
Are you an Automattician? You can now test your Pull Request on WordPress.com. On your sandbox, run to get started. More details: p9dueE-5Nn-p2 |
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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. Jetpack plugin:
|
There was a problem hiding this comment.
This effectively reverts #25448. With the current version of Jetpack, Notifications are hidden when third-party cookies are blocked:
With this PR, the notifications appear again, but the panel never loads:
cc @manzoorwanijk, who worked on #25448.
Edit: noting that the changes from D106160-code aren't visible for me when testing (most likely cache).
|
This isn't quite working for me, and I'm unsure if I'm doing something wrong. I tested on FF and Chrome. In both cases, when cookies are allowed or blocked, the notifications panel shows up but never loads any messages. Chrome console: The only time notifications load is when I disable "enhanced tracking protection" in FF. |
|
Sorry I should have removed the I had to revert the admin-bar-v2.js library yesterday as there was a regression on how the notifications panel behaved on Safari browser. The fix for this issue is live however, I'm not sure I want to expose the redirect to Jetpack users just yet. I'm going to leave this PR on hold until we make a decision on this. |
|
This PR has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this PR has clear testing instructions, is it up to date with trunk, and it is still valid. Feel free to close this PR if you think it's not valid anymore — if you do, please add a brief explanation. |
|
Closing this for now because of the lack of activity on this. We can always reopen in the future if needed. |




This PR is part of a project that has added a dedicated notifications page on Reader.
When a browser doesn't permit third party cookies, the admin bar notifications will not be displayed as they are inside an iframe on another domain, widgets.wp.com.
There is already a check on widgets.wp.com to determine if the browser permits third party cookies. This is available when an iframe loads https://widgets.wp.com/3rd-party-cookie-check/index.html.
The iframe will try to set a cookie, the results of which (either
WPCOM:3PC:blockedorWPCOM:3PC:allowed) are posted back to the parent page.For non-WPCOM simple sites that do not load the Jetpack Masterbar, the default admin bar is loaded. It currently uses the results to hide the notifications completely if it found that the browser did not support third party cookies.
This functionality was added in #25448.
This PR removes the hiding and instead allows the changes in admin-bar-v2.js from D106160-code to handle either rendering the iframed notifications or adding redirect to https://wordpress.com/read/notifications
Proposed changes:
Jetpack product discussion
Project thread can be found at pe7F0s-rZ-p2
Does this pull request change what data or activity we track or use?
No
Testing instructions:
chrome://settings/cookiesto goto cookies related settingsOn firefox;