-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Chrome: Clear Post edits on save success #1092
Conversation
Curious if another option might work better: Rather than waiting 'til after the save and deciding then which keys should be omitted from In any case, if we keep as is, can we add an inline comment reflecting this intent:
|
cbfc6ba
to
69c34e8
Compare
I think the solution here is simpler and works just as well. I've added the comment. Fine to revisit later. Merging |
Oh! Sorry for the confusion, I probably dismissed this feedback quickly. let me rephrase this. What benefits do you see in optimistically update the currentPost? My thinking here is:
|
Thanks for elaborating. My thinking was primarily two-fold:
Not that optimistic updates aren't challenging. There are options though. |
This library looks awesome, I'll give it a try 👍 |
replaced by #1093 |
Currently, we're clearing post edits when we trigger the post save request, this has the drawback of reverting the post state for a small period of time (try switching to private, you'll notice a flickering in the visibility while saving).
This PR moves clearing post edits to the save success handler, but at the same time, if we made other edits while saving, these new edits are kept in the store.
Related #945 (comment)