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

Hide Save [Draft] button if post is published #2058

Merged
merged 1 commit into from
Jul 28, 2017
Merged

Conversation

aduth
Copy link
Member

@aduth aduth commented Jul 27, 2017

Related: #2020 (comment)

This pull request seeks to omit the "Save" header button for published posts. Instead, the "Save" button is only offered as a means to save non-published posts with unsaved changes. A future revision will seek to add a "Revert to Draft" action.

Testing instructions:

Verify that Save is offered for drafts but not published posts:

  1. Navigate to Gutenberg > New Post
  2. Enter a title and/or content
  3. Note that Save is shown
  4. Press Publish
  5. Note that Save is not shown
  6. Make changes to the post
  7. Note that Save is still not shown

@aduth aduth added the General Interface Parts of the UI which don't fall neatly under other labels. label Jul 27, 2017
@aduth aduth requested a review from jasmussen July 27, 2017 19:11
@codecov-io
Copy link

Codecov Report

Merging #2058 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2058      +/-   ##
=========================================
+ Coverage   18.88%   18.9%   +0.01%     
=========================================
  Files         130     130              
  Lines        4204    4211       +7     
  Branches      716     718       +2     
=========================================
+ Hits          794     796       +2     
- Misses       2872    2875       +3     
- Partials      538     540       +2
Impacted Files Coverage Δ
editor/header/saved-state/index.js 85.71% <100%> (ø) ⬆️
editor/utils/url.js 46.15% <0%> (-20.52%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fcc62a3...df0c5d4. Read the comment docs.

@jasmussen
Copy link
Contributor

Looks good 👍 👍

This is a good start. As we finetune autosave, we might want to polish this further. For example, showing "Saved" still there (because it's true) and "Saving..." also when the Update button is pressed.

@aduth aduth merged commit 8b4b68d into master Jul 28, 2017
@aduth aduth deleted the remove/save-published branch July 28, 2017 13:16
ceyhun pushed a commit that referenced this pull request Apr 22, 2020
…e_code_block

Stop scrolling inside the code block
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