Document WordPress UI + Theme integration defaults in AGENTS.md#48020
Document WordPress UI + Theme integration defaults in AGENTS.md#48020adamwoodnz wants to merge 5 commits intotrunkfrom
Conversation
Adds a "WordPress UI + Theme Integration" section capturing the defaults the project is migrating to: WPDS design tokens (dimension/border/font), @wordpress/ui primitives (Stack, Text) over ad-hoc flexbox and __experimental* exports, and @wordpress/theme ThemeProvider for theming instead of manual DS token overrides. Extends Common Pitfalls with the inverse patterns so agents stop reintroducing them. Refs CHARTS-210. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the Charts package agent guidance to codify defaults for the ongoing WordPress UI + Theme integration work, and records the documentation change in the Charts changelog.
Changes:
- Add a new “WordPress UI + Theme Integration” section to
AGENTS.mddescribing default patterns (WPDS tokens,@wordpress/uiprimitives,@wordpress/themeThemeProvider,getElementStyles). - Extend “Common Pitfalls” with inverse anti-patterns to avoid regressions.
- Add a
patch/changedchangelog fragment for the documentation update.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| projects/js-packages/charts/AGENTS.md | Adds WordPress UI + Theme integration defaults and expands common pitfalls. |
| projects/js-packages/charts/changelog/charts-210-agents-md-wp-ui-theme | Adds a changelog fragment describing the documentation change. |
projects/js-packages/charts/changelog/charts-210-agents-md-wp-ui-theme
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@cursoragent does the update read well for you? |
|
The PR already exists and the title/body don't need changes. The push is sufficient. Overall, Adam, the update reads well. I verified every claim in the new section against the actual codebase:
The one small thing I improved: the |
…mports The existing example only cited __experimentalText, but the actual remaining __experimental imports in the codebase are __experimentalHStack and __experimentalGrid (from @wordpress/components). Adding them makes the guidance immediately recognizable when an agent encounters those specific imports. Co-authored-by: Adam Wood <adamwoodnz@users.noreply.github.com>
__experimentalGrid has no stable @wordpress/ui alternative yet, so it is acceptable to continue using. Noted as an explicit exception in both the Integration section and Common Pitfalls. Co-authored-by: Adam Wood <adamwoodnz@users.noreply.github.com>
Code Coverage SummaryThis 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. 🤷 |


Fixes CHARTS-210.
Proposed changes
projects/js-packages/charts/AGENTS.mdthat codifies the defaults the package is migrating to: WPDS design tokens in SCSS (--wpds-dimension-*,--wpds-border-*,--wpds-font-*with spec-aligned fallbacks),Stack/stableTextfrom@wordpress/uiover ad-hoc flexbox and__experimental*exports,@wordpress/theme'sThemeProvideras the theming entry point (no manual DS token overrides), andgetElementStylesfromGlobalChartsProviderfor chart element styles.__experimentalText, and manual DS token overrides in place ofThemeProvider.changedchangelog entry. Documentation-only; no runtime code touched.Related product discussion/links
Does this pull request change what data or activity we track or use?
No. Documentation-only change to an agent-guidance file.
Testing instructions
This PR only modifies
projects/js-packages/charts/AGENTS.mdand adds a changelog entry — there is nothing to exercise at runtime.projects/js-packages/charts/AGENTS.mdand confirm the new WordPress UI + Theme Integration section reads clearly and renders correctly on GitHub.projects/js-packages/charts/changelog/charts-210-agents-md-wp-ui-theme(patch / changed).