-
Notifications
You must be signed in to change notification settings - Fork 179
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
Story Locking: Autosave on takeover #12373
Conversation
Plugin builds for a480b6c are ready 🛎️!
|
Size Change: +61 B (0%) Total Size: 2.71 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks OK but eyes from Prometheus pod would be great
showLockedDialog && | ||
user && | ||
hasNewChanges && | ||
!isFirstTime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why only when !isFirstTime
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The take over message should show until this is not the first time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To Miina's point, the variable wording is not the most intuitive, but at this point I guess it is what it is :-)
#12357 is merged now, so this can be updated here |
Tested this feature by logging in as an admin user and an editor user on two different browsers , and within the same browser, via two different sessions. Confirmed that after take over by either admin or editor user, when the previous session is updated, but NOT saved, there is an auto-draft that is made. This is reflected in the other browser/session upon refresh so that changes made in the taken-over editor now reflect on the new owner of the editor session. Test Variations:
|
@spacedmonkey - wanted to run some scenarios by you to confirm this is expected: Scenario 1: When Admin user creates a story, but its taken over by Editor user, there is a notification sent to Admin user saying someone else has taken over. But the Admin user is able to click outside that notification and continue editing the story. After some time, if the Admin user now reloads the editor, there are two overlays one-on-top-of-the-other
Isn't it confusing that the user has to deal with two notifications one on top of the other ? Cc: @swissspidy |
Scenario 2: After Editor user takes over a story Admin is editing, because the Admin can click outside the notification about someone taking over the story, and she can continue to edit her version of the story. Later, if the Editor refreshes the open story that was taken over, the story is updated with the changes that the Admin made after takeover ! There seems to be a delay between when the story take over notice is sent to previous editor sessions, and how the local edits are auto-saved. As a result, both parties can to continue editing by skipping over the take over notification, leading to auto-saved edits being transferred between the two open editor instances. |
This should not happen.
This should not happen. Both would require new tickets to be opened. @kkalarickal Could you test the same scenarios in the WordPress post editor so that we have something to compare against? |
@swissspidy - i created #12430 to track the issue with "user is able to click outside that notification and continue editing the story". This ticket also has the double overlay in it. I was not able to re-create the double overlay consistently, but thought I would include it in the ticket. |
Context
Summary
Trigger an autosave when user has their story taken over.
Relevant Technical Choices
Only trigger if they are changes in the story. Otherwise, it will trigger a REST API call that returns a 400 error.
To-do
User-facing changes
Testing Instructions
This PR can be tested by following these steps:
0. Enable autosaving and take over post locking experiment.
Reviews
Does this PR have a security-related impact?
Does this PR change what data or activity we track or use?
Does this PR have a legal-related impact?
Checklist
Type: XYZ
label to the PRFixes #12325