Skip to content

Fix/stylelint premium analytics - #50277

Merged
simison merged 2 commits into
trunkfrom
fix/stylelint-premium-analytics
Jul 7, 2026
Merged

Fix/stylelint premium analytics#50277
simison merged 2 commits into
trunkfrom
fix/stylelint-premium-analytics

Conversation

@simison

@simison simison commented Jul 7, 2026

Copy link
Copy Markdown
Member

Follow-up to wp-theme update done in #49272 (and new linter in action added in #50110)

Proposed changes

Fixes:

stylelint --allow-empty-input --globby-options '{"gitignore":true,"ignore":["tools/docker/data","**/vendor/**","**/jetpack_vendor/**"]}' --formatter=compact .
Error: /home/runner/work/jetpack/jetpack/projects/packages/premium-analytics/widgets/store-performance/styles.module.scss: line 10, col 2, error - The following CSS variables are not valid Design System tokens: '--wpds-color-fg-content-neutral-weak' (plugin-wpds/no-unknown-ds-tokens)

Related product discussion/links

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

Testing instructions

  • N/A: straighforward var migration and fallback value already handled missing variable so UI stays the same.

@simison
simison requested review from a team as code owners July 7, 2026 13:18
@simison simison added Bug When a feature is broken and / or not performing as intended [Status] Ready to Merge Go ahead, you can push that green button! [Package] Premium Analytics labels Jul 7, 2026
@simison
simison requested review from CGastrell and anomiex July 7, 2026 13:21
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

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.
  • ✅ Add a "[Status]" label (In Progress, Needs 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 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

This PR did not change code coverage!

That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷

Full summary · PHP report

@simison
simison merged commit 3dcc5e4 into trunk Jul 7, 2026
76 of 79 checks passed
@simison
simison deleted the fix/stylelint-premium-analytics branch July 7, 2026 13:40
@github-actions github-actions Bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Jul 7, 2026
retrofox added a commit that referenced this pull request Jul 7, 2026
trunk theme 0.17 validates PA tokens; fix store-performance fg->foreground (matches #50277)
chihsuan pushed a commit that referenced this pull request Jul 8, 2026
…s to widget attributes (#50271)

* update widget package pins in unit manifests
routes and widgets metadata now declare stable 0.2.0 instead of next snapshots

* migrate design tokens to renamed theme groups
fg->foreground, bg->background; replace removed base and invalid names

* update js-tools theme to 0.17.0
lint token list must match the renamed design token groups

* link wp packages to local gutenberg checkout
temporary wiring until a new next snapshot is published

* promote locations view mode to widget attribute
geoGranularity field (relevance high) replaces the inline SelectControl

* type widget attributes and unify component jsdoc
WidgetAttributeField casts, exported attribute types, single typed param tags

* promote top-platforms mode to widget attribute
platformDimension field (relevance high) replaces the inline SelectControl

* drop dead content wrapper in locations widget
the content class was removed from the css with the inline select

* unify object param jsdoc across hooks and stories
single typed tag with field docs on the type; widget-audit rule extended

* Redo `@wordpress/dataviews/wp` pnpmfile hack

There's now an indirect dep, sigh.

* bump premium-analytics wp deps to 0.17 stack
admin-ui 2.5.0, dataviews 17.1.0, icons ^15, theme/ui 0.17.0 from the bundled renovate group

* UTM Insights: replace custom param selector with high-relevance utmDimension attribute

The UTM dimension is now a widget attribute with elements and relevance: 'high',
so the widget host renders the control (same pattern as Locations and Top
Platforms). Drops the in-body SelectControl, local state, and setAttributes
wiring; renames the attribute from utmParam to utmDimension (the data-layer
useStatsUtm arg keeps its endpoint-oriented name).

Co-authored-by: Cursor <cursoragent@cursor.com>

* UTM Insights: drop the .content wrapper

The widget root already provides the column flex layout and, via its
container-type, acts as containing block for the absolutely positioned
loading overlay — same layout approach as Top Platforms. The chart takes
the remaining space through a .leaderboard class instead.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Emails: replace custom header and metric selector with high-relevance metric attribute

The open/click rate switch is now a `metric` widget attribute with elements
and relevance: 'high', so the widget host renders the control (same pattern
as Locations, Top Platforms, and UTM Insights). This makes the whole custom
header workaround unnecessary: the widget moves from full-bleed back to
framed presentation, dropping the hand-rolled title row, the in-body
SelectControl with its local state, and the header/select CSS.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Subscribers chart: replace in-body Group by selector with high-relevance granularity attribute

The bucket-size switch is now a `granularity` widget attribute with elements
and relevance: 'high', so the widget host renders the control (same pattern
as the other converted widgets). An `auto` option replaces the previous
local-state null: it keeps following the dashboard range until the user picks
an explicit granularity, which then persists per widget instance. Drops the
SelectControl in the MetricTabsChart controls slot and its local state.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Traffic chart: replace in-body Group by selector with high-relevance granularity attribute

The bucket-size switch is now a `granularity` widget attribute with elements
and relevance: 'high', so the widget host renders the control (same pattern
as subscribers-chart). An `auto` option replaces the previous local-state
null override. Drops the SelectControl in the MetricTabsChart controls slot.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Premium Analytics widgets: use DataViews-compatible text type for high-relevance attributes

Replace attribute type 'string' with 'text' in locations, top-platforms,
utm-insights, and emails so the WidgetAttributeField cast matches FieldTypeName.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Premium Analytics commerce widgets: declare framed presentation in widget.json

Add the missing presentation field to 29 WooCommerce and commerce widget
manifests so the widget host renders the standard card chrome.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Premium Analytics widgets: align package.json dependencies with source imports

Remove unused @wordpress/components, @wordpress/ui, date-fns, and react
entries left over from refactors; add missing @wordpress/element where
hooks import it. Scans each widget's non-story source files, not stories.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Subscribers list: pass host attributes through WidgetRoot

Align with the widget contract so injected attributes reach WidgetRoot,
matching the other Stats widgets even though this widget does not use
reportParams.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Subscribers list: compose render attributes with ReportParamsFieldAttributes

Fixes the WidgetRoot attributes pass for TypeScript: host attributes may
include reportParams even though this widget ignores the date range.

Co-authored-by: Cursor <cursoragent@cursor.com>

* use published next snapshots for widget packages
wp-build 0.19.1-next, widget-* 0.3.1-next replace the local gutenberg links

* keep js-tools theme stable, exempt PA token lint
PA uses theme 0.17 token names ahead of the repo; the rename ships with the bundled renovate group

* fix pruned lockfile dep edge and stale changelog
restore brace-expansion for minimatch; changelog now describes -next pins

* adapt pa to widget-dashboard 0.3.1-next API
remove dropped onGridSettingsChange, exempt icons from token lint, fix comma

* Premium Analytics widgets: frame annual-highlights

Host owns identity; drop custom in-widget title, keep year stepper as body chrome.

* disable stylelint token-fallback rule with null

Stylelint disables rules with null, not false; the invalid false value aborted the pre-commit linter on any CSS commit.

* Premium Analytics: Update pnpm lockfile

* drop redundant PA token-lint exemptions
trunk theme 0.17 validates PA tokens; fix store-performance fg->foreground (matches #50277)

---------

Co-authored-by: Brad Jorsch <brad.jorsch@automattic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: dognose24 <dognose24@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug When a feature is broken and / or not performing as intended [Package] Premium Analytics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant