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
merged 1 commit into from Jul 30, 2019

Conversation

@epiqueras
Copy link
Contributor

commented Jul 30, 2019

Extracted from #16761

Description

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.

Checklist:

  • 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

@youknowriad
Copy link
Contributor

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)

@epiqueras

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
Details
Milestone It Milestone It
Details
Travis CI - Pull Request Build Passed
Details

@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
Projects
2 participants
You can’t perform that action at this time.