Skip to content

Privacy: Use an info notice when no personal data is found during erasure - #13916

Open
Jawad0501 wants to merge 3 commits into
WordPress:trunkfrom
Jawad0501:47491
Open

Jawad0501 wants to merge 3 commits into
WordPress:trunkfrom
Jawad0501:47491

Conversation

@Jawad0501

Copy link
Copy Markdown

Trac ticket: https://core.trac.wordpress.org/ticket/47491

Problem

On Tools > Erase Personal Data, erasing a user who has no personal data shows "No personal data was found for this user." as a green success notice. As raised in https://core.trac.wordpress.org/ticket/44135#comment:16, nothing was changed in this case, so the notice should be informational (blue) rather than a success.

The other colour issues raised in that comment are already resolved in trunk:

  • #65787 replaced the tinted row backgrounds with a left border on the checkbox cell only, so the results row no longer combines the request's blue with the notice colour.
  • #65994 restored standard list table zebra striping, so grey no longer carries a separate meaning.

Change

In privacy-tools.js, use notice-info instead of notice-success for the "No personal data was found for this user." erasure result. Erasures that removed data keep notice-success, and partial or retained results keep notice-warning.

Testing

  1. Go to Tools > Erase Personal Data and add a request for an email address that has no personal data on the site. Confirm the request.
  2. Click "Erase personal data" on the request row.
  3. Before: the result notice is green. After: the result notice is blue.
  4. Repeat for an email address that has personal data (for example, one that has left comments). The notice is still green.

Use of AI tools

The analysis of the ticket against current trunk and this description were drafted with AI assistance (Cursor). I made the code change and reviewed the diff.

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @Jawad0501.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

Core Committers: Use this line as a base for the props when committing in SVN:

Props masteradhoc.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@masteradhoc

Copy link
Copy Markdown

Thank you @Jawad0501. Could you please also work on the second suggestion from @joedolson ?
"Change the text to be 'No personal data was found for the email "test@…"'"

That would be needed to get this PR ready to be shipped :)

The erasure check runs against an email address, which may not belong to a user account.

See #47491.
Comment thread src/js/_enqueues/admin/privacy-tools.js Outdated

if ( false === hasRemoved ) {
if ( false === hasRetained ) {
<<<<<<< Updated upstream

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@Jawad0501 can you please check and remove those conflict markers?

Comment thread src/js/_enqueues/admin/privacy-tools.js Outdated
<<<<<<< Updated upstream
summaryMessage = __( 'No personal data was found for this user.' );
classes = 'notice-info';
=======

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

same here

Comment thread src/js/_enqueues/admin/privacy-tools.js Outdated
requestEmail
);
}
>>>>>>> Stashed changes

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants