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

Disallow undo on "clear authorship colors" #3801

Merged
merged 15 commits into from
Apr 8, 2020

Conversation

JohnMcLear
Copy link
Member

@JohnMcLear JohnMcLear commented Mar 31, 2020

Don't allow user to undo clear authorship colors.

This fixes #2802 in a not so graceful way.

I also think it will fix a lot of broken Etherpad related issues, however, it doesn't stop the potential pad breakage issue. That needs to be fixed somehow, for example, if someone did manage to get the server in a bad state this is only remedied here but not fixed.

  • Notifies user prior to clear that this cannot be undone
  • Test coverage (will do once accepted as a method [but prior to merge])
  • Spoken to some admins to see if they would accept this change in behavior and they agreed it was fine. The reason being is that if user X clicks clear authorship colors then it's not as if user Y can undo that change anyway.
  • All translations will need to be updated :|

The best thing to remedy this would be a plugin (such as ep_author_hover) which shows the author of a span on hover.

@JohnMcLear JohnMcLear requested a review from muxator March 31, 2020 11:09
@JohnMcLear
Copy link
Member Author

@muxator wanna give your opinion on this? I'd like to merge it.

@JohnMcLear JohnMcLear added this to the 1.8.1 milestone Apr 3, 2020
@muxator
Copy link
Contributor

muxator commented Apr 6, 2020

I agree removing support for undoing clearauthorship is the most practical approach right now.

As usual, there is an underlying bug laying somewhere that needs to be tackled (I suspect the usual joys of dynamic languages & lack of runtime validation).

Testing it now.

@muxator muxator force-pushed the non-undo-clear-authorship branch 2 times, most recently from b2914ee to 41a2b52 Compare April 6, 2020 22:34
@muxator
Copy link
Contributor

muxator commented Apr 6, 2020

Edit: message removed, non relevant content.

Clearing the authorship colors of a document with at least two authors, and then
undoing that action caused a disconnect from the pad.
This change disallows undoing clearing authorship colors in order to prevent
the problem from affecting users, and adds the relative test coverage.

This is a change of behaviour, and is documented in the changelog.

Fixes ether#2802 (sidestepping it).
@muxator
Copy link
Contributor

muxator commented Apr 6, 2020

Since this is a change of behaviour, I added a note in the changelog.

Waiting for final comments at #2802, or merging if nothings surfaces.

@muxator muxator changed the title Non undo clear authorship Disallow undo on "clear authorship colors" Apr 6, 2020
@JohnMcLear
Copy link
Member Author

JohnMcLear commented Apr 7, 2020

NOTE: You will need to merge this into develop then give TW / @Nikerabbit 's teams some time to do translations before releasing..

  • Test Coverage
    • Merge to develop
      • Get Translations

@Nikerabbit - is there a way we can set a translation requirement as a "priority" so it gets dealt with within X duration? Obv we will compensate for time if required. Or is it possible we can get the strings processed on TW then merge them in? Like if we manually add a en.json change to you guys?

@JohnMcLear
Copy link
Member Author

Due to time constraints here I will get test coverage done within an hour.

@JohnMcLear
Copy link
Member Author

Tests in.

@JohnMcLear
Copy link
Member Author

One thing worth noting is that the change in behavior (lack of undo event in the stack) might confuse some people.

For example;

  1. user types hello
  2. clears authorship
  3. expects undo stack to clear authorship but it actually removes hello

I could write a "blank event" to the undo stack OR we just leave it as it currently stands in this PR. For me I'm inclined to leave it as it is because it's bad practice to pollute the undo stack with "null" events and also we do say "it can't be undone in the dialog (note that this is not present on clearing just a selection of text".

I'm no UX expert and I'm mindful we need to get this in quickly.

Another option could be to allow undo events of clear authorship to be written to the stack but on execution of the undo event to pop up a gritter msg saying "can't undo clear authorship events"..

Either way, we need translations stat :)

@JohnMcLear JohnMcLear changed the title Disallow undo on "clear authorship colors" [PRIORITY] Disallow undo on "clear authorship colors" - READY FOR REVIEW / MERGE Apr 7, 2020
@muxator
Copy link
Contributor

muxator commented Apr 7, 2020

expects undo stack to clear authorship but it actually removes hello

Not nice, but acceptable for me. The other options seem even more confusing.

Waiting for translations.

@JohnMcLear
Copy link
Member Author

Don't wait for translations, see above. Afaik TW can't do work until it's in develop! :D

@muxator muxator merged commit babf671 into ether:develop Apr 8, 2020
@muxator
Copy link
Contributor

muxator commented Apr 8, 2020

Merged, thanks.

@muxator muxator changed the title [PRIORITY] Disallow undo on "clear authorship colors" - READY FOR REVIEW / MERGE Disallow undo on "clear authorship colors" Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undoing causes disconnect
2 participants