Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#42024 closed task (blessed) (fixed)

Customizer: Add "customization locking"

Reported by: melchoyce's profile melchoyce Owned by: westonruter's profile westonruter
Milestone: 4.9 Priority: high
Severity: normal Version:
Component: Customize Keywords: has-patch has-dev-note
Focuses: Cc:

Description

Let's introduce locking to the Customizer, so it's harder to accidentally overwrite someone else's concurrent changes. This is especially important when multiple people are collaborating on building the same site.

See attached mockup.

Related: #31897, #31436

Attachments (2)

customize-locking.png (335.4 KB) - added by melchoyce 7 years ago.
42024.patch (616 bytes) - added by ramiy 7 years ago.

Download all attachments as: .zip

Change History (24)

#1 @melchoyce
7 years ago

(Just a note, "user" here is the user's display name)

#2 @westonruter
7 years ago

@melchoyce what about for the other user who gets their session taken from them? What should be shown to them?

#3 @melchoyce
7 years ago

Good question, especially since we don't have revisions. Let me think on it.

#4 @melchoyce
7 years ago

Okay... since we don't have revisions yet, what if we disallowed folks from taking over for now? Could do something like:

[User] is already customizing this site. Please wait until they are done to try customizing.

#5 @westonruter
7 years ago

  • Priority changed from normal to high

#6 @westonruter
7 years ago

  • Owner set to sayedwp
  • Status changed from new to assigned

This ticket was mentioned in Slack in #design by melchoyce. View the logs.


7 years ago

#9 @westonruter
7 years ago

  • Type changed from feature request to task (blessed)

I'm blessing this because this is an important enhancement for a major feature in the release (#39896), and users would experience defects otherwise when stomping on each other's changes.

This ticket was mentioned in Slack in #core by melchoyce. View the logs.


7 years ago

#11 @westonruter
7 years ago

  • Keywords has-patch added; needs-patch removed
  • Owner changed from sayedwp to westonruter
  • Status changed from assigned to accepted

#12 @westonruter
7 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 41839:

Customize: Add changeset locking in Customizer to prevent users from overriding each other's changes.

  • Customization locking is checked when changesets are saved and when heartbeat ticks.
  • Lock is lifted immediately upon a user closing the Customizer.
  • Heartbeat is introduced into Customizer.
  • Changes made to user after it was locked by another user are stored as an autosave revision for restoration.
  • Lock notification displays link to preview the other user's changes on the frontend.
  • A user loading a locked Customizer changeset will be presented with an option to take over.
  • Autosave revisions attached to a published changeset are converted into auto-drafts so that they will be presented to users for restoration.
  • Focus constraining is improved in overlay notifications.
  • Escape key is stopped from propagating in overlay notifications, and it dismisses dismissible overlay notifications.
  • Introduces changesetLocked state which is used to disable the Save button and suppress the AYS dialog when leaving the Customizer.
  • Fixes bug where users could be presented with each other's autosave revisions.

Props sayedwp, westonruter, melchoyce.
See #31436, #31897, #39896.
Fixes #42024.

#13 @westonruter
7 years ago

  • Keywords needs-dev-note added

#14 @westonruter
7 years ago

In 41919:

Customize: Fix visibility of overlay notifications in Safari.

Props sayedwp, westonruter.
Amends [41390].
See #35210, #42024, #42052.

@ramiy
7 years ago

#15 @ramiy
7 years ago

@westonruter please update the error message to match other permission error messages. See my patch.

Related: #34521

#16 @melchoyce
7 years ago

In 41953:

Customization Locking: Update error message to use existing strings.

Props ramiy.
See #42024.

#17 @ramiy
7 years ago

Thanks!

#19 @westonruter
7 years ago

In 42541:

Customize: Prevent frontend previewing from causing a customization lock on the changeset.

Props dlh.
Amends [41839].
See #42024.
Fixes #42975.

#20 @westonruter
7 years ago

In 42542:

Customize: Prevent frontend previewing from causing a customization lock on the changeset.

Props dlh.
Amends [41839].
See #42024.
Fixes #42975 for 4.9 branch.

#21 @westonruter
7 years ago

In 42612:

Customize: Ensure heartbeat keeps changeset locked when in branching mode.

Props dlh.
See #42024.
Fixes #42658.

#22 @SergeyBiryukov
7 years ago

In 42623:

Customize: Ensure heartbeat keeps changeset locked when in branching mode.

Props dlh.
See #42024.
Merges [42612] to the 4.9 branch.
Fixes #42658.

Note: See TracTickets for help on using tickets.