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

[Feature] Post Auto Save #1413

Closed
ErisDS opened this issue Nov 6, 2013 · 15 comments
Closed

[Feature] Post Auto Save #1413

ErisDS opened this issue Nov 6, 2013 · 15 comments
Labels
affects:admin Anything relating to Ghost Admin feature [triage] New features we're planning or working on
Milestone

Comments

@ErisDS
Copy link
Member

ErisDS commented Nov 6, 2013

Requires #1351 to be completed first. We should auto-save a user's content every time they stop typing for ~5 seconds (lets play with this and see what feels right).

Posts with no title

If a post does not have a title, then it cannot be saved yet. Auto-save should automatically replace empty titles with '(Untitled)' and give the post a slug which is just a number. The title '(Untitled)' should appear on the content screen, but the title placeholder in the editor should remain.

Once a title is added, everything can go back to normal as per #1351

Published Posts

Published content may not be auto saved.

Saving and syncing

Future requirement: Auto-save should save the content to localstorage as often as possible, then attempt to sync to the server.

@ErisDS
Copy link
Member Author

ErisDS commented Nov 6, 2013

It's worth noting that some work was done to save using localstorage in #691

@Gawyn
Copy link

Gawyn commented Jul 7, 2014

How is this issue going? I am really interested on it and would like to help if possible.

@novaugust
Copy link
Contributor

@Gawyn So far as I know, we have no work on this. A PR would be more than welcome =)

@ErisDS
Copy link
Member Author

ErisDS commented Jul 7, 2014

It's a pretty different kettle of fish now that we've redone the API and rewritten the admin in ember. It should be much easier to implement than it was a few months ago ;)

@novaugust
Copy link
Contributor

I just want to chime in with, it'd be pretty dangerous to auto-save a
published post, right?

On Mon, Jul 7, 2014 at 9:56 AM, Hannah Wolfe notifications@github.com
wrote:

It's a pretty different kettle of fish now that we've redone the API and
rewritten the admin in ember. It should be much easier to implement than it
was a few months ago ;)


Reply to this email directly or view it on GitHub
#1413 (comment).

@ErisDS ErisDS changed the title Post Auto Save [Feature] Post Auto Save Sep 2, 2014
@ErisDS ErisDS modified the milestones: 0.5.x Backlog, Future Backlog Sep 2, 2014
@techguydave
Copy link

Yes, it would be pretty dangerous to do it to a published post. Ghost doesn't use revisions like WP, does it?

@ErisDS
Copy link
Member Author

ErisDS commented Oct 1, 2014

Not yet ;)

@novaugust novaugust self-assigned this Oct 1, 2014
@novaugust
Copy link
Contributor

@JohnONolan What sort of feedback do you want the user to get when the post auto saves?

@novaugust novaugust removed the help wanted [triage] Ideal issues for contributors to help with label Oct 1, 2014
@JohnONolan
Copy link
Member

Absolutely nothing! Everything in the background

@novaugust
Copy link
Contributor

No NProgress, even?

edit Ha, in other words, when you say absolutely nothing, you mean absolutely nothing?

@JohnONolan
Copy link
Member

Definitively not - would be distracting (or even distressing) in the context of mid-way through writing a post. Auto-save shouldn't be something you notice, it should just happen

@novaugust
Copy link
Contributor

copy that

@novaugust
Copy link
Contributor

Turns out I'm going to be moving this weekend; unassigning myself as I've yet to write any code for this, in case anyone else wants to have a go =)

@novaugust novaugust assigned novaugust and unassigned novaugust Oct 3, 2014
novaugust added a commit to novaugust/Ghost that referenced this issue Oct 13, 2014
Ref TryGhost#1413
- If the user stops typing for 5 seconds, a "typingPause" action is sent from the GhCodemirrorComponent
- Editor-base-controller ties the "typingPause" action to its "autosave"
- If a post is being saved and does not have a title, the title is set to "(Untitled)"
- Cleanup editor base controller property dependencies and code
ErisDS added a commit to ErisDS/Ghost that referenced this issue Oct 17, 2014
issue TryGhost#4259, issue TryGhost#1413

- decrease timeout by 1 sec
- really actually turn off nprogress
ErisDS added a commit to ErisDS/Ghost that referenced this issue Oct 18, 2014
issue TryGhost#4305, issue TryGhost#4259, issue TryGhost#1413

- change new->edit transitionToRoute to be replaceRoute
- auto focus in the editor on transition to the edit route
- change the one-time autosave to happen on codemirror focusin instead of title focusout
- re-add removed tests, and reorder broken test
@novaugust
Copy link
Contributor

Unassigning myself until we figure out what happens next here =)

@novaugust novaugust removed their assignment Oct 21, 2014
@novaugust
Copy link
Contributor

The next thing is, this gets closed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:admin Anything relating to Ghost Admin feature [triage] New features we're planning or working on
Projects
None yet
Development

No branches or pull requests

5 participants