-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Enable Heartbeat Post Locking #4331
Comments
Ran into this today. One thing we should make sure is that the post locking works if someone is in the classic editor as well. While unlikely after it's merged into core, it's entirely possible a classic editor or ramping type plugin could cause both editors to continue to exist. |
This will work correctly as long as we use the same mechanism for locking for Gutenberg as for the classic editor. I tested this in my original PR (#4217) that used the heartbeat API and included post locking by opening a post in Gutenberg, then trying to open in the classic editor and the other way around. I reopened my PR and will refresh and re-test to confirm. |
I feel this feature should be added before 4.9.8 is released. Loosing changes could easily ruin people's experience with Gutenberg. |
I'll update the PR. |
@karmatosed from a design perspective, do you think an overlay and modal like we have in core currently is appropriate for the takeover interaction (see screenshots above). Or, do you have some other ideas howe we can implement these interactions: when a user opens a post another user has locked and when another user takes over editing of a post you are editing. Do we have an existing method/instance where we lock Gutenberg and/or display an overlay? Media? |
Ah, maybe the new Modal component: #6261 |
Great idea @adamsilverstein, here is my suggestion. I do wonder if it has to be a primary button to view posts or a link will do - happy to go with whatever works there, my leaning is towards a link. |
@karmatosed - I posted updated code for this feature in #4217. Looking now I see I didn't do very well trying to match your design mocks with the current modal component because unlike your mocks, the modal includes a title area with a subtle divider line, then a content area below. I wound up putting the gravatar and text in the top (icon/title) section and the buttons in the "content" section. You can see some screenshots of how it looks on the PR. Looking back at your mocks they really look much better, so maybe I should take another swing at it and add some flexibility into the modal to add a conditional to hide the divider or the title row/section entirely? I already added a conditional to remove the close button because these modals can't be closed directly. I can also try reworking the primary button into a link as you suggested, which will probably look better. |
Ok, I fixed the PR so the UI more closely match the designs you presented here @karmatosed and posted updated screenshots: #4217 (comment) Could still use a little CSS love to make it look great. |
+1 to merging this before 4.9.8. Important if not critical for high volume publishing. |
Wanted to add a +1 to this. Incredibly important to at least trigger the lock as soon as an editor opens the page to prevent unexpected loss of data. |
With WordPress 5.0 RC expected in a month I am getting anxious that this is not going to be in Gutenberg in time for WordPress 5.0 release which would not be good. |
Issue Overview
Enable heartbeat based post locking functionality.
Work with the existing editor functionality for post locking. Enhance when collaborative editing is available by offering 'Collaborate' as an additional option in the takeover modal and possibly post list options.
Expected Behavior
Testing
Current Behavior
Screenshots
Some screenshots from the classic editor:
post list lock indicator:
takeover modal, note editor is disabled:
another user took over the post being edited modal, note editor is disabled:
Related Issues and/or PRs
#4218
The text was updated successfully, but these errors were encountered: