Skip to content

Hide table columns that are empty for every row - #9

Merged
ibuilder merged 1 commit into
mainfrom
fix/drop-empty-columns
Aug 8, 2026
Merged

Hide table columns that are empty for every row#9
ibuilder merged 1 commit into
mainfrom
fix/drop-empty-columns

Conversation

@ibuilder

@ibuilder ibuilder commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Found by standing up a real WordPress site with the published v2.0.4 ZIP, serving it over HTTP, and reading what a visitor actually receives.

The problem

Email suppression is on by default, so [procore_team] rendered this:

headers: Name | Role | Company | Email
email cells: 4 total, 0 non-empty

An Email header above a blank cell for every member — visible dead weight on the most commonly used shortcode, on every default install.

The fix

Columns that render nothing for any row are dropped before the table is built. Now:

headers: Name | Role | Company

This also covers a column no record happens to populate, and the filter never reduces a table to no columns at all.

Tests

Two: the column disappears when email output is suppressed, and survives when both opt-ins are on. 103 tests, 390 assertions. PHPCS clean.

What else the test site showed

Everything else held up. Verified over real HTTP, not by asserting on strings:

Unconfigured install Visitors get a neutral message; admins get actionable guidance naming the setting
Conditional stylesheet Present on pages with output, 0 refs on a page without
Admin, served over HTTP All six tabs render; secret never in the HTML; masked placeholder present
Status screen Reports AES-256-GCM, rate limit, circuit state; no token in any code block
AJAX Test connection Driven through admin-ajax.php with a real nonce — 6/6 stages, 16/16 endpoints readable
Nonce enforcement Bogus nonce → -1; no cookie → 0
Map 3 points with coordinates, inactive project filtered, no third-party script
PHP notices in served HTML 0

I also chased two false alarms to ground rather than reporting them: a stylesheet that looked like it loaded on a plain page (wrong page was being served) and an apparent token leak on the Status screen (the admin bar showing the username demo, which collided with my mock token value).

🤖 Generated with Claude Code

Email suppression is on by default, so [procore_team] rendered an Email
header above a blank cell for every member. On a default install that is
visible dead weight on the most commonly used shortcode.

Columns that render nothing for any row are now dropped before the table is
built. That also covers a column no record happens to populate — a
description or phone nobody has filled in — and the filter never reduces a
table to no columns at all.

Found by standing up a real WordPress site, serving it over HTTP and reading
what a visitor actually receives, rather than by asserting on strings. The
served markup was:

  headers: Name | Role | Company | Email
  email cells: 4 total, 0 non-empty

and is now:

  headers: Name | Role | Company

Two tests cover it: the column disappears when suppressed, and survives when
both email opt-ins are on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ibuilder
ibuilder merged commit 6c298ac into main Aug 8, 2026
13 checks passed
@ibuilder
ibuilder deleted the fix/drop-empty-columns branch August 8, 2026 23:24
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