Customize: Add rightward-facing back button to Themes section header to improve navigation (since the section slides in from the left).

Also serves to prototype for an upward-facing arrow in this location for a Publish Settings section.

Props melchoyce, westonruter.
See #39896, #40278, #21666.

Built from https://develop.svn.wordpress.org/trunk@41368


git-svn-id: http://core.svn.wordpress.org/trunk@41201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2017-09-11 05:23:48 +00:00
parent 88267bd891
commit f54cc32a6d
8 changed files with 46 additions and 6 deletions

View File

@ -1168,6 +1168,21 @@ p.customize-section-description {
border-right: none;
margin-top: 0;
}
#customize-theme-controls .control-section-themes .customize-section-back {
position: absolute;
left: 0;
top: 0;
height: 80px;
border-right: 1px solid #ddd;
border-left: 4px solid #fff;
}
#customize-theme-controls .control-section-themes .customize-section-back:before {
content: "\f341";
}
#customize-theme-controls .control-section-themes .customize-section-back:hover,
#customize-theme-controls .control-section-themes .customize-section-back:focus {
border-left-color: #0073aa;
}
#customize-theme-controls .control-section-themes .customize-themes-panel .accordion-section-title:first-child:hover, /* Not a focusable element. */
#customize-theme-controls .control-section-themes .customize-themes-panel .accordion-section-title:first-child {

File diff suppressed because one or more lines are too long

View File

@ -1168,6 +1168,21 @@ p.customize-section-description {
border-left: none;
margin-top: 0;
}
#customize-theme-controls .control-section-themes .customize-section-back {
position: absolute;
right: 0;
top: 0;
height: 80px;
border-left: 1px solid #ddd;
border-right: 4px solid #fff;
}
#customize-theme-controls .control-section-themes .customize-section-back:before {
content: "\f345";
}
#customize-theme-controls .control-section-themes .customize-section-back:hover,
#customize-theme-controls .control-section-themes .customize-section-back:focus {
border-right-color: #0073aa;
}
#customize-theme-controls .control-section-themes .customize-themes-panel .accordion-section-title:first-child:hover, /* Not a focusable element. */
#customize-theme-controls .control-section-themes .customize-themes-panel .accordion-section-title:first-child {

File diff suppressed because one or more lines are too long

View File

@ -1164,6 +1164,15 @@
attachEvents: function () {
var section = this;
// Expand/Collapse accordion sections on click.
section.container.find( '.customize-section-back' ).on( 'click keydown', function( event ) {
if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
return;
}
event.preventDefault(); // Keep this AFTER the key filter above
section.collapse();
});
// Expand/Collapse section/panel.
section.container.find( '.change-theme, .customize-theme' ).on( 'click keydown', function( event ) {
if ( api.utils.isKeydownButNotEnterEvent( event ) ) {

File diff suppressed because one or more lines are too long

View File

@ -50,6 +50,7 @@ class WP_Customize_Themes_Section extends WP_Customize_Section {
</h3>
<div class="customize-themes-panel control-panel-content themes-php">
<h3 class="accordion-section-title customize-section-title">
<button class="customize-section-back" tabindex="0" type="button"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></button>
<span class="customize-action"><?php _e( 'Customizing' ); ?></span>
<?php _e( 'Themes' ); ?>
<span class="title-count theme-count"><?php echo count( $this->controls ) + 1 /* Active theme */; ?></span>

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41367';
$wp_version = '4.9-alpha-41368';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.