Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core-data: Move setNestedValue to block editor package #52409

Closed
wants to merge 1 commit into from

Conversation

tyxla
Copy link
Member

@tyxla tyxla commented Jul 7, 2023

What?

This PR moves the setNestedValue utility function to the block editor package, alongside the rest of the object utils.

Why?

We need to utilize it to unblock #52404.

How?

We're just moving some code and making it a private API.

Testing Instructions

Verify all checks are green.

Testing Instructions for Keyboard

None

Screenshots or screencast

None

@tyxla tyxla added [Type] Enhancement A suggestion for improvement. [Package] Core data /packages/core-data [Package] Block editor /packages/block-editor labels Jul 7, 2023
@tyxla tyxla self-assigned this Jul 7, 2023
@Mamaduka
Copy link
Member

Mamaduka commented Jul 7, 2023

Can we use a different package or even duplicate the helper method?

The block-editor shouldn't be a core-data dependency; the only reason it's there is because of the "Footnotes" feature, but that might change soon. See #51201 (comment).

cc @mcsf

@tyxla
Copy link
Member Author

tyxla commented Jul 7, 2023

That makes sense. It felt odd that @wordpress/block-editor was a dependency of @wordpress/core-data, but since it was already the case I thought I'd exploit it.

I'm happy to duplicate it and then deduplicate it in another PR. Closing this one then.

@tyxla tyxla closed this Jul 7, 2023
@tyxla tyxla deleted the move/set-nested-value branch July 7, 2023 09:23
@Mamaduka
Copy link
Member

Mamaduka commented Jul 7, 2023

Thanks, @tyxla, and sorry for adding extra work.

@tyxla
Copy link
Member Author

tyxla commented Jul 7, 2023

@Mamaduka no reason to be sorry! I actually truly appreciate how thorough and helpful your reviews have been 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block editor /packages/block-editor [Package] Core data /packages/core-data [Type] Enhancement A suggestion for improvement.
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants