Skip to content

Fix: Restore the zebra striped styling on the Privacy tables - #13329

Open
hbhalodia wants to merge 1 commit into
WordPress:trunkfrom
hbhalodia:fix/issue-65994
Open

Fix: Restore the zebra striped styling on the Privacy tables#13329
hbhalodia wants to merge 1 commit into
WordPress:trunkfrom
hbhalodia:fix/issue-65994

Conversation

@hbhalodia

Copy link
Copy Markdown

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

Screenshots

Before After
Screenshot 2026-08-31 at 2 27 12 PM Screenshot 2026-08-31 at 2 27 01 PM
Screenshot 2026-08-31 at 2 29 13 PM Screenshot 2026-08-31 at 2 29 37 PM

Use of AI Tools

  • Claude Code, Opus 5
  • Used for initial screening, finding out whe/why zebra stripping removed and other usecase.
  • For fixing the issue.

This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.


AI Summary

Problem

The Export/Erase Personal Data list tables carry the striped class like every other list table, but CSS in forms.css forced every body cell to background: #fff, cancelling the striping. This made these two screens inconsistent with the rest of the admin and dropped a useful visual aid for scanning rows.

Why the override existed

It was not a decision about striping. When the screens were added in r42967 (#43481), the row background was used to carry status: confirmed requests were tinted pale blue (#f7fcfe) and failed ones pale peach (#fef7f1). Striping and status tinting can't both own the row background, so white was the neutral ground the design needed. Rows were separated by a 1px inset shadow instead.

That reason is gone: r63010 (#65787) moved status colour off the row and onto the checkbox column's left border, so nothing competes for the row background any more.

Changes

  • Removed background: #fff from .privacy_requests tbody td.check-column and .privacy_requests tbody td:not(.check-column), .privacy_requests tbody th. This is the actual fix — cells return to transparent and the striping shows through.
  • Changed the 4px border-left on the status gutter from #fff to transparent, so it no longer paints a white sliver across grey rows.
  • Removed background-color: #f6f7f7 from .status-request-failed td.check-column. That is the exact zebra stripe colour, so the "failed" highlight would have been invisible on every other row. The red border-left-color and the red .status-label already convey it.
  • Removed background-color: #fff from .status-request-confirmed td.check-column, which would have punched a white gap through the stripes.
  • Added a shared background for .has-request-results and .request-results (see below).

Keeping an expanded request and its results together

privacy-tools.js injects a real <tr class="request-results"> after a request row when you click Download/Erase. With striping restored, that injected row lands on the opposite stripe from the request it belongs to, so the two would read as unrelated rows instead of one result.

Both rows are now pinned to a single shared background so the pair still reads as one unit:

.privacy_requests tbody tr.has-request-results > *,
.privacy_requests tbody tr.request-results > * {
	background-color: #fff;
}

Known trade-off: the injected row shifts nth-child parity, so rows below the expanded pair swap stripe colours. This isn't fixable in pure CSS, and it only occurs in a transient, user-triggered state, so it's left as-is rather than adding JS re-striping. Happy to change that if reviewers prefer.

Testing instructions

  1. Go to Tools → Export Personal Data and add at least 4 requests (any email works).
  2. Confirm rows now alternate white / #f6f7f7, matching other list tables.
  3. Hover a row's Requester cell and click Download personal data.
  4. Confirm the results row that appears shares the same background as its request row above it.
  5. Repeat on Tools → Erase Personal Data with Erase personal data.
  6. Confirm the red left bar on a failed request is still visible on both a white and a grey row.

@github-actions

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.

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

Props hbhalodia.

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

@github-actions

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.

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.

1 participant