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

Add support for Core Data Entities Actions #7175

Conversation

youknowriad
Copy link
Contributor

@youknowriad youknowriad commented Jun 6, 2018

Since Fetching Entities including Posts is happening in core-data, the logical thing to do is to move updating/removing posts to the the core-data module.

This is just a POC for the moment and it builds on #6999

The idea is instead of calling the API request in the editor module directly when dispatch an async action to core-data. This surfaces a lot of things (more questions than answers)

  • A need for async actions to rely on async actions on other modules (or effects to rely on async effects in other modules). In the current PR, this is solved by the fact that async actions return a promise with the returned value from the generators. Whichever solution we end up using, we need something like that: calling side effects from other modules and acting on their result.

  • Questions about the currentPost state and whether it's wise to keep it in the editor state or if we should just rely on the post object already available in core-data.

  • Questions about the optimistic updates and whether it's a good fit for the entities because we can't optimistically update the post object, since we'll override the title.rendered and content.rendered. These might get used in other modules (other than the editor) and we can't just overwrite them. Maybe we should only send { title: raw } to the API if the API supports updates this way but this is not perfect as well because we'd leave a rendered value not in sync with the raw value, so not certain if we should keep the optimistic updates.

@youknowriad youknowriad added the [Status] In Progress Tracking issues with work in progress label Jun 6, 2018
@youknowriad youknowriad self-assigned this Jun 6, 2018
@youknowriad youknowriad requested a review from aduth June 6, 2018 12:23
@mtias mtias mentioned this pull request Aug 1, 2018
6 tasks
@gziolo
Copy link
Member

gziolo commented Aug 13, 2018

It doesn't change any existing APIs, removing it from API freeze project.

@aduth
Copy link
Member

aduth commented Aug 13, 2018

Given this extends the (now-closed) #6999, should we close this? Or base it against another branch?

@youknowriad
Copy link
Contributor Author

I tried to rebase this branch using the controls API, but I lack these two things to move it forward:

  • Access the registry from the "controls"
  • Having a way to use "controls" in resolvers as well.

I don't mind closing it, I just need it for copy/pasting things when everything is sorted out :)

@youknowriad youknowriad deleted the add/support-for-core-data-actions branch August 13, 2018 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants