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

Collapse the publish sidebar when making edits to a published post #4978

Merged
merged 2 commits into from
Feb 15, 2018

Conversation

mtias
Copy link
Member

@mtias mtias commented Feb 9, 2018

Closes #4976.

As described in the issue, this seeks to close the post-publish sidebar if the user makes edits to a post they just published.

It will benefit from work being done in #4955.

@mtias mtias added [Feature] Document Settings Document settings experience [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... labels Feb 9, 2018
@mtias mtias force-pushed the add/collapse-publish-sidebar-when-editing branch from e14b6dc to 14cd3ff Compare February 9, 2018 12:23
@mtias mtias force-pushed the add/collapse-publish-sidebar-when-editing branch from 14cd3ff to 618db7b Compare February 12, 2018 19:25

// Automatically collapse the publish sidebar when
// a post is published and the user makes an edit.
if ( this.props.isPublished && newProps.isDirty ) {
Copy link
Member

Choose a reason for hiding this comment

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

Minor: componentWillReceiveProps is slated for deprecation in favor of either static getDerivedStateFromProps or componentDidUpdate. Since this doesn't classify as a state derivation, it'd be most future-proof to include this logic in a componentDidUpdate.

@mtias
Copy link
Member Author

mtias commented Feb 13, 2018

@aduth mind checking again?

@mtias mtias merged commit a7478db into master Feb 15, 2018
@mtias mtias deleted the add/collapse-publish-sidebar-when-editing branch February 15, 2018 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Document Settings Document settings experience [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make editing more easy from the end of the publishing flow
2 participants