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

Show warning in editor when local draft is out of date #324

merged 1 commit into from Jul 22, 2020


Copy link

@thebaer thebaer commented Jun 11, 2020

When editing a post, this tracks the updated date that the local, in-browser draft is based on, and compares it to the post's actual updated value in the database.

If the database's updated value is after the local draft's updated date, this warning is shown to the user, allowing them to delete their local draft and load the latest version:

Screenshot from 2020-06-11 11-46-46

This fixes #41.

Testing notes: This PR includes style changes; update your stylesheet by running: make ui. Also note your database timezone must be set to UTC for this to work correctly.

  • I have signed the CLA
@thebaer thebaer added this to the 0.13 milestone Jun 11, 2020
Copy link

@cjeller1592 cjeller1592 commented Jun 11, 2020

Works good on my end!

Would it be worth it to add language mentioning if you want to override the draft updated elsewhere?

This post has been updated elsewhere since you last published! If you want to override that update, then continue with this draft. If not, delete draft and reload.

But that might be such a small use case that I don't think it's worth mentioning.

Copy link
Member Author

@thebaer thebaer commented Jul 22, 2020

Thanks for checking this out, @cjeller1592! I wanted to keep it concise, which is why I chose the current verbiage. But if it's confusing to people we can definitely change it in the future.

Merging this now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.