Make WordPress Core

Opened 2 years ago

Closed 22 months ago

Last modified 22 months ago

#54487 closed task (blessed) (fixed)

Backport bug fixes from Gutenberg into Core for WP 5.9

Reported by: noisysocks's profile noisysocks Owned by: noisysocks's profile noisysocks
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch has-unit-tests commit dev-reviewed
Focuses: Cc:

Description

Every Monday ahead of Beta 1, Beta 2, etc. I will update @wordpress packages to contain PRs marked for backport from Gutenberg into Core. This ticket tracks that work.

https://github.com/WordPress/gutenberg/pulls?q=is%3Apr+is%3Amerged+label%3A%22Backport+to+WP+Beta%2FRC%22

Change History (94)

This ticket was mentioned in PR #1928 on WordPress/wordpress-develop by noisysocks.


2 years ago
#1

  • Keywords has-patch has-unit-tests added

Update packages to include these bug fixes from Gutenberg:

Trac ticket: https://core.trac.wordpress.org/ticket/54487

#3 @noisysocks
2 years ago

In 52232:

Update @wordpress packages

Update packages to include these bug fixes from Gutenberg:

  • FSE: Add welcome guide
  • Update theme styles for the code block
  • Add feature flag to toggle the new site editor sidebar
  • Add templates list page for site editor
  • Cover Block: Fix default background dim
  • E2E: Add more Cover block tests
  • Cover Block: Fix regressions
  • Post Comments Form: ensure typography styles are applied to child elements
  • Navigation: Fix space-between
  • Fix background colours in nested submenus.
  • Fix duplicate custom classnames in navigation submenu block
  • Fix colour rendering in Navigation overlay
  • Fix: Add ability to opt out of Core color palette V2
  • Change @package to WordPress in block-library
  • Make the core color palette opt-in for themes with not theme.json
  • Remove textdomain from calendar block
  • Page List block: fix space before href attribute
  • Try: Let Featured Image block inherit dimensions, look like a placeholder
  • [Global Styles]: Add block icon next to blocks list
  • Page List: Use core entities instead of direct apiFetch
  • Site Editor: Stabilize export endpoint
  • Fix mobile horizontal scrollbar.
  • Multi-entity save: Only set site entity to pending if really saving
  • Add page list to navigation direct insert conditions
  • Implement "Add New" for templates list in Site Editor
  • Post Featured Image: Remove withNotices HOC
  • Fix page list missing button styles when set to open on click.
  • Make appender fixed position to avoid jumps in the UI
  • Color UI component: reorder palettes and update names (core by defaults, user by custom)
  • Remove the Styles link in Site Editor
  • GlobalStyles sidebar: do not show default palette if theme opts-out
  • Only render the site editor canvas when the global styles are ready.
  • Global Styles: rename core origin key to default for presets
  • Clarify i18n context for PostTemplateActions's "New" label
  • Revert erroneous native editor package version bumps
  • Try: Hide the columns inserter in pattern previews.
  • Fix site editor region navigation
  • Update navigation sidebar responsiveness
  • Add _wp_array_set and _wp_to_kebab_case to 5.8 compat
  • Make user able to change all color palette origins
  • Site Editor: Update hrefs to not specifically refer to themes.php?page=gutenberg-edit-site
  • Site Editor: Validate the postType query argument
  • Navigation: Scale submenu icon.
  • Move the theme editor under tools for FSE themes
  • Deprecate navigation areas

See #54487.

This ticket was mentioned in PR #1967 on WordPress/wordpress-develop by noisysocks.


2 years ago
#4

Update packages to include these bug fixes from Gutenberg:

Trac ticket: https://core.trac.wordpress.org/ticket/54487

noisysocks commented on PR #1967:


2 years ago
#7

@Mamaduka: Could you please fix the is_custom PHP unit test failures here? I probably messed up porting the PHP changes in https://github.com/WordPress/gutenberg/pull/36911. It's confusing because Tests_REST_WpRestTemplatesController seems to have some pretty significant differences between Core and the plugin.

@adamziel: Do you know why Tests_REST_WpRestTemplatesController::test_get_item_works_with_a_single_slash fails here?

Mamaduka commented on PR #1967:


2 years ago
#8

@noisysocks we should probably sync Tests_REST_WpRestTemplatesController tests back into plugin.

hellofromtonya commented on PR #1967:


2 years ago
#9

Noting this Trac ticket https://core.trac.wordpress.org/ticket/54532 and Gutenberg issue https://github.com/WordPress/gutenberg/issues/36962 for consideration _before_ Beta 1.

oandregal commented on PR #1928:


2 years ago
#10

Hey, we've missed some changes from https://github.com/WordPress/gutenberg/pull/36622 in this backport. I've prepared https://github.com/WordPress/wordpress-develop/pull/1971 to fix that.

oandregal commented on PR #1967:


2 years ago
#11

Robert, JFYI, in case is not merged by the time you read this. https://github.com/WordPress/wordpress-develop/pull/1971 would be nice to have for Beta 1 (Nov 30) as it fixes a bug with the last backports.

oandregal commented on PR #1967:


2 years ago
#12

Hi, looking at the class-theme-json.php file I've found a thing to fix and a couple to improve. Apparently, I can't prepare a PR on top of this one, so I thought it'd be best in this case to share a patch to be applied by git apply <file.patch>:

The contents of file.patch are:

{{{patch
diff --git a/src/wp-includes/class-wp-theme-json.php b/src/wp-includes/class-wp-theme-json.php
index 4cdb44e457..635f670cff 100644
--- a/src/wp-includes/class-wp-theme-json.php
+++ b/src/wp-includes/class-wp-theme-json.php
@@ -75,17 +75,28 @@ class WP_Theme_JSON {

  • This contains the necessary metadata to process them: *
  • - path => where to find the preset within the settings section

-+ * - override => whether a theme preset with the same slug as a default preset
-+ * can override it
+ * - override => whether a theme preset with the same slug as a default preset
+ * can override it

  • - value_key => the key that represents the value
  • * - value_func => the callback to render the value (either value_key or value_func should be present)

+ * - value_func => optionally, instead of value_key, a function to generate
+ * the value that takes a preset as an argument
+ * (either value_key or value_func should be present)

  • - css_vars => template string to use in generating the CSS Custom Property.
  • Example output: "--wp--preset--duotone--blue: <value>" will generate as many CSS Custom Properties as presets defined
  • substituting the $slug for the slug's value for each preset value.
  • * - classes => array containing a structure with the classes to generate for the presets.
  • * Each key is a template string to resolve similarly to the css_vars and each value is the CSS property to use for that class.
  • * Example output: ".has-blue-color { color: <value> }"
  • * - properties => a list of CSS properties to be used by kses to check the preset value is safe.

+ * - classes => array containing a structure with the classes to
+ * generate for the presets, where for each array item
+ * the key is the class name and the value the property name.
+ * The "$slug" substring will be replaced by the slug of each preset.
+ * For example:
+ * 'classes' => array(
+ * '.has-$slug-color' => 'color',
+ * '.has-$slug-background-color' => 'background-color',
+ * '.has-$slug-border-color' => 'border-color',
+ * )
+ * - properties => array of CSS properties to be used by kses to
+ * validate the content of each preset
+ * by means of the remove_insecure_properties method.

*

  • @since 5.8.0
  • @since 5.9.0 Added new presets and simplified the metadata structure.

@@ -305,6 +316,8 @@ class WP_Theme_JSON {

);


/

+ * The valid elements that can be found under styles.
+ *

  • @since 5.8.0
  • @var string[] */

@@ -479,6 +492,7 @@ class WP_Theme_JSON {

return $output;

}

+

/

  • Returns the metadata for each block. *

}}}

oandregal commented on PR #1967:


2 years ago
#13

Got to review the class-wp-theme-json-resolver.php class as well. I've only noticed minor changes to the comments:

{{{patch
diff --git a/src/wp-includes/class-wp-theme-json-resolver.php b/src/wp-includes/class-wp-theme-json-resolver.php
index 6a7e6a5bf9..659365b6ef 100644
--- a/src/wp-includes/class-wp-theme-json-resolver.php
+++ b/src/wp-includes/class-wp-theme-json-resolver.php
@@ -230,7 +230,6 @@ class WP_Theme_JSON_Resolver {

  • @param array $post_status_filter Filter Optional. custom post type by
  • post status. publish? by default,
  • so it only fetches published posts.
  • *
    • @return array Custom Post Type for the user's origin config. */
    public static function get_user_data_from_custom_post_type( $theme, $should_create_cpt = false, $post_status_filter = array( 'publish' ) ) {

@@ -333,8 +332,8 @@ class WP_Theme_JSON_Resolver {

/

  • There are three sources of data (origins) for a site:
  • * default, theme, and user. The user's has higher priority
  • * than the theme's, and the theme's higher than core's.

+ * default, theme, and custom. The custom's has higher priority
+ * than the theme's, and the theme's higher than defaults's.

*

  • Unlike the getters {@link get_core_data},
  • {@link get_theme_data}, and {@link get_user_data},

}}}

I'm making some changes to the equivalent Gutenberg class to make the backports easier at https://github.com/WordPress/gutenberg/pull/36974

spacedmonkey commented on PR #1967:


2 years ago
#14

We need to ensure that https://github.com/WordPress/gutenberg/pull/36981 is merged and backported as well.

noisysocks commented on PR #1967:


2 years ago
#15

Thanks @oandregal for the review and fixes. I'm going to apply those patches and commit this patch, and _then_ follow up with a second commit to address https://github.com/WordPress/gutenberg/issues/36962 and https://github.com/WordPress/gutenberg/pull/36981. That way if I run into roadblocks we'll still have something in for beta 1 😀

hellofromtonya commented on PR #1967:


2 years ago
#16

@noisysocks need to make sure that the blocks/navigation-area folder and file are also removed from Core on package update.

noisysocks commented on PR #1967:


2 years ago
#17

@noisysocks need to make sure that the blocks/navigation-area folder and file are also removed from Core on package update.

This patch doesn't modify navigation-area. I've rebased this branch though so that that folder doesn't exist in this branch.

noisysocks commented on PR #1967:


2 years ago
#18

Gave this a smoke test locally and nothing seems amiss. Committing!

#19 @noisysocks
2 years ago

In 52275:

Update @wordpress packages

Update packages to include these bug fixes from Gutenberg:

  • Update Pattern block category and add documentation
  • Fix non existent menu handling in nav block
  • Make Reusable blocks available in the Site Editor
  • Add caching to WP_Theme_JSON_Resolver_Gutenberg::get_user_data_from_custom_post_type()
  • theme.json: add appearanceTools flag to opt-in into appearance UI controls
  • Update the block theme folders to templates and parts
  • Remove reference to gutenberg_, swap with wp_
  • Use table layout in templates list screen
  • Update featured image placeholder graphic.
  • [Inserter]: Adjust order of theme blocks and reorder inserter items
  • Implement suitable fallback for Nav block on front end of site when no menu selected
  • Toggle Group Control: add tooltip
  • Use first non-empty Nav post as primary fallback for Nav block
  • Change .nvmrc and documentation for Node.js version (LTS to 14.18.1)
  • Update: Migrate global styles user database data on the rest endpoint
  • Update global styles public API
  • Update: Rename user preset origin to custom
  • Try always generating navigation post title
  • Show all templates and template parts on the site editor list screens
  • Highlight "Site" in the navigation panel
  • Fix template part slug generation when creating through the block placeholder
  • [Block Library - Post Title]: Fix render error when setting Page to homepage
  • Add 'Clear customizations' button to template list page
  • Gallery v1: Allow clicks within replace media placeholder state
  • Site Editor: Set the <title> on the list page to be same as the CPT name
  • Gallery: Fix stuck image size options loader
  • Cover: Fix undo trap
  • Add success and error snackbars to the templates list page
  • Fix: theme colors cannot override defaults
  • Fix: Color palette is not being stored
  • Add elements support to the typography panel in global styles
  • Make links plural in global styles
  • Add: Gradient palette editor
  • Update some small style regressions in the template list
  • Add: Transparency support on global styles colors
  • Fix: apply by slug on all origins
  • Render empty Nav block if no fallback block can be utilised
  • Allow filtering of Nav block fallback
  • Fix Nav block fallback DB query to match on full block grammar start tag
  • Remove unstable max pages attribute from Nav block
  • DateTimePicker: set PM hours correctly
  • Update delete template button
  • Site Editor: Template list add rename action
  • Fix Nav block editing wrong entity on creation of new Menu
  • [REST] Restore the missing double slash in the ID received by /templates
  • Add icons to navigation sidebar items
  • Update function names for the public global styles API functions
  • Templates Controller: Add missing 'is_custom' prop
  • Rename gutenberg_ to wp_ for some functions that land in WordPress 5.9
  • [Block Library - Template Part]:Remove support for conversion to Reusable block
  • Global Styles: Call "palettes" and not "color palettes" on panel label
  • Add button text when no colors found
  • Update: Global Styes: Count all color palette origins on the palette counter
  • Rename navigationMenuId to ref
  • Offset the parent iframe when computing Popover position
  • Fix: Failing PHPUnit test
  • Show theme, plugin or author in Added By column with appropriate icon or avatar
  • Add origin and author to template rest api

See #54487.
Props talldanwp, mamaduka, oandregal.

#21 @noisysocks
2 years ago

In 52277:

Update @wordpress packages

Update packages to include these bug fixes from Gutenberg:

  • Include cascading properties in Navigation deprecation
  • Reorganize e2e tests folders and file
  • Border panel: Update to display multiple palette origins
  • Add CSS fix for 33580
  • Add: Uneditable duotone palette on the palette gradient panel
  • Site Editor: Allow editing custom template title
  • Writing Flow: Double escape unselects all blocks
  • Fix icon scaling.
  • [Block Library - Query Pagination Next/Previous]: Remove text and link color support
  • Add: Border indication to global styles colors.
  • Color Picker: Improve border, padding, and box shadow styles.
  • theme.json: sort keys alphabetically
  • Remove navigationArea context.

See #54487.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


2 years ago

noisysocks commented on PR #1928:


2 years ago
#23

Thanks @oandregal, good spotting!

This ticket was mentioned in PR #2012 on WordPress/wordpress-develop by noisysocks.


2 years ago
#24

Update packages to include these bug fixes from Gutenberg:

Trac ticket: https://core.trac.wordpress.org/ticket/54487

noisysocks commented on PR #2012:


2 years ago
#25

Tested this locally. Everything seems OK. I did notice one bug which I've created an issue for: https://github.com/WordPress/gutenberg/issues/37138

#26 @noisysocks
2 years ago

In 52324:

Update @wordpress packages

Update packages to include these bug fixes from Gutenberg:

  • Gallery block: turn on auto-migration of v1 Gallery blocks to v2 format when edited
  • Add accessible labelling to submenu buttons.
  • Improve performance of wp_navigation lookup.
  • Various inline docblock corrections
  • Use core version of template and template part post types and REST endpoints for WP 5.9, with back compat for 5.8
  • Gradients: Enable adding custom gradient when gradients are disabled
  • Custom color palette: add default color name
  • Color Picker: Re-instate debounce and controlled value to fix issue with gradient picker
  • Add aria-current="page" to active navigation item
  • Site Editor: Templat list fallback to slug
  • Fix: Custom color picker popover position
  • Fix: php 5.6 error in theme JSON class.
  • Update the WP_Theme_JSON_Gutenberg class to be like the core one
  • Update the WP_Theme_JSON_Resolver_Gutenberg class to be like the core one
  • Move Global Styles code to lib/compat/wordpress-5.9 folder
  • E2E Tests: Fix failing image e2e test by waiting for required element
  • Navigation: Try removing absorb toolbar prop.
  • Navigation: Fix navigation justifications.
  • Fix wordbreak for URLs
  • Polish unset color indicator.
  • Template revert flow: Make label description source agnostic
  • [Block Library - Navigation]: Fix vertical layout
  • Add: Corners to custom color picker popover
  • Add: Missing margin to the color picker clear button
  • Gradient: Fix clearing a custom gradient from throwing a React warning
  • [Block Library]: Rename Query Pagination blocks
  • PHP Unit Tests: Use global transients
  • Remove CSS that causes conflict with theme.json
  • Add actions which fire during the loading process of block template parts
  • Fix usage of useSetting('color.palette')
  • Update micromodal, include click-through fix
  • Site Editor: Remove unused PHP code
  • Don't try and render unstable location if Nav block has ID
  • Fix gutenberg prefixed function references in core
  • Card: support the extraSmall option for the size prop
  • Gallery block: enable the new gallery block by default if running in core
  • Block fixtures: Change port to 8889 to placate KSES
  • Full Site Editing: Remove block template resolution unit tests
  • Site Editor: Sync export API

See #54487.

This ticket was mentioned in PR #2048 on WordPress/wordpress-develop by noisysocks.


2 years ago
#28

Update packages to include these bug fixes from Gutenberg:

Trac ticket: https://core.trac.wordpress.org/ticket/54487

noisysocks commented on PR #2048:


2 years ago
#29

@oandregal:

Could you please add in the PHP changes from these two PRs of yours to this branch? I am not too sure how to do it as things are a little different in Core.

Could you also please double check that I backported the PHP changes in these two PRs of yours properly?

@youknowriad:

Could you please check to see if I missed any backports from your recent PRs? It was a little difficult to spot changes amongst the refactoring that you were doing.

noisysocks commented on PR #2048:


2 years ago
#30

Will need to update packages with https://github.com/WordPress/gutenberg/pull/37315 to fix the test failures here. I can do that tomorrow.

ocean90 commented on PR #2048:


2 years ago
#31

@noisysocks Are you okay when I merge the changes from https://github.com/WordPress/wordpress-develop/pull/2009 into this PR?
This was missed in an previous update and is related to https://github.com/WordPress/gutenberg/pull/37132.

youknowriad commented on PR #2048:


2 years ago
#32

@noisysocks I believe I've done all the necessary backports from these "sync", I left the labels there to sync with wp/trunk branch 👍

oandregal commented on PR #2048:


2 years ago
#33

@noisysocks I've double-checked the PRs you mentioned and are backported fine!

As for the other two, pasting the patch below (to be applied by git apply <patch>). I've tried to push to this PR but didn't have rights to do it, I presume it's because I'm not part of some WordPress GitHub group in this repo.

{{{patch
diff --git a/src/wp-includes/block-editor.php b/src/wp-includes/block-editor.php
index 7205ef2f4a..f175eff85d 100644
--- a/src/wp-includes/block-editor.php
+++ b/src/wp-includes/block-editor.php
@@ -311,7 +311,6 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex

array(

'css' => 'variables',
'unstableType' => 'presets',

  • 'experimentalNoWrapper' => true,

),
array(

'css' => 'presets',

diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php
index 39c7119fbc..fda548ed54 100644
--- a/src/wp-includes/default-filters.php
+++ b/src/wp-includes/default-filters.php
@@ -563,6 +563,7 @@ add_action( 'enqueue_block_editor_assets', 'wp_enqueue_registered_block_scripts_

add_action( 'enqueue_block_editor_assets', 'enqueue_editor_block_styles_assets' );
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' );
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_format_library_assets' );

+add_action( 'enqueue_block_editor_assets', 'wp_enqueue_global_styles_css_custom_properties' );

add_action( 'admin_print_scripts-index.php', 'wp_localize_community_events' );
add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );

diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
index 8313088e67..8384b6b2d8 100644
--- a/src/wp-includes/script-loader.php
+++ b/src/wp-includes/script-loader.php
@@ -2863,3 +2863,12 @@ function wp_add_iframed_editor_assets_html() {

echo "<script>window.editorAssets = $editor_assets</script>";

}

+
+/
+ * Function that enqueues the CSS Custom Properties coming from theme.json.
+ */
+function wp_enqueue_global_styles_css_custom_properties() {
+ wp_register_style( 'global-styles-css-custom-properties', false, array(), true, true );
+ wp_add_inline_style( 'global-styles-css-custom-properties', wp_get_global_stylesheet( array( 'variables' ) ) );
+ wp_enqueue_style( 'global-styles-css-custom-properties' );
+}
}}}

noisysocks commented on PR #2048:


2 years ago
#35

@noisysocks Are you okay when I merge the changes from #2009 into this PR?
This was missed in an previous update and is related to WordPress/gutenberg#37132.

Not a problem. I've merged your branch into my one.

@noisysocks I believe I've done all the necessary backports from these "sync" PRs, I left the labels there to sync with wp/trunk branch 👍

Thanks!

@noisysocks I've double-checked the PRs you mentioned and are backported fine!

As for the other two, pasting the patch below (to be applied by git apply <patch>) would do it. I've tried to push directly to this PR but I didn't have the right to do it. I presume it's because I'm not part of some WordPress GitHub group in this repo.

Thank you! I've applied the patch.

---

I'm just going to do another round of npm publishing so that we have https://github.com/WordPress/gutenberg/pull/37341 and https://github.com/WordPress/gutenberg/pull/37315. I see that @hellofromtonya fixed the failing test in 1272182 by updating the assertion but IMO the test failure was legitimate. https://github.com/WordPress/gutenberg/pull/37315 is the proper fix.

I'll commit when ready and when tests pass 🙂

#36 @noisysocks
2 years ago

In 52364:

Update @wordpress packages

Update packages to include these bug fixes from Gutenberg:

  • Image block: Set image display to grid when no alignment sent to properly align caption on resize
  • Update and align template descriptions
  • Site Editor - prevent loading state from showing the admin menu.
  • Add client side routing for Site Editor
  • Navigation: Add clearance for appender in submenus.
  • Fix CSS Custom Properties for presets in the site editor
  • Add/navigation blocks post processing after migration from menu items
  • Allow selector ordering to ensure theme.json root selector margin takes precedence
  • Do not remove theme presets if defaults are hidden
  • Format library: fix unsetting highlight color
  • FSE: Fix template resolution to give precedence to child theme PHP templates over parent theme block templates with equal specificity
  • ColorPalette: Improving accessibility and visibility
  • Update: Make the color popover on the gradient picker appear as expected
  • Site Editor: Display a notice if export fails
  • Fix docs and function naming for gallery block registration in PHP
  • Switch to addEventListener for load event in the navigation block view script
  • Fix mistake in _remove_theme_attribute_in_block_template_content
  • Better synchronisation between Gutenberg and Core code
  • Move the block page templates hook into compat/5.9 folder
  • Moves to the template loader hooks and functions into lib/compat folder
  • Refactor the gutenberg_is_fse_theme function to use wp_is_block_theme
  • Site Editor: Update support doc URL in Welcome Guide
  • Global Styles: Add Welcome Guide toggle
  • Hide remove control point when removing would break gradient control
  • Don't request the deprecated navigation areas endpoint outside of the Gutenberg plugin
  • Image: Fix resizer controls being hidden in Safari when switching between alignments
  • Remove Navigation Menus from WP Admin sidebar
  • Site Editor: Hide the block appender in the Template Part editor
  • Site Editor: Use server definition for the Template Areas
  • Synchronize wp_is_block_theme and block-templates block support with Core
  • E2E: Retry login again after a bad nonce request to prevent intermittent test failures
  • Fix theme requirement validation with WP 5.8
  • Fix WP 5.9 check for conditionally running code
  • Fix post comment form input width
  • Border Style Control: Update styling for consistency with border width control
  • Fix form-submit styles by adding button classes to the submit-button in post-comments block
  • Site Editor: Fix edit template part link in header dropdown
  • Move duotone palette to the bottom of global styles gradients
  • Fix how appearanceTools works
  • Move WP 5.9 wp-admin menus compatibility code to lib/compat folder
  • Revert "Site Editor: Set the <title> on the list page to be same as the CPT name"
  • Site Editor: Document Actions: add SR text to heading 1
  • Do not register global styles CPT in WordPress 5.9
  • Global Styles: Move the 'Edit colors' button to a standard menu item
  • Fix styles for previews and patterns
  • Site Editor: Fix failing E2E test
  • Templates: Search for old template names in the parent theme too
  • Remove 4 instances of 'gutenberg' text domain from WordPress core
  • Fix content loss when ungrouping template parts or reusable blocks
  • Simplify the RESET_BLOCK action to fix template part focus mode content loss
  • [Global Styles]: Make Blocks section more distinguishable
  • Only use block markup for comment form button when using a block theme
  • Navigation: Fix vertical alignment of page list in modal.
  • Fix: ToggleGroupControl active state
  • Remove gutenberg_ prefix from @wordpress/block-library

Props ocean90, oandregal, hellofromtonya, youknowriad.
See #54487.

#39 @hellofromTonya
2 years ago

  • Keywords commit added

Marking PR 2056 for commit. It's a partial backport of wp_navigation post type's capabilities from Gutenberg's PR 37454.

The remainder of the GB PR will be backported in a separate update.

Last edited 2 years ago by hellofromTonya (previous) (diff)

#41 @hellofromTonya
2 years ago

In 52400:

Editor: Add 'edit_theme_options' capabilities to wp_navigation post type.

Adds 'edit_theme_options' capabilities top restrict Navigation permission.

Partial backport from Gutenberg https://github.com/WordPress/gutenberg/pull/37454.

Follow-up to [52069], [52145].

Props spacedmonkey, get_dave, hellofromTonya.
See #54487.

#42 @hellofromTonya
2 years ago

In 52401:

Editor: Add support for nameless font sizes in WP_Theme_JSON.

With nameless font sizes support, themes use the defaults by not declaring the "name" setting for their fontSizes in theme.json.

Backport from Gutenberg https://github.com/WordPress/gutenberg/pull/37410.

Follow-up to [50973], [52049], [52275], [52320].

Props ntsekouras, costdev, hellofromTonya.
Fixes #54640. See #54487.

#43 @isabel_brison
2 years ago

In 52402:

Update @wordpress packages for Beta 4

Update packages with these bug fixes from Gutenberg:

Navigation: Remove hardcoded typography units
Handle parsed request
Navigation: Refactor modal padding to be simpler and more flexible
Show notice on save in site editor
Add aria-pressed true/false to Toggle navigation button based on state
Components FontSizePicker: Use incremental sequence of numbers
Custom keys from theme.json: fix kebabCase conversion
Template Part: Fix 'isMissing' condition check
Multi-Entity Saving: Decode HTML entities in item titles
Font sizes: update default values
Query Loop: Add useBlockPreview, fix Query Loop wide alignment
Only add dialog role to navigation when modal is open
Fix navigation appender
Show a UI warning when user does not have permission to update/edit a Navigation block
Block editor: Fix Enter handling for nested blocks
Update: Use subtitle styles for the palette names
Allow publishing a post while not saving changes to non-post entities
Update: Block top level useSetting paths
Fix Site Logo block alignment issues
Editor: when Toggle navigation receives state false, focus
ToolsPanel: Allow items to register when panelId is null
Block Support Panels - Make block support tools panels compatible
Gallery: Fix block registration hook priority
Navigation: Fix page list issues in overlay
Ensure the overlay menu works when inserting navigation block pattern
Restrict Navigation permissions and show UI warning if cannot create
Add block gap support for group blocks
Try cascading nav styles through classnames
Fix: Impossible to edit theme and default colors
Fix: Color editor discards colors with default name
Site Editor: Fix template author avatar check
Template Editing Mode: Fix options dropdown
Avoid undo issues when reset parent blocks for controlled blocks
Add comment-form and comment-list to html5 theme support and fix comment layout

Props hellofromtonya.
See #54487.

#44 @hellofromTonya
2 years ago

  • Keywords commit removed

Removing the commit keyword.

#46 @SergeyBiryukov
2 years ago

In 52411:

Build/Test Tools: Restore the https URL for browserify-aes.

Follow-up to [52000], [52156], [52402].

See #54487.

#48 @noisysocks
2 years ago

In 52434:

Update @wordpress packages

Update packages to include these bug fixes from Gutenberg:

  • Site Logo: Add option to set site icon from Site Logo block
  • Navigation: Enable even more compact setup state.
  • Remove template parts from post content inserter an unstable filter
  • Template Editor Mode: Hide editor mode switcher
  • Avoid using CSS variables for block gap styles
  • Try to fix auto resizing in template part focus mode
  • Lower the specificity of font size CSS Custom Properties in the editor
  • Site icon: Fix site icon styling to display non-square site icons within a square button
  • [Site Editor]: Register block editor shortcuts
  • Update regex to handle 404 template slug
  • Site Editor: Remove dead code
  • [Block Editor]: Restrict delete multi selected blocks shortcut
  • Fix: Gradients are not being applied by class
  • Update: Make the global styles subtitles font smaller
  • Post Content/Title: Reflect changes when previewing post
  • ServerSideRender: Fix loading state
  • [Block Library]: Fix editable post blocks in Query Loop with zero queryId
  • Post Excerpt: Fix previews
  • WP59: Contextualize "Export" string to differentiate it from other occurrences in WP Core
  • Tools Panel: Fix race conditions caused by conditionally displayed ToolsPanelItems
  • ToolsPanel: Allow items to register when panelId is null
  • Font Size Picker: Allow non-integers as simple CSS values and in hints
  • [Components - FontSizePicker]: Use incremental sequence of numbers as labels for the available font-sizes at the segmented control (conditionally)

See #54487.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


2 years ago

#51 @audrasjb
2 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

Closing this ticket as fixed for now. Let's reopen it for RC2 if needed :)

getdave commented on PR #2056:


23 months ago
#52

@hellofromtonya can we close this one out now?

hellofromtonya commented on PR #2056:


23 months ago
#53

Thanks for the ping @getdave. Yes, this can be closed.

Committed via https://core.trac.wordpress.org/changeset/52400.

#55 @noisysocks
23 months ago

  • Keywords commit dev-feedback added
  • Resolution fixed deleted
  • Status changed from closed to reopened

@hellofromTonya: https://github.com/WordPress/wordpress-develop/pull/2134 contains the backports ahead of RC 2. I've held off on committing as we need an additional review during the RC period. There are no manual PHP changes here—it's entirely auto-generated. If the patch doesn't apply cleanly because of conflicts feel free to re-generate using npm install && grunt build --dev.

#56 @noisysocks
23 months ago

  • Keywords dev-reviewed added; dev-feedback removed

Thanks for reviewing @isabel_brison :)

#57 @noisysocks
23 months ago

In 52551:

Update packages to include these bug fixes from Gutenberg:

  • [Block Library - Query Pagination Next]: Hide block if custom query has no results
  • [WP 5.9] Fix: HTML tags like inline images in nav links break submenu layout
  • Check for nextpage to display page links for paginated posts
  • Navigation: Set the default for --navigation-layout-align to "flex-start" when using vertical orientation
  • [Block Library - Query Loop]: Use gap for the grid view
  • Update page list flex variables to match navigation.
  • Site logo: Fix range control on landscape logo
  • Restore canvas padding for classic themes
  • RichText: Fix dead key input on Windows
  • Fix: Impossible to clear colors if color palettes are removed.
  • Gallery block: pass any custom attributes through the gallery v2 migration script
  • Reduce specificity of legacy font sizes defined by core
  • Update: Improve escaping on the search block

See #54487.
Props isabel_brison.

#58 @noisysocks
23 months ago

In 52552:

Update packages to include these bug fixes from Gutenberg:

  • [Block Library - Query Pagination Next]: Hide block if custom query has no results
  • [WP 5.9] Fix: HTML tags like inline images in nav links break submenu layout
  • Check for nextpage to display page links for paginated posts
  • Navigation: Set the default for --navigation-layout-align to "flex-start" when using vertical orientation
  • [Block Library - Query Loop]: Use gap for the grid view
  • Update page list flex variables to match navigation.
  • Site logo: Fix range control on landscape logo
  • Restore canvas padding for classic themes
  • RichText: Fix dead key input on Windows
  • Fix: Impossible to clear colors if color palettes are removed.
  • Gallery block: pass any custom attributes through the gallery v2 migration script
  • Reduce specificity of legacy font sizes defined by core
  • Update: Improve escaping on the search block

See #54487.
Props isabel_brison.

#59 @noisysocks
23 months ago

  • Keywords commit dev-reviewed removed
  • Resolution set to fixed
  • Status changed from reopened to closed

#61 @noisysocks
23 months ago

  • Keywords i18n-change commit dev-feedback added
  • Resolution fixed deleted
  • Status changed from closed to reopened

https://github.com/WordPress/wordpress-develop/pull/2184 contains the backports for RC 4. Note that https://github.com/WordPress/gutenberg/pull/37939 contained some minor string changes (adding context) that I believe were requested from the i18n team.

noisysocks commented on PR #2184:


23 months ago
#62

Thanks for testing! If I follow the steps in https://github.com/WordPress/gutenberg/issues/37708 I can't repro the issue. I also don't see overflow: hidden on my .edit-site-visual-editor when I look in DevTools which indicates to me that https://github.com/WordPress/gutenberg/pull/38019 is in there. Are you sure you ran grunt build before testing?

#63 @noisysocks
23 months ago

  • Keywords dev-reviewed added; dev-feedback removed

Thanks for reviewing @isabel_brison!

#64 @noisysocks
23 months ago

In 52595:

Update @wordpress packages

Update packages to include these bug fixes from Gutenberg:

  • Stop keypresses being caught by other elements when they happen in a CustomSelectControl
  • Remove color, spacing, and layout options for Template Part block
  • Try: parse shortcode blocks outside the content
  • Fix aria-modal attribution with multiple navs on page
  • Gallery block: Remove warning notice about mobile version required
  • Fix Home template description typo
  • Fix enqueueing additional styles for blocks only when rendered
  • fix typo (hanle -> handle)
  • SelectControl: mark the children prop as optional
  • Remove warning for enqueued styles in Editor
  • Add context to font style and font weight related translation strings
  • Temporarily remove text decoration from Nav block
  • Fix empty secondary sidebar overlapping widget editor content on mobile viewports
  • Fix hiding the bottom of tablet/mobile preview in Site Editor

See #54487.
Props isabel_brison.

#65 @noisysocks
23 months ago

In 52596:

Update @wordpress packages

Update packages to include these bug fixes from Gutenberg:

  • Stop keypresses being caught by other elements when they happen in a CustomSelectControl
  • Remove color, spacing, and layout options for Template Part block
  • Try: parse shortcode blocks outside the content
  • Fix aria-modal attribution with multiple navs on page
  • Gallery block: Remove warning notice about mobile version required
  • Fix Home template description typo
  • Fix enqueueing additional styles for blocks only when rendered
  • fix typo (hanle -> handle)
  • SelectControl: mark the children prop as optional
  • Remove warning for enqueued styles in Editor
  • Add context to font style and font weight related translation strings
  • Temporarily remove text decoration from Nav block
  • Fix empty secondary sidebar overlapping widget editor content on mobile viewports
  • Fix hiding the bottom of tablet/mobile preview in Site Editor

See #54487.
Props isabel_brison.

#66 @noisysocks
23 months ago

  • Keywords commit dev-reviewed removed
  • Resolution set to fixed
  • Status changed from reopened to closed

This ticket was mentioned in PR #2188 on WordPress/wordpress-develop by hellofromtonya.


23 months ago
#67

Backporting https://github.com/WordPress/gutenberg/pull/38032 which fixes nav block's menu close button not working on mobile issue.

Trac ticket: https://core.trac.wordpress.org/ticket/54487

#68 @hellofromTonya
23 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening to backport navigation block's fix for menu close button not working on mobile https://github.com/WordPress/gutenberg/issues/37996.

#69 @hellofromTonya
23 months ago

  • Keywords commit added

https://github.com/WordPress/wordpress-develop/pull/2188 is approved. Marking for commit to trunk.

#70 @hellofromTonya
23 months ago

In 52598:

Editor: @wordpress package updates.

Update packages to include these bug fixes from Gutenberg:

  • Navigation Block: update micromodal to 0.4.10 to fix menu close button on mobile

Props ryelle, poena, get_dave, talldanwp, aristath, kjellr, audrasjb, desrosj.
See #54487.

#71 @hellofromTonya
23 months ago

  • Keywords dev-feedback added

Marking dev-feedback for 2nd committer to review for backport to 5.9 branch.

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


23 months ago

#73 @SergeyBiryukov
23 months ago

  • Keywords dev-reviewed added; dev-feedback removed

[52598] looks good to backport.

#74 @hellofromTonya
23 months ago

In 52599:

Editor: @wordpress package updates.

Update packages to include these bug fixes from Gutenberg:
Navigation Block: update micromodal to 0.4.10 to fix menu close button on mobile

Props ryelle, poena, get_dave, talldanwp, aristath, kjellr, audrasjb, desrosj.
Merges [52598] to the 5.9 branch.
See #54487.

#76 @hellofromTonya
23 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

#78 @noisysocks
22 months ago

  • Keywords i18n-change commit dev-reviewed removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

https://github.com/WordPress/wordpress-develop/pull/2220 contains the backports for our unplanned RC 4 release.

#79 @noisysocks
22 months ago

  • Keywords dev-feedback commit added

noisysocks commented on PR #2220:


22 months ago
#80

Thank you @talldan! Create an issue and I'll note it as "good to fix in RC 4 if we can, but not a blocker" along with https://github.com/WordPress/gutenberg/issues/34729.

#81 @noisysocks
22 months ago

  • Keywords dev-reviewed added; dev-feedback removed

#83 @noisysocks
22 months ago

In 52624:

Update @wordpress packages

Update packages to include these bug fixes from Gutenberg:

  • Block Editor: Mark last change as persistent on save
  • Site Editor: Restore ?styles=open functionality
  • Site Editor: Fix resizable box scrollbars in blocks
  • Add classic menus to menu switcher

See #54487.
Props talldanwp.

#84 @noisysocks
22 months ago

In 52625:

Update @wordpress packages

Update packages to include these bug fixes from Gutenberg:

  • Block Editor: Mark last change as persistent on save
  • Site Editor: Restore ?styles=open functionality
  • Site Editor: Fix resizable box scrollbars in blocks
  • Add classic menus to menu switcher

See #54487.
Props talldanwp.

#85 @noisysocks
22 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

#88 @hellofromTonya
22 months ago

  • Keywords dev-feedback added; dev-reviewed removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

hellofromtonya commented on PR #2222:


22 months ago
#89

I was little too quick on the approval 🤦‍♀️ The script loader file needs to be regenerated.

#90 @desrosj
22 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 52633:

Editor: Bump editor packages to include the latest fixes.

This merges the latest package updates for the block editor to include the fix for https://github.com/WordPress/gutenberg/pull/38175.

Props hellofromTonya, mamaduka, joen, talldanwp, cbravobernal, poena.
Fixes #54487.

#91 @desrosj
22 months ago

  • Keywords dev-feedback removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for backport.

#92 @hellofromTonya
22 months ago

  • Keywords dev-reviewed added

[52633] is good for backport to the 5.9 branch.

#93 @desrosj
22 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 52634:

Editor: Bump editor packages to include the latest fixes.

This merges the latest package updates for the block editor to include the fix for https://github.com/WordPress/gutenberg/pull/38175.

Props hellofromTonya, mamaduka, joen, talldanwp, cbravobernal, poena.
Fixes #54487.

Note: See TracTickets for help on using tickets.