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

Initialize new post with auto-draft #1967

Merged
merged 2 commits into from
Jul 24, 2017
Merged

Initialize new post with auto-draft #1967

merged 2 commits into from
Jul 24, 2017

Conversation

aduth
Copy link
Member

@aduth aduth commented Jul 20, 2017

This pull request seeks to initialize a new post draft with an auto-draft, matching the behavior of the current post editor, for a few reasons:

  • Simplifies initialization steps by being able to assume a post object always exists
  • Enables "Uploaded to" media library behavior
  • Will allow access to correct default post values (comment status, ping status, category, format, etc)
    • I'm hoping to use this for more accurate dirty detection between edited and saved post values

Testing instructions:

Verify that for all intents and purposes, a new post looks and acts as though it has not yet been saved. This includes: No save button until edits made, no post permalink when focusing title, no Trash button, no revisions (nor revisions network requests), no warnings when navigating away without edits, updated URL after first save.

@aduth aduth added the Framework Issues related to broader framework topics, especially as it relates to javascript label Jul 20, 2017
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

Tested this and it seems to work as expected 👍

Next step would be the auto-save feature and "save & preview"

@aduth
Copy link
Member Author

aduth commented Jul 24, 2017

@youknowriad See #1945 for autosave.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues related to broader framework topics, especially as it relates to javascript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants