Skip to content

Core Data: add missing @wordpress/base-styles dependency - #81012

Merged
manzoorwanijk merged 3 commits into
trunkfrom
add/core-data-base-styles-dep
Jul 31, 2026
Merged

Core Data: add missing @wordpress/base-styles dependency#81012
manzoorwanijk merged 3 commits into
trunkfrom
add/core-data-base-styles-dep

Conversation

@manzoorwanijk

Copy link
Copy Markdown
Member

What?

Follow up to #80485. Adds the missing @wordpress/base-styles dependency to @wordpress/core-data.

Why?

#80485 moved entities-saved-states/style.scss into core-data, which uses @wordpress/base-styles, but the dependency was never declared in the package's package.json. See #80485 (comment).

The missing dependency was caught in #75814, which uses isolated dependencies.

How?

Declares @wordpress/base-styles in dependencies, matching how other style-shipping packages (block-editor, editor, components) declare it.

Testing Instructions

  1. Run npm install and npm run build.
  2. Verify the build succeeds and packages/core-data/src/components/entities-saved-states/style.scss compiles.

Use of AI Tools

Authored with the help of Claude Code, reviewed by the PR author.

@manzoorwanijk
manzoorwanijk requested a review from nerrad as a code owner July 31, 2026 08:47
@github-actions github-actions Bot added the [Package] Core data /packages/core-data label Jul 31, 2026
@github-actions

github-actions Bot commented Jul 31, 2026

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.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>

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

@manzoorwanijk manzoorwanijk added the [Type] Code Quality Issues or PRs that relate to code quality label Jul 31, 2026
@github-actions

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 7.76 MB

compressed-size-action

@tyxla tyxla left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍

@manzoorwanijk
manzoorwanijk merged commit faf38f7 into trunk Jul 31, 2026
44 checks passed
@manzoorwanijk
manzoorwanijk deleted the add/core-data-base-styles-dep branch July 31, 2026 09:35
@github-actions github-actions Bot added this to the Gutenberg 23.8 milestone Jul 31, 2026
@enejb

enejb commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Thanks for the fixes @manzoorwanijk !

@jsnajdr

jsnajdr commented Aug 1, 2026

Copy link
Copy Markdown
Member

@youknowriad I'm surprised to learn that core-data now contains UI components, with dependencies on @wordpress/components and @wordpress/base-styles. Do we really want this kind of code there? Until now it's been a data-only package that works only with data. Even the React hooks in the package work only with data.

I we want to move EntitiesSavedStates out of editor, are there better packages? Like block-editor, maybe?

Quoting from #80485 (review)

For me this is a one of the two good paths forward, so I'm approving.

What was the other good path? Maybe the other one was better 🙂

@Mamaduka

Mamaduka commented Aug 1, 2026

Copy link
Copy Markdown
Member

I we want to move EntitiesSavedStates out of editor, are there better packages? Like block-editor, maybe?

The block-editor should remain WP agnostic, with no core-data dependencies or direct REST API calls to it. We also have this in AGENT.md.

I also don't like that core-data now contains UI components, but I think it could have a hook like useDirtyEntityRecords. The hook handles all data normalization/labeling + provides setter and save methods. Then, building a UI shell around it for display should be simple.

I started experimenting with this idea and have a local draft, will try to polish and create a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Core data /packages/core-data [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants