Add edits data to the useEntityRecord#54167
Conversation
|
Size Change: +21 B (0%) Total Size: 1.51 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 5b4ac31. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6079354743
|
mikachan
left a comment
There was a problem hiding this comment.
This looks good to me and is working and testing well. I'm not too familiar with this side of the codebase, so I've pinged a few other folks who may be able to help review this 🙇
|
Thanks for the ping, @mikachan. @matiasbenedetto, what would be the use case of the |
|
Hi thanks both for taking a look!
@Mamaduka the use case would be to know if some specific object path has changed. In this way, we would be able to detect and later on, save only the changes on the specified object path using __experimentalSaveSpecifiedEntityEdits() as we are doing in this Font Library PR: #53884 |
Mamaduka
left a comment
There was a problem hiding this comment.
Thanks for the additional details, @matiasbenedetto!
The changes here look good to me 👍
What?
Get the edits from an entity record using the
useEntityRecordhook.Why?
Currently, we can know if the entity has edits or not. With this change, we are getting the edits from the entity.
How?
By returning a
editskey in the output of theuseEntityRecordhook containing the nonTransientEdits of an entity record.Testing Instructions
Expected result: