[wp-trac] [WordPress Trac] #30937: Add Customizer state persistence in changesets (formerly “transactions”)

WordPress Trac noreply at wordpress.org
Fri Oct 7 23:11:27 UTC 2016


#30937: Add Customizer state persistence in changesets (formerly “transactions”)
-------------------------------------------------+-------------------------
 Reporter:  westonruter                          |       Owner:
     Type:  feature request                      |  westonruter
 Priority:  high                                 |      Status:  assigned
Component:  Customize                            |   Milestone:  4.7
 Severity:  normal                               |     Version:
 Keywords:  has-patch needs-testing needs-unit-  |  Resolution:
  tests                                          |     Focuses:
-------------------------------------------------+-------------------------

Comment (by westonruter):

 Key addition to the latest patch: now when you make a change to a
 `theme_mod` in theme A (like change background color to red) and then
 switch to another theme B and activate it instead, the next time you open
 theme A in the customizer for live preview the changes you made previously
 will be applied as your customizer state (the color will be background
 color will be red again). This is implementing
 [https://wordpress.slack.com/archives/core-customize/p1475701646001630
 feedback] from @jorbin:

 > With this feature I would strongly encourage thinking in terms of user
 flow.
 >
 > For example, "As a user, when I am live previewing and making changes to
 the twentyseventeen theme and then switch to live previewing the twentyten
 theme, I expect the customizations I made to twentyseventeen to be there
 the next time I live preview it"

 Here are the full set of changes since last comment:
 https://github.com/xwp/wordpress-develop/pull/161/files/c3c6b82..8090d71

 The full PR: https://github.com/xwp/wordpress-develop/pull/161

 Commit log:

 * [https://github.com/xwp/wordpress-develop/pull/161/commits/fe506ff
 fe506ff] Fix test_previewing_with_switch_to_blog
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/dc44bf5
 dc44bf5] Remove deprecated remove_preview_signature
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/e2d39d4
 e2d39d4] De-duplicate parseQueryString and add utils to customize-base
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/9bcb253
 9bcb253] Remove references to previewer signature
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/19b2224
 19b2224] Fix merging of changes on top of existing changes
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/231a49e
 231a49e] Store theme mods with active theme namespace; skip reading
 changeset value if theme namespace does not match current theme
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/7fe74f4
 7fe74f4] Remove erroneous empty_customize_changeset_data error (causes
 publish failures)
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/48ef530
 48ef530] Fix saving theme_mod settings and prepare for stashing non-
 activated themes' theme mods
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/36987cb
 36987cb] Register customize_changeset post type with can_export as false
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/a3cc2e7
 a3cc2e7] Add missing hook doc for customize_register
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/9d5de88
 9d5de88] Account for JSON_UNESCAPED_SLASHES not being defined
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/d3da320
 d3da320] Include customize_changeset in list of exported post types if
 can_export even though _builtin
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/131145f
 131145f] Create administrator user in wpSetUpBeforeClass and re-use in
 tests
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/3918062
 3918062] Harden changeset update requests to prevent race conditions from
 overlapping requests; re-send pending changes in next request upon failure
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/16da045
 16da045] Remove theme_mod from setting ID prefix since redundant
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/55fa378
 55fa378] Prevent prematurely refreshing preview if existing changeset
 requests complete and there are new ones queued
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/9749ef1
 9749ef1] Introduce saving state and let UI listen for it and block saves
 if currently saving
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/a90309c
 a90309c] Fix typo where active theme settings were added to inactive theme
 mod settings
 * [https://github.com/xwp/wordpress-develop/pull/161/commits/0a37637
 0a37637] Ensure that old_sidebars_widgets_data setting is populated for
 previewed theme

 (Log generator: `git log c3c6b82..8090d71 ^origin/master --oneline --no-
 merges --reverse | sed 's#^\([^ ]*\)#* [https://github.com/xwp/wordpress-
 develop/pull/161/commits/\1 \1]#'`)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30937#comment:65>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list