Opened 12 months ago

Closed 12 months ago

Last modified 12 months ago

#20692 closed enhancement (fixed)

Handle unsaved changes in the customizer

Reported by: koopersmith Owned by: helenyhou
Priority: normal Milestone: 3.4
Component: Appearance Version: 3.4
Severity: normal Keywords: has-patch
Cc:

Description

Losing your changes is no fun.

The way I see it, we have two options:

1) Show an AYS when leaving the customizer by using an onbeforeunload handler.
2) Store unsaved customizations in a customize_data_$stylesheet option. The fact that certain customize settings persist across theme changes (options) while others don't (theme_mods and some theme-specific options) could pose a problem.

I say let's start with #1.

Attachments (1)

20692.diff (2.4 KB) - added by helenyhou 12 months ago.

Download all attachments as: .zip

Change History (6)

comment:1 follow-up: ↓ 2   jane12 months ago

  • Type changed from defect (bug) to enhancement

I'd hate to put in an unnecessary AYS. IF it's that big a concern, would be better to bring save up to top and have blue "Save & Activate" on right, 2ndary button for "Cancel" instead of "Return to Manage Themes" on left.

comment:2 in reply to: ↑ 1   koopersmith12 months ago

  • Keywords needs-patch added
  • Owner set to helenyhou
  • Status changed from new to assigned

Replying to jane:

I'd hate to put in an unnecessary AYS. IF it's that big a concern, would be better to bring save up to top and have blue "Save & Activate" on right, 2ndary button for "Cancel" instead of "Return to Manage Themes" on left.

I like this idea quite a bit.

From dev chat, helenyhou is going to take a stab at the patch.

  • Keywords has-patch added; needs-patch removed
  • Resolution set to fixed
  • Status changed from assigned to closed

In [20864]:

Theme Customizer: Change 'Return to...' link to 'Cancel' and move 'Save' button to header. props helenyhou, fixes #20692, see #19910.

In [20877]:

"Save & Activate", "Save & Publish" for customizer save button. Props jane. see #20692 #19910

Note: See TracTickets for help on using tickets.