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: Add util for minimally modifying items. #16823

merged 1 commit into from Jul 30, 2019


Copy link

commented Jul 30, 2019

Extracted from #16761


This PR adds a utility for minimally modifying items, to the core data package in preparation for refactoring the editor store to rely entirely on core/data entities. The utility maps an item to a new item, retaining non primitive value references where possible (where deeply equal). This is necessary so that components that depend on these values don't update unnecessarily.

How has this been tested?

Unit tests were written and ran to test for expected functionality.


  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@epiqueras epiqueras added this to the Future milestone Jul 30, 2019

@epiqueras epiqueras requested review from nerrad and youknowriad as code owners Jul 30, 2019

@epiqueras epiqueras self-assigned this Jul 30, 2019

Copy link

left a comment

The utility looks good to me. I was wondering if we should use it in the RECEIVE_ITEMS action right now (without the full edit PR)


This comment has been minimized.

Copy link
Contributor Author

commented Jul 30, 2019

The utility looks good to me. I was wondering if we should use it in the RECEIVE_ITEMS action right now (without the full edit PR)

I opted not to, because then we would be doing what the editor store already does and hamper performance unnecessarily.

@epiqueras epiqueras force-pushed the add/core-data-util-for-minimally-modifying-items branch from 340f616 to 2cc458d Jul 30, 2019

@epiqueras epiqueras merged commit 823ba36 into master Jul 30, 2019

1 of 3 checks passed

Filter opened Filter opened
Milestone It Milestone It
Travis CI - Pull Request Build Passed

@epiqueras epiqueras added this to Done in Phase 2 via automation Jul 30, 2019

@epiqueras epiqueras deleted the add/core-data-util-for-minimally-modifying-items branch Jul 30, 2019

@youknowriad youknowriad modified the milestones: Future, Gutenberg 6.3 Jul 31, 2019

@epiqueras epiqueras referenced this pull request Aug 29, 2019
5 of 5 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.