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

Integrate dirty state, API requests, and publish button #700

Merged
merged 1 commit into from
May 9, 2017

Conversation

nylen
Copy link
Member

@nylen nylen commented May 7, 2017

This simple PR integrates post saving/updating introduced in #594 and dirty state introduced in #610.

Make SavedState aware of API requests

To test: Edit a post until it shows "Unsaved changes" in the top left. Save it via the Update/Save draft button and observe that the text changes from "Unsaved changes" to "Saved".

Make PublishButton aware of dirty state

To test: Save a post using the Update/Save draft button. The button will show "Updated!" or "Saved!".
Edit a post until it shows "Unsaved changes" in the top left. Verify that the button text changes back to "Update" or "Save".

Next steps

In short: error handling. Currently errors are indicated by the PublishButton showing "Update failed" or "Save failed". In this PR, the error state is cleared when the post is modified again. However, really we probably want a red error icon/message next to the publish button instead, and this would stick around after the post is edited. This should be a separate task that builds on @jasmussen's mockups from #594 (comment).

- Make `SavedState` aware of API requests
- Make `PublishButton` aware of `dirty` state
Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@mtias mtias added the General Interface Parts of the UI which don't fall neatly under other labels. label May 9, 2017
@nylen nylen merged commit 757f1a8 into master May 9, 2017
@nylen nylen deleted the fix/integrate-dirty-saved-state branch May 9, 2017 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General Interface Parts of the UI which don't fall neatly under other labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants