Skip to content

fix(newsletters): upgrade DataViews to 16 and fix list styling#286

Open
thomasguillot wants to merge 1 commit into
mainfrom
fix/newsletters-dataviews-16
Open

fix(newsletters): upgrade DataViews to 16 and fix list styling#286
thomasguillot wants to merge 1 commit into
mainfrom
fix/newsletters-dataviews-16

Conversation

@thomasguillot

@thomasguillot thomasguillot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrades the Newsletters admin-shell DataViews lists to @wordpress/dataviews@16.0.0 and fixes the resulting list styling.

The admin-shell bundle was compiling @wordpress/dataviews@10.3.0 (DEWP bundles dataviews rather than externalizing it). That older version drew a stray <hr> separator in the row Actions kebab and used an older table column-sizing model. Bumping to 16.0.0 removes the separator and matches core's current DataViews behavior. The bump is scoped to this plugin — the workspace root stays on 10.x, and webpack resolves the plugin's own 16.0.0 copy.

Changes

  • package.json — add @wordpress/dataviews: ^16.0.0 devDependency (plus the matching pnpm-lock.yaml entry). Removes the stray Actions-menu separator.
  • style.scss
    • Add .dataviews-view-table col.dataviews-view-table__col-first-data { width: auto !important; } to re-assert the primary column as flexible. newspack-plugin's global commons.css still ships dataviews 10.x CSS whose col:not(.dataviews-view-table__col-primary){width:1%} rule wrongly matches 16.x's renamed __col-first-data column, which otherwise left no column to absorb table slack.
    • Remove two overrides now redundant on 16.x (a .components-base-control margin reset and a pagination select line-height), each verified dead by toggling live in the browser.
    • Reorganize the file into logical sections, add two SASS mixins (inline-icon, flex-column-fill), and nest the previously-flat .newspack-newsletters-quick-edit-modal__* selectors under one block.

Testing

  • Verified the SCSS refactor compiles to equivalent CSS — identical declaration count (2914) and rule count (1707) before/after.
  • lint:scss passes.
  • Browser-checked all five DataViews screens (Newsletters, Ads, Advertisers, Layouts lists + the Layout picker modal): separator gone, column widths correct, Quick Edit slide-in panel and reduced-motion behavior intact.
  • Reviewed by Codex and Claude — 0 findings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant