Skip to content

Conversation

@annacmc
Copy link
Contributor

@annacmc annacmc commented May 12, 2022

This tiny PR switches the notice box dismissal/persistence from using localStorage to using sessionStorage

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

no

Testing instructions:

  • On a site with an active Jetpack Search subscription, go to /wp-admin/admin.php?page=jetpack-search&features=record-meter and check there is currently no notice box displaying.

  • toggle off/on the different states hasBeenIndexed hasValidData and 'hasItemsto trigger the different notices. Note thathasValidData` being false should resolve a red notice box instead:

toggle the states in inspector red noticed when hasValidData is false
image image
  • Try dismissing the notice box using the 'X' in the top right corner of the notice box. It should disappear. When the window is refreshed, dismissed notice should persist. However, other notices should still be able to be displayed (until they too are dismissed)

  • When the session is ended (eg. cleared, or in a different browser etc) the notices should once again display.

@annacmc annacmc added [Feature] Search For all things related to Search [Status] Needs Team Review Obsolete. Use Needs Review instead. [Package] Search Contains core Search functionality for Jetpack and Search plugins labels May 12, 2022
@annacmc annacmc requested a review from a team as a code owner May 12, 2022 15:40
@annacmc annacmc self-assigned this May 12, 2022
@github-actions
Copy link
Contributor

github-actions bot commented May 12, 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.

bluefuton
bluefuton previously approved these changes May 13, 2022
Copy link
Contributor

@bluefuton bluefuton left a comment

Choose a reason for hiding this comment

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

Test out well for me. 🚢

I notice one unrelated nit - the close icon on the notice box has the title 'Close search results' which obviously doesn't apply here! I'll fix that over in #24328.

Screen Shot 2022-05-13 at 15 59 14

@bluefuton bluefuton added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Team Review Obsolete. Use Needs Review instead. labels May 13, 2022
@bluefuton bluefuton force-pushed the update/search-record-meter-session-storage branch from 262b900 to a59a69b Compare May 15, 2022 23:19
@bluefuton bluefuton merged commit fc12a53 into master May 15, 2022
@bluefuton bluefuton deleted the update/search-record-meter-session-storage branch May 15, 2022 23:35
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Search For all things related to Search [Package] Search Contains core Search functionality for Jetpack and Search plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants