Customize: Add edit shortcuts in customizer preview to visually expose editable elements and focus on the corresponding controls when clicked.

* Edit shortcuts show initially for a moment and then fade away so as to not get in the way of the preview. 
* Visibility of edit shortcuts is toggled by clicking/touching anywhere inert in the document.
* Implements UI for mobile and touch devices which do not support shift-click.
* Adds `editShortcutVisibility` state.
* Adds new methods to `wp.customize.selectiveRefresh.Partial` for managing edit shortcuts.

Incorporates aspects of the Customize Direct Manipulation feature plugin.

Props sirbrillig, mattwiebe, celloexpressions, melchoyce, westonruter, afercia.
Fixes #27403.


git-svn-id: https://develop.svn.wordpress.org/trunk@38967 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter
2016-10-26 20:02:51 +00:00
parent 67420e4986
commit fda4409f40
8 changed files with 394 additions and 7 deletions
@@ -1039,6 +1039,10 @@ span + .edit-link:before,
outline: 1px dotted;
}
.secondary-navigation .customize-partial-edit-shortcut:before,
.footer-sidebar .widget:first-child .customize-partial-edit-shortcut:before {
left: 0;
}
/**
* 6.0 Content