Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
🎨 Added a "saved" indicator for autosaved draft posts
Browse files Browse the repository at this point in the history
refs TryGhost/Product#779

For draft posts the editor autosaves after each change but if you didn't see the "Saving..." indicator it wasn't clear what the save status of the post was. The editor will now always show "Saved" when there are no unsaved changes.

- removed indicator from published and scheduled posts because there's no autosave there
- removed the labs flag
  • Loading branch information
kevinansfield committed Aug 31, 2021
1 parent 291da19 commit 401aeb6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 23 deletions.
10 changes: 1 addition & 9 deletions app/components/gh-editor-post-status.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
{{else if (eq @post.email.status "submitted")}}
and sent to {{gh-pluralize @post.email.emailCount "member"}}
{{/if}}
{{#if (feature "savedIndicator")}}
{{if (not @hasDirtyAttributes) "- Saved"}}
{{/if}}
{{else if @post.isScheduled}}
<time datetime="{{@post.publishedAtUTC}}" class="ml1 green f8" data-test-schedule-countdown>
Will be published
Expand All @@ -19,15 +16,10 @@
{{/if}}
{{this.scheduledTime}}
</time>
{{#if (feature "savedIndicator")}}
{{if (not @hasDirtyAttributes) "- Saved"}}
{{/if}}
{{else if @post.isNew}}
New
{{else}}
Draft
{{#if (feature "savedIndicator")}}
{{if (not @hasDirtyAttributes) "- Saved"}}
{{/if}}
{{if (not @hasDirtyAttributes) "- Saved"}}
{{/if}}
</div>
1 change: 0 additions & 1 deletion app/services/feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export default Service.extend({
multipleProducts: feature('multipleProducts', {developer: true}),
membersFiltering: feature('membersFiltering', {developer: true}),
emailCardSegments: feature('emailCardSegments', {developer: true}),
savedIndicator: feature('savedIndicator', {developer: true}),
featureImgDragDrop: feature('featureImgDragDrop', {developer: true}),
oauthLogin: feature('oauthLogin', {developer: true}),
emailOnlyPosts: feature('emailOnlyPosts', {developer: true}),
Expand Down
13 changes: 0 additions & 13 deletions app/templates/settings/labs.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -270,19 +270,6 @@
</div>
</div>
</div>
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Show saved state in editor</h4>
<p class="gh-expandable-description">
Post status in editor shows "- Saved" when a post has no unsaved changes
</p>
</div>
<div class="for-switch">
<GhFeatureFlag @flag="savedIndicator" />
</div>
</div>
</div>
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
Expand Down

0 comments on commit 401aeb6

Please sign in to comment.