Make WordPress Core


Ignore:
Timestamp:
03/07/2023 03:29:47 PM (15 months ago)
Author:
hellofromTonya
Message:

Editor: Update @wordpress packages for 6.2 Beta 5.

Updates the @wordpress packages to include the following changes:

  • Add border radius to off canvas navigation menu items
  • Remove border from quick inserter child elements
  • Show variant patterns even if there are no patterns for the Query Loop block
  • Order initial block items in Navigation with PrivateInserter
  • Update: Add descriptions to all panels in the Site Editor's dark side
  • Fix typo in template parts description
  • Fix: Browse mode descriptions margin
  • Fix: Show creation popover on empty page links in the navigation sidebar
  • Make sure the directly inserted block in the Nav block is a Page link
  • Fix browser history when synchronising state with urls
  • Navigation Sidebar: Change the logic about which navigation gets selected for the sidebar
  • Fixes extra UI in navigation block inspector
  • Renames parent selection boolean param and improves docs
  • Widget Importer: Fix Widget Group block imports
  • Don't add Post Content layout styles to title in the post editor
  • Site editor: Add hover animation to site editor canvas
  • Prevent the saving button from showing when renaming templates
  • Navigation Block: Fix big spinner
  • Navigation: Don't save the level of the link in an attribute
  • Focus 1st parent block on block remove, if no previous block is available
  • Navigation: Performance: improve params in block_core_navigation_get_most_recently_published_navigation()
  • Navigation Block inspector: fix link UI popover opening on links that have a url
  • Fix for WP_Theme_JSON_Resolver::get_merged_data()
  • Site Editor: Add page details when viewing a specific page.
  • Fix site editor sidebar scrollbars
  • Fix: Custom link UI does appears outside canvas on the sidebar navigation
  • Fix: Make navigation page list load its items on navigation sidebar

References:

Follow-up to [55441], [55440].

Props ntsekouras, mamaduka, gziolo, costdev, hellofromTonya.
See #57471.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/navigation-submenu.php

    r55257 r55475  
    1010 * which will be applied to the navigation markup in the front-end.
    1111 *
    12  * @param  array $context    Navigation block context.
    13  * @param  array $attributes Block attributes.
     12 * @param  array $context     Navigation block context.
     13 * @param  array $attributes  Block attributes.
     14 * @param  bool  $is_sub_menu Whether the block is a sub-menu.
    1415 * @return array Colors CSS classes and inline styles.
    1516 */
    16 function block_core_navigation_submenu_build_css_colors( $context, $attributes ) {
     17function block_core_navigation_submenu_build_css_colors( $context, $attributes, $is_sub_menu = false ) {
    1718    $colors = array(
    1819        'css_classes'   => array(),
    1920        'inline_styles' => '',
    2021    );
    21 
    22     $is_sub_menu = isset( $attributes['isTopLevelItem'] ) ? ( ! $attributes['isTopLevelItem'] ) : false;
    2322
    2423    // Text color.
     
    251250
    252251    if ( $has_submenu ) {
     252        $colors      = block_core_navigation_submenu_build_css_colors( $block->context, $attributes, $has_submenu );
     253        $classes     = array_merge(
     254            array( 'wp-block-navigation__submenu-container' ),
     255            $colors['css_classes']
     256        );
     257        $css_classes = trim( implode( ' ', $classes ) );
     258
     259        $style_attribute = $colors['inline_styles'];
     260
    253261        $inner_blocks_html = '';
    254262        foreach ( $block->inner_blocks as $inner_block ) {
     
    264272        }
    265273
     274        $wrapper_attributes = get_block_wrapper_attributes(
     275            array(
     276                'class' => $css_classes,
     277                'style' => $style_attribute,
     278            )
     279        );
     280
    266281        $html .= sprintf(
    267             '<ul class="wp-block-navigation__submenu-container">%s</ul>',
     282            '<ul %s>%s</ul>',
     283            $wrapper_attributes,
    268284            $inner_blocks_html
    269285        );
     286
    270287    }
    271288
Note: See TracChangeset for help on using the changeset viewer.