WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 5 months ago

#29386 new defect (bug)

Autosave message should disappear when the next autosave happens

Reported by: iseulde Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Autosave Keywords: has-patch
Focuses: javascript Cc:
PR Number:

Description

An autosave overwrites the previous autosave, so the message is no longer relevant. It will just display the same content as the current editor.

Attachments (2)

29386.diff (518 bytes) - added by adamsilverstein 5 years ago.
Remove the 'Newer autosave exists message' when autosaving
29386.patch (2.3 KB) - added by iseulde 5 years ago.

Download all attachments as: .zip

Change History (20)

@adamsilverstein
5 years ago

Remove the 'Newer autosave exists message' when autosaving

#1 @adamsilverstein
5 years ago

  • Component changed from Revisions to Autosave
  • Focuses javascript added
  • Keywords has-patch added

Good point, thats confusing!

In 29386.diff

Remove the 'Newer autosave exists message' when autosaving;

#2 @stephdau
5 years ago

Tested patch, works as advertised.

This ticket was mentioned in IRC in #wordpress-dev by stephdau. View the logs.


5 years ago

#4 @stephdau
5 years ago

  • Keywords 4.1-early added; has-patch removed

#5 @stephdau
5 years ago

  • Keywords has-patch added

#6 follow-up: @azaozz
5 years ago

If I remember right, the main reason it doesn't disappear is because that moves the whole screen about 50px up. Pretty annoying while typing.

#7 in reply to: ↑ 6 @adamsilverstein
5 years ago

Replying to azaozz:

If I remember right, the main reason it doesn't disappear is because that moves the whole screen about 50px up. Pretty annoying while typing.

I can see how that would be annoying, any ideas to alleviate that? once the autosave fires and matches the current content, the message is wrong - http://cl.ly/image/2n3P3H0W1W2w

how about fade out the message, then maybe remove it on the next blur from any input field?

This ticket was mentioned in IRC in #wordpress-dev by nacin1. View the logs.


5 years ago

@iseulde
5 years ago

#9 follow-up: @iseulde
5 years ago

Fade out would leave a big gap. I think it's better to do it on mousemove. We should think about touch devices too though. :)
I'm also not sure why the only child of a parent that has an id needs an id too, so I removed it in the patch.

#10 @iseulde
5 years ago

Can also scroll up the difference, if the page is scrolled down a bit. (See patch.)

Last edited 5 years ago by iseulde (previous) (diff)

#11 @adamsilverstein
5 years ago

Seems to address the issue azaozz raised. Not sure about mobile, also if you navigate entirely with keyboard the removal never fires.

How about - if tinymce has focus, remove on blur, if tinymce doesn't have focus remove immediately?

#12 in reply to: ↑ 9 ; follow-up: @azaozz
5 years ago

Replying to avryl:

I'm also not sure why the only child of a parent that has an id needs an id too, so I removed it in the patch.

The id is needed so we don't show two "restore" warnings (from the server and sessionStorage), used in autosave.js.

Version 0, edited 5 years ago by azaozz (next)

#13 in reply to: ↑ 12 @iseulde
5 years ago

Replying to azaozz:

The id is needed so we don't show two "restore" warnings (from the server and sessionStorage), used in autosave.js.

We can use #notice?

#14 @azaozz
5 years ago

Nope, this is for all notices. There can be 2-3 there at some point (there are plugins adding notices to all screens...).

Last edited 5 years ago by azaozz (previous) (diff)

#15 follow-up: @iseulde
5 years ago

With the ID notice? That's not good. Maybe we can change #notice to #has-newer-autosave and remove it from the child p.

#16 @azaozz
5 years ago

Yeah, duplicate IDs. Think that's been around for many years, hasn't been fixed because of back-compat.

#17 in reply to: ↑ 15 @azaozz
5 years ago

Replying to avryl:

On the other hand, the styling that (I think) used to use #notice is long gone. Perhaps we can ignore any additional div#notice and use that for detecting the "Has newer autosave.." one.

#18 @iseulde
5 years ago

  • Keywords 4.1-early removed
  • Milestone changed from Awaiting Review to Future Release
Note: See TracTickets for help on using tickets.