Commit Graph

175 Commits

Author SHA1 Message Date
isabel_brison
69e0187d65 Editor: update npm packages with critical bug fixes for 6.3.1.
Includes fixes for footnotes and editor styles related crashes, as well as a cut and paste-related crash.

Props ramonopoly.
See #59151.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-19 23:22:38 +00:00
desrosj
afd36de0b5 Build/Test Tools: Update all build tool related dependencies.
This updates the following dependencies to their latest versions:
- `chalk`
- `cssnano`
- `dotenv`
- `grunt-contrib-cssmin`
- `grunt-contrib-qunit`
- `grunt-webpack`
- `jest-image-snapshot`
- `postcss`
- `sass`
- `sinon`
- `webpack`

Additionally, `npm audit fix` has been run to automatically fix as many issues as possible.

See #58863.
Built from https://develop.svn.wordpress.org/trunk@56390


git-svn-id: http://core.svn.wordpress.org/trunk@55902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-11 16:04:29 +00:00
isabel_brison
3e103142ab Editor: second update of npm packages for 6.3 RC3.
Includes bug fixes for footnotes, patterns, command palette, top toolbar and other small regressions.

Props andrewserong, spacedmonkey.
See #58926.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-01 08:01:54 +00:00
isabel_brison
bae8871465 Editor: initial update of npm packages for 6.3 RC3.
Includes bug fixes for patterns, command palette and several minor regressions.

Props ramonopoly.
See #58926.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-28 07:40:16 +00:00
audrasjb
f510e6e9f4 Editor: Revert [56316].
This reverts [56316] as it needs to be fixed by updating npm packages.

Unprops audrasjb.
Props swissspidy.
See #58920.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-27 10:10:24 +00:00
audrasjb
82bac32754 Editor: Prevent PHP warning when accessing icon by area.
This changeset prevents an attempt to access an array via a key that doesn't exist.
See https://github.com/WordPress/gutenberg/pull/52961.

Props aaronrobertshaw, glendaviesnz, mukesh27.
Fixes #58920.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-27 09:18:21 +00:00
isabel_brison
baf1c9d87a Editor: update npm packages with bug fixes for 6.3 RC2.
Includes miscellaneous bug fixes for 6.3 RC12.

Props ramonopoly, audrasjb, swissspidy, peterwilsoncc, joemcgill.
Fixes #58804.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-25 08:40:23 +00:00
isabel_brison
780ddef241 Editor: update npm packages with second round of bug fixes for 6.3 RC1.
Includes miscellaneous bug fixes for 6.3 RC1.

Props ramonopoly, mukesh27.
Fixes #58804.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-18 07:20:48 +00:00
Joe McGill
018821ff9a General: Rename wp_in_development_mode() to wp_is_development_mode().
This changes the function name for the helper function to check whether the current environment is running with the `WP_DEVELOPMENT_MODE` constant set to be more consistent with similar functions in core, like `wp_is_maintenance_mode()` and `wp_is_recover_mode()`.

Props flixos90, swissspidy, costdev, peterwilson, robinwpdeveloper, SergeyBiryukov, joemcgill.
See 57487.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-17 14:50:21 +00:00
isabel_brison
f29e4144fa Editor: update npm packages with first round of bug fixes for 6.3 RC1.
Includes miscellaneous bug fixes for 6.3 RC1.

Props ramonopoly.
See #58804.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-14 04:33:18 +00:00
Peter Wilson
94f92497ce General: Introduce all development mode.
Introduce the development mode `all` as a a cover-all mode for the existing `theme`, `plugin` and `core` development modes. Developers can use the `all` mode if they are developing both themes and plugins, for example.

Introduce the utility function `wp_in_development_mode()` allowing developers to detect the mode via a parameter. If the development mode is set to `all` this function will always return `true`. If the development mode is specific then only the chosen mode will return `true`.

Follow up to [56079,56042].

Props flixos90.
Fixes #57487.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-13 00:29:26 +00:00
isabel_brison
9f33966e4e Editor: update npm packages with bug fixes and blessed tasks.
Includes miscellaneous bug fixes and enhancements to the Library task (#58579).

Props andrewserong, ramonopoly.
Fixes #58745.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-11 06:59:09 +00:00
isabel_brison
2405b7fbf7 Editor: update npm packages with bug fixes and blessed tasks.
Includes miscellaneous bug fixes and enhancements to the Library task (#58579) and to the Command Palette task (#58643).

See #58745.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-07 07:21:17 +00:00
audrasjb
900a79dc53 Editor: Normalize paths in register_core_block_style_handles().
Previously, this function did not normalize paths before using `glob()` or registering styles. This led to a mixture of forward-slashes and back-slashes in 
Windows environments.

This change uses `wp_normalize_path()` to ensure Windows compatibility.

Props wildworks, costdev, kafleg, mukesh27.
Fixes #58711.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-05 07:16:21 +00:00
isabel_brison
919ea56557 Editor: update npm packages with bug fixes and blessed tasks.
Includes miscellaneous bug fixes and enhancements to the Library task (#58579) and to the site vs content editing task (#58641)

Fixes #58701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-03 09:14:26 +00:00
Bernhard Reiter
c922d4cf06 Editor: Update npm packages to fix gutenberg_ prefix
Update `@wordpress/*` packages to the latest patch versions in
order to replace calls to `gutenberg_apply_colors_support` with
`wp_apply_colors_support` in order to avoid a fatal error.

Props joemcgill, spacedmonkey, flixos90, ironprogrammer, sabernhardt.
Fixes #58651.
Built from https://develop.svn.wordpress.org/trunk@56098


git-svn-id: http://core.svn.wordpress.org/trunk@55610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-28 22:38:52 +00:00
Joe McGill
ca421dd3c0 Build/Test Tools: Update terser-webpack-plugin.
This bumps the `terser-webpack-plugin` dependency to version `5.3.9`, which fixes an error during the minification process of the `@wordpress/block-library` package during builds.

Props clorith, azaozz, desrosj.
Fixes #58660, See #57657.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-28 20:08:46 +00:00
isabel_brison
9dcce378a0 Editor: update npm packages to latest patch versions.
Updates the `@wordpress` npm packages to their latest patch versions, including generated PHP files.

Props ramonopoly.
Fixes #58654.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-28 07:04:13 +00:00
Bernhard Reiter
a6a1ebcc11 Editor: Update npm WordPress npm packages.
This fixes a fatal error in the Navigation block, which was due to a reference
to `WP_Navigation_Fallback_Gutenberg` that isn’t present in Core under that name.

Follow-up to [56065].
Props ramonjd, isabel_brison, dmsnell.
Fixes #58623.
Built from https://develop.svn.wordpress.org/trunk@56076


git-svn-id: http://core.svn.wordpress.org/trunk@55588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-27 18:27:50 +00:00
spacedmonkey
b80a8763c7 Database: Move the if statement outside of the loop.
In the foreach loop of last results, move the if statement outside of the loop. There is no need to check every element in the array for the output type. Do this once outside of the loop. For large database queries with lots of rows returned, this should improve PHP performance. 

Props spacedmonkey, Cybr, johnbillion, costdev, joemcgill.
Fixes #56541.
Built from https://develop.svn.wordpress.org/trunk@56066


git-svn-id: http://core.svn.wordpress.org/trunk@55578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-27 14:35:29 +00:00
Bernhard Reiter
00401e16b3 Editor: update Wordpress npm packages.
Updates the wordpress npm packages and their dependencies to the latest versions, as well as auto-updates to relevant core PHP files.

Props youknowriad, joemcgill, spacedmonkey, ramonopoly, peterwilsoncc, bernhard-reiter, tyxla, dmsnell.
Fixes #58623.
Built from https://develop.svn.wordpress.org/trunk@56065


git-svn-id: http://core.svn.wordpress.org/trunk@55577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-27 14:24:19 +00:00
spacedmonkey
c009f9d719 Script Loader: Fix performance issues in wp_common_block_scripts_and_styles.
In [52069] the function `wp_common_block_scripts_and_styles` was changed load individual theme stylesheets, if the current theme supports block styles and loading separate core block assets. To do this, the function calls many expensive file operation functions, such as `glob`, `file_exists` and `file_get_contents`. This is wasteful, as these functions are loaded on every page request, even request that do not include blocks, like REST API calls. In [56044] all core block styles are registered in a single place. In `register_core_block_style_handles` calls `glob` to get all css styles in block directories. While registering style and editor styles, also register block theme styles, under a new style handle. Example `wp-block-avatar-theme`. If the current theme supports block styles, also request the block to enqueue the theme style on the front end. As these new stylesheets have a path attribute set, the function `wp_maybe_inline_styles` will automatically inline the styles for you. 

Props spacedmonkey, flixos90, oandregal, costdev, audrasjb, mukesh27.
Fixes #58560.
Built from https://develop.svn.wordpress.org/trunk@56064


git-svn-id: http://core.svn.wordpress.org/trunk@55576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-27 11:28:28 +00:00
spacedmonkey
6adb9be81f Editor: Register core block styles in one place.
Register all core blocks in a new function called `register_core_block_style_handles`. This mirrors the function `wp_default_styles` where all core styles are registered in one place. This improves block registration performance, as it avoids expensive file lookups, like realpath in `register_block_style_handle`. The new function `register_core_block_style_handles` uses `glob` to get all css files in the blocks directory. This glob is cached in a transient to save lookups on subsequent requests. The function `register_block_style_handle` now checks to see if the style handle is already registered before trying to register it again. 

Props mukesh27, westonruter, flixos90, joemcgill, spacedmonkey.
Fixes #58528.
Built from https://develop.svn.wordpress.org/trunk@56044


git-svn-id: http://core.svn.wordpress.org/trunk@55556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-26 21:17:22 +00:00
spacedmonkey
1634a10025 Editor: Use register_block_type_from_metadata in register_core_block_types_from_metadata.
Use `register_block_type_from_metadata` in `register_core_block_types_from_metadata` function instead of `register_block_type`. This saves an unnecessary call to `file_exists` in `register_block_type` as core block files will always exist. 

Props nihar007, spacedmonkey, mukesh27, gziolo, sudipatel007.
Fixes #58342.
Built from https://develop.svn.wordpress.org/trunk@55879


git-svn-id: http://core.svn.wordpress.org/trunk@55391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-05 09:31:23 +00:00
desrosj
2bb3a51695 Editor: Restore shortcode support for block templates.
Follow up to [55761].

Props youknowriad, Clorith, desrosj, antpb, Otto42, johnbillion, jorbin, rmccue, timothyblynjacobs, mikeschroder, peterwilsoncc, audrasjb, matveb, noisysocks, xknown, ehtis, isabel_brison, talldanwp, gziolo, chriscct7, davidbaumwald.
Fixes #58333.
Built from https://develop.svn.wordpress.org/trunk@55828


git-svn-id: http://core.svn.wordpress.org/trunk@55340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-20 03:58:47 +00:00
audrasjb
4935678150 Editor: Update block editor packages to the latest patch releases.
This updates the block editor related npm dependencies to their latest patch versions ahead of WordPress 6.2.1 RC1.

Updated packages:
 - @wordpress/annotations@2.26.4
 - @wordpress/block-directory@4.3.12
 - @wordpress/block-editor@11.3.10
 - @wordpress/block-library@8.3.12
 - @wordpress/components@23.3.7
 - @wordpress/customize-widgets@4.3.12
 - @wordpress/edit-post@7.3.12
 - @wordpress/edit-site@5.3.12
 - @wordpress/edit-widgets@5.3.12
 - @wordpress/editor@13.3.10
 - @wordpress/format-library@4.3.10
 - @wordpress/interface@5.3.8
 - @wordpress/list-reusable-blocks@4.3.7
 - @wordpress/preferences@3.3.7
 - @wordpress/reusable-blocks@4.3.10
 - @wordpress/rich-text@6.3.4
 - @wordpress/server-side-render@4.3.7
 - @wordpress/widgets@3.3.10

This changeset includes the following fixes:
- i18n: Add context to labels related to CSS position properties gutenberg#49135
- Comments: Fix 'sprintf requires more than 1 params' error gutenberg#49054
- Fix the site editor loading in multi-site installs gutenberg#49861
- Fix quick inserter going off-screen in some situations gutenberg#49881
- Site Editor: Decode the site title properly gutenberg#49685
- Firefox: fix input rules (React async state issue) gutenberg#48210
- Only show alignment info when parent layout is constrained. gutenberg#49703
- [Inserter]: Fix onHover error on patterns tab in mobile gutenberg#49450
- Fix site editor redirection after creating new template or template part gutenberg#49364

Props mamaduka, audrasjb, wildworks, ocean90, aristath, costdev, hellofromtonya, youknowriad, mdxfr, oandregal, mattwiebe, bph, ndiego, talldanwp, joen, ellatrix, kevin940726, isabel_brison, andrewserong, ntsekouras, welcher.
Fixes #58274.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-09 14:13:25 +00:00
hellofromTonya
48deabccbe Editor: Update @wordpress packages for 6.2 RC2.
Updates the `@wordpress` packages to include the following changes:

- [Regression] Don't offer Classic block as a recovery action when not registered [https://github.com/WordPress/gutenberg/pull/49051 Gutenberg PR 49051]  
- [i18n Change] Fix typo in the media-categories component [https://github.com/WordPress/gutenberg/pull/49047 Gutenberg PR 49047] 
- Hide navigation screen in site editor [https://github.com/WordPress/gutenberg/pull/49043 Gutenberg PR 49043]  
 [https://make.wordpress.org/core/2023/03/14/fyi-navigation-section-of-new-site-editor-experienced-removed-for-6-2-rc-2/ Feature is not ready for 6.2]
- [i18n Change] Site editor: Fix non-us spelling in sidebar [https://github.com/WordPress/gutenberg/pull/48976 Gutenberg PR 48976]  See Trac #57895.
- [Regression] Site Editor: Fix lingering insertion point within template parts [https://github.com/WordPress/gutenberg/pull/48913 Gutenberg PR 48913]  > Regression introduced in 6.2 cycle.
- Navigation Link: Remove color generation code [https://github.com/WordPress/gutenberg/pull/48927 Gutenberg PR 48927] and [https://github.com/WordPress/gutenberg/pull/49064 Gutenberg PR 49064] 
- Fix settings tab active state border in block inspector [https://github.com/WordPress/gutenberg/pull/48945 Gutenberg PR 48945] 
- Fix text alignment in the Site Editor sidebar  [https://github.com/WordPress/gutenberg/pull/48959 Gutenberg PR 48959]  Making template descriptions more prominent is part of 6.2.

References:
* [f22a3cbf0c Packages x.3.9 publish commit]
* [356298f91f Packages x.3.10 publish commit]

Follow-up to [55496].

Props mamaduka, tobifjellner, davidbaumwald, costdev, audrasjb, hellofromTonya.
See #57471.
Fixes #57895.
Built from https://develop.svn.wordpress.org/trunk@55542


git-svn-id: http://core.svn.wordpress.org/trunk@55054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-14 15:45:47 +00:00
Andrew Ozz
11d4f1b3bf Build/Test Tools: Fix cleaning of old CSS files in wp-includes/blocks/*. Have to be cleaned earlier, before Webpack runs. Not together with the rest of the CSS files.
Props: ironprogrammer, petitphp, hellofromTonya, azaozz.
Fixes: #57891. 
Built from https://develop.svn.wordpress.org/trunk@55494


git-svn-id: http://core.svn.wordpress.org/trunk@55027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-09 00:05:24 +00:00
Andrew Ozz
e437ae83f3 Build/Test Tools: Remove all previously built files when running clean:files.
Cleans old JS, CSS and Webpack files from /src so they are not automatically copied to /build when running `grunt build`. Fixes errors that may be caused by copying outdated files and/or directories to /build.

Props: desrosj, isabel_brison, SergeyBiryukov, ironprogrammer, mukesh27, robinwpdeveloper, razthee007, costdev, peterwilsoncc, azaozz.

Fixes: #47749.
Built from https://develop.svn.wordpress.org/trunk@55484


git-svn-id: http://core.svn.wordpress.org/trunk@55017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-08 01:03:28 +00:00
hellofromTonya
67abdca2cc 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:
* [d14fea64bd Gutenberg's commit for publishing the packages]
* [dbe47a5e8f Gutenberg's commit for `blocks/navigation-link.php` and `blocks/navigation-submenu.php`]
* [ea74a306e5 Gutenberg's commit for `blocks/navigation.php`]

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

Props ntsekouras, mamaduka, gziolo, costdev, hellofromTonya.
See #57471. 
Built from https://develop.svn.wordpress.org/trunk@55475


git-svn-id: http://core.svn.wordpress.org/trunk@55008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-07 15:31:49 +00:00
gziolo
27d51752d5 Build: Regenerate correctly the block-json.php file
See #57471.
Follow-up [55440].


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


git-svn-id: http://core.svn.wordpress.org/trunk@54974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 12:20:17 +00:00
gziolo
d444b56849 Update the WP packages with fixes prior to WP 6.2 beta 4
This updated the packages to the latest versions with the latest fixes.

Gutenberg changes: 35f10c1836

Includes the following bug fixes:

- Only add layout classes to inner wrapper if block is a container.
- Revert dynamic block anchor support
- [Inserter - Media tab]: Upload Openverse images when inserted
- SpacingSizesControl: Fix white dot on thumb
- Site Editor: update the edit button
- Change "Browse all templates" to "Manage all templates" in template details popover
- Remove TemplateAreas from template details
- Add support for orientation-based block movers to core/social-links
- Site Editor: polish add template modal style
- Match color of the focus template view with site dark material
- Site Editor: Fix routing for Classic themes using block-based template parts
- Remove broken site editor redirect
- Make the template customized info accessible
- Sort templates and template parts by slug
- Prevent distracting focused back button on site editor load
- Fix: Content only CPT template locking.
- Pin floating-ui/react-dom version
- Widget Importer: Don't render controls when there's nothing to import
- Post Editor: Update postContentBlock check to see if the block is valid
- Site Tagline: Add example so that it will display in style book
- Remove copy for managing a block's style variations
- Fix the site editor home page loading when installed in a subdirectory
- Global Styles: Display preset names via the tooltip
- [Query Loop] Fix top border in pattern selection modal
- Site Editor: Fix the 'Browse all' link in the template details modal
- Site Editor: Fix the tooltip and shortcut for the global save button
- Make the Site Logo block placeholder state smaller
- Site Editor Sidebar: Add line-height for template/parts name and update width for edit button
- Style Book: Focus the Style Book when opened, and enable ESCAPE key to close
- [Site Editor]: Set html block as freeform fallback block
- Make the performance tests more stable
- Adds all allowed innerblocks to the inspector animation experiment
- Revert Link control UX changes for WP 6.2
- Fix Site Editor perf tests
- Playwright: fix request utils for non Docker envs

See #57471.
Props Mamaduka, ntsekouras.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 12:05:03 +00:00
gziolo
2b08f8960b Update the WP packages with fixes prior to WP 6.2 beta 3
Includes the following changes:

- Upgrade Playwright to 1.30.0
- [Block Editor - Inserter]: preload media categories empty check - client side
- Navigation: Fixes undo and redo for nesting operations in the navigation block's inspector
- Fix: OffCanvasEditor does not inserts submenu on collapsed items.
- OffCanvasEditor: Only allow some blocks to be converted to submenus
- Navigation: Updates "Add Submenu item" text to "Add Submenu link"
- Update: Make OffCanvasEditor use LeafMoreMenu by default.
- Template Part: Performance: Replace usage of wp_get_theme()->get_stylesheet() with get_stylesheet()
- Widget Editor: Fix a problem with 'Move to Widget Area' button not working
- Reusable Blocks: Use React 18 rendering for import dropdown
- useAsyncList: flush state updates when processing queue
- Refactor the site editor URLs for better backward compatibility
- Template editor: only disable the save button if no changes rather than hiding it
- [Quote]: Fix deprectated large style specificity rule
- Style Book: Allow button text labels for style book icon
- List View: Scroll selected block into view when single block selection changes
- Post editor: revert iframed editor for WP core only
- Fix the Publish region position and focus style.
- Remove "& Shadow" from the Border ScreenHeader title
- Site editor: specify focus state color for template navigation button

References: [1e2b2f680c Gutenberg's commit for publishing the packages]

Props ntsekouras, ellatrix.
See #57471.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 13:09:42 +00:00
youknowriad
804fbe781a Block Editor: Updates the WordPress packages with all the fixes targetted for WP 6.2 beta1.
Includes the following changes

- Fix multi entities saved state in the post editor
- Adds a global save button to the site editor
- Shadow: move shadow to own panel
- [Block Editor]: Lock __experimentalBlockInspectorAnimation setting
- useBlockSync: change subscribed.current on unsubscribe
- [Block Library - Gallery]: Minor code quality update
- [Patterns]: Reorder pattern categories
- Fix inline preview infinite render
- Show a pointer/hint in the settings tab informing the user about the styles tab
- I18N: update string concatenation method in read more block
- LocalAutosaveNotice: use stable notice id to prevent double notices
- Navigation: Remove the IS_GUTENBERG_PLUGIN check around block_core_navigation_parse_blocks_from_menu_items

Props mamaduka, ntsekouras, kebbet.
See #57471.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 13:00:09 +00:00
youknowriad
ff5026369e Site Editor: Backport site editor intialization changes from Gutenberg 15.1
The site editor has been updated to not require the "home template" setting. 
This removes the key from the settings passed to the frontend.

Props flixos90, hellofromtonya, ntsekouras.
Fixes #57480.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 07:16:17 +00:00
youknowriad
a41c798835 Block Editor: Updated the WordPress packages to include Gutenberg 15.1.0 changes.
In addition to all the packages being updated to the latest versions, 
this commit also includes some mandatory changes to avoid editor breakage:

 - Update React to to 18.2.0.
 - Add the right stylesheets to support iframed block editors.

Props ntsekouras, mamaduka, flixos90, desrosj, peterwilsoncc.
See #57471.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 07:04:52 +00:00
Felix Arntz
043e2016a3 Editor: Remove unnecessary CSS comments from compiled styles.
Props aristath, adamsilverstein, SergeyBiryukov, gziolo.
Fixes #56388.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 18:59:20 +00:00
desrosj
d4085bc90d Build/Test Tools: Update PostCSS to version 8.
This updates PostCSS related dependencies for the main Core build process to versions that use the latest major version of PostCSS, 8.x.

There were no changes to any versioned CSS files as a result of this update directly. However, two occurrences of `-o-tab-size` have been removed due to the version of `caniuse-lite` used being updated in the process.

See #57554, #57555.
Built from https://develop.svn.wordpress.org/trunk@55150


git-svn-id: http://core.svn.wordpress.org/trunk@54683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-27 15:56:28 +00:00
Felix Arntz
98c4aaf832 Editor: Update packages to unblock lazy-loading issues.
Fixing the issue that featured images are always lazy-loaded in block themes required an upstream Gutenberg change https://github.com/WordPress/gutenberg/pull/45534. This changeset updates packages in order to unblock the remainder of the fix in `trunk`.

Props mamaduka.
See #56930.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-16 19:59:36 +00:00
desrosj
3b86eee81b Themes: Revert one instance of wp_get_theme() from [54817].
Since this specific call to `wp_get_theme()` is found within `wp-includes/blocks`, this change will need to be made upstream in the Gutenberg repository.

See #57057.
Built from https://develop.svn.wordpress.org/trunk@54819


git-svn-id: http://core.svn.wordpress.org/trunk@54371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 16:34:12 +00:00
spacedmonkey
8ea348f6db Themes: Reduce usage of wp_get_theme function.
Calling the `wp_get_theme` function creates a instance of the `WP_Theme` class. This can be a performance issue, if all you need is one property of the class instance. This change replaces the usage of `wp_get_theme()->get_stylesheet()` with `get_stylesheet()` to improve performance.

Props spacedmonkey, flixos90, peterwilsoncc, desrosj.
Fixes #57057.
Built from https://develop.svn.wordpress.org/trunk@54817


git-svn-id: http://core.svn.wordpress.org/trunk@54369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 16:26:12 +00:00
desrosj
b497a707b7 Editor: Update block editor packages to the latest patch releases.
This updates the block editor related npm dependencies to their latest patch versions ahead of WordPress 6.1.1.

For a full list of what’s included in this update, see 432ed388f8...6566f5fe9e.

Props aaronrobertshaw, ntsekouras, bernhard-reiter, ramonopoly, isabel_brison, andrewserong, get_dave, scruffian, andraganescu, talldanwp, mciampini, noisysocks, cbravobernal, bph, tyxla, ellatrix, czapla, mcsf, ironprogrammer, wildworks, peterwilsoncc, mamaduka, mikachan, spacedmonkey, cybr, youknowriad, alexstine, aristath, kevin940726, ndiego, 0mirka00, poena, joen, ryankienstra, desrosj, vtad, nithins53, audrasjb, kacper3355, sabernhardt.
Fixes #57038, #56818, #56955, #56923.
Built from https://develop.svn.wordpress.org/trunk@54811


git-svn-id: http://core.svn.wordpress.org/trunk@54363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 12:46:55 +00:00
Bernhard Reiter
70fd2c8b72 Editor: Update packages for 6.1 Release Candidate 3.
Package updates for bug and regression fixes:

- @wordpress/block-directory: 3.15.10
- @wordpress/block-editor: 10.0.9
- @wordpress/block-library: 7.14.10
- @wordpress/customize-widgets: 3.14.10
- @wordpress/edit-post: 6.14.10
- @wordpress/edit-site: 4.14.12
- @wordpress/edit-widgets: 4.14.10
- @wordpress/editor: 12.16.9
- @wordpress/format-library: 3.15.9
- @wordpress/reusable-blocks: 3.15.9
- @wordpress/widgets: 2.15.9

Original PRs from Gutenberg repository:

* [WordPress/gutenberg#45189 Gutenberg PR 45189] - Fix resizeable editor scrolling
* [WordPress/gutenberg#45234 Gutenberg PR 45234] - Reset background-image property for outline button style
* [WordPress/gutenberg#45161 Gutenberg PR 45161] - Table Block: Add a deprecation for the figcaption element class name
* [WordPress/gutenberg#45159 Gutenberg PR 45159] - File Block: Add a deprecation for the button element class name
* [WordPress/gutenberg#45169 Gutenberg PR 45169] - Video: Add a deprecation for the caption element
* [WordPress/gutenberg#45166 Gutenberg PR 45166] - Embed: Add deprecation for the caption element
* [WordPress/gutenberg#45173 Gutenberg PR 45173] - Gallery: Add a deprecation for captions in the gallery block
* [WordPress/gutenberg#44854 Gutenberg PR 44854] - Embed Block: Add support for Tumblr Dashboard URLs
* [WordPress/gutenberg#45074 Gutenberg PR 45074] - Post editor: Rename view to Preview
* [WordPress/gutenberg#45163 Gutenberg PR 45163] - Featured Image Block: Add missing output escaping
* [WordPress/gutenberg#45118 Gutenberg PR 45118] - [WP6.1] Site editor clips body background style

Follow-up to [54257], [54335], [54383], [54483], [54486], [54490], and [54632].
Props czapla, cbravobernal, ndiego, annezazu, davidbaumwald, desrosj, mikeschroder, hellofromtonya, ocean90.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54693


git-svn-id: http://core.svn.wordpress.org/trunk@54245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-25 19:08:45 +00:00
Sergey Biryukov
bfbf1bc053 Editor: Update packages for 6.1 Release Candidate 2.
Package updates for bug and regression fixes:
- `@wordpress/block-directory: 3.15.8`
- `@wordpress/block-editor: 10.0.7`
- `@wordpress/block-library: 7.14.8`
- `@wordpress/components: 21.0.6`
- `@wordpress/customize-widgets: 3.14.8`
- `@wordpress/edit-post: 6.14.8`
- `@wordpress/edit-site: 4.14.10`
- `@wordpress/edit-widgets: 4.14.8`
- `@wordpress/editor: 12.16.7`
- `@wordpress/format-library: 3.15.7`
- `@wordpress/interface: 4.16.6`
- `@wordpress/list-reusable-blocks: 3.15.6`
- `@wordpress/nux: 5.15.6`
- `@wordpress/preferences: 2.9.6`
- `@wordpress/reusable-blocks: 3.15.7`
- `@wordpress/server-side-render: 3.15.6`
- `@wordpress/widgets: 2.15.7`

Original PRs from Gutenberg repository:
- [https://github.com/WordPress/gutenberg/pull/45041 #45041 Font Size Picker Hint: Fallback to font size `slug` if `name` is undefined]
- [https://github.com/WordPress/gutenberg/pull/45045 #45045 Add: Missing output escaping on some blocks]
- [https://github.com/WordPress/gutenberg/pull/44999 #44999 Escape comment author URL]
- [https://github.com/WordPress/gutenberg/pull/44972 #44972 Navigator: restore focus only once per location]
- [https://github.com/WordPress/gutenberg/pull/44858 #44858 Spacing Sizes Control: Try improving layout spacing]
- [https://github.com/WordPress/gutenberg/pull/44878 #44878 Fix: Inspector is usable on the top level block even if it is content locked]
- [https://github.com/WordPress/gutenberg/pull/44809 #44809 Fix list outdents on Enter in quote block]
- [https://github.com/WordPress/gutenberg/pull/44864 #44864 List v2: fix selection when creating paragraph from empty list item]
- [https://github.com/WordPress/gutenberg/pull/44853 #44853 Fix overflowing patterns]
- [https://github.com/WordPress/gutenberg/pull/45050 #45050 Fix visibility of nested Group block appender]
- [https://github.com/WordPress/gutenberg/pull/44887 #44887 wp-env: Use case insensitive regex when checking WP version string]

Follow-up to [54257], [54335], [54383], [54483], [54486], [54490].

Props bernhard-reiter, audrasjb.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54632


git-svn-id: http://core.svn.wordpress.org/trunk@54184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-18 13:56:02 +00:00
hellofromTonya
87a38efddc Editor: Fix version in WP_Theme_JSON_Resolver::get_block_data().
Introduced during the WP 6.1 alpha cycle, this commit fixes the version number from `1` to `2`.

Follow-up to [54162].

Props oandregal.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54491


git-svn-id: http://core.svn.wordpress.org/trunk@54050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-11 16:40:14 +00:00
davidbaumwald
dd2cc423ef Editor: Remove extra line break in build_template_part_block_instance_variations().
This extra break was causing a QUnit failure check validating version controlled file contents.

Follow-up to [54483].

See #56467.
Built from https://develop.svn.wordpress.org/trunk@54487


git-svn-id: http://core.svn.wordpress.org/trunk@54046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-11 15:41:13 +00:00
davidbaumwald
0b33636e64 Editor: Change gutenberg_get_typography_font_size_value() calls to wp_get_typography_font_size_value().
Merged Gutenberg functions should be prefixed with `wp_`.

Follow-up to [54483].

Props spacedmonkey.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54486


git-svn-id: http://core.svn.wordpress.org/trunk@54045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-11 15:38:11 +00:00
Sergey Biryukov
08dd56a8b1 Upgrade/Install: Revert a temporary conditional for testing the Rollbacks feature project.
This will be readded in 6.2-alpha after a 6.1 branch is created.

Follow-up to [53578].

See #56057.
Built from https://develop.svn.wordpress.org/trunk@54484


git-svn-id: http://core.svn.wordpress.org/trunk@54043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-11 15:28:13 +00:00
davidbaumwald
23d251e0ab Editor: Update packages for 6.1 Release Candidate 1.
Package updates for bug and regression fixes:
@wordpress/block-directory: 3.15.6
@wordpress/block-editor: 10.0.6
@wordpress/block-library: 7.14.6
@wordpress/components: 21.0.5
@wordpress/customize-widgets: 3.14.6
@wordpress/edit-post: 6.14.6
@wordpress/edit-site: 4.14.8
@wordpress/edit-widgets: 4.14.6
@wordpress/editor: 12.16.6
@wordpress/format-library: 3.15.6
@wordpress/interface: 4.16.5
@wordpress/list-reusable-blocks: 3.15.5
@wordpress/nux: 5.15.5
@wordpress/preferences: 2.9.5
@wordpress/reusable-blocks: 3.15.6
@wordpress/server-side-render: 3.15.5
@wordpress/widgets: 2.15.6

References:
* [https://github.com/WordPress/gutenberg/pull/43181 Gutenberg PR 43181] - Merge inner blocks if wrappers are equal
* [https://github.com/WordPress/gutenberg/pull/44098 Gutenberg PR 44098] - Fix content blocks with nested blocks always appear as top level
* [https://github.com/WordPress/gutenberg/pull/44150 Gutenberg PR 44150] - Refresh selection styles
* [https://github.com/WordPress/gutenberg/pull/44415 Gutenberg PR 44415] - Removes `__unstableMaxPages` attribute from Page List and Nav blocks
* [https://github.com/WordPress/gutenberg/pull/44463 Gutenberg PR 44463] - Follow discussion settings in the comments block edit
* [https://github.com/WordPress/gutenberg/pull/44584 Gutenberg PR 44584] - Avoid querying block templates during installation
* [https://github.com/WordPress/gutenberg/pull/44637 Gutenberg PR 44637] - Resizable editor: Fix height setting bug
* [https://github.com/WordPress/gutenberg/pull/44640 Gutenberg PR 44640] - Only include theme.css if the theme declares support for wp-block-styles
* [https://github.com/WordPress/gutenberg/pull/44650 Gutenberg PR 44650] - Fix empty links being created for the author's name comment
* [https://github.com/WordPress/gutenberg/pull/44652 Gutenberg PR 44652] - Block Editor: Fix block search for non-Latin characters
* [https://github.com/WordPress/gutenberg/pull/44660 Gutenberg PR 44660] - Legacy Group inner block wrapper should work with constrained layout
* [https://github.com/WordPress/gutenberg/pull/44676 Gutenberg PR 44676] - Hide list items from content area of content locked blocks
* [https://github.com/WordPress/gutenberg/pull/44718 Gutenberg PR 44718] - Margin visualizer: Apply negative value to margins with `calc()`
* [https://github.com/WordPress/gutenberg/pull/44721 Gutenberg PR 44721] - Remove anchor support from the navigation block
* [https://github.com/WordPress/gutenberg/pull/44731 Gutenberg PR 44731] - Buttons: Add specificity for the editor

Follow-up to [54257], [54335], and [54383].

Props bernhard-reiter, czapla, annezazu, cbravobernal, ndiego, bjorsch, nendeb55.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54483


git-svn-id: http://core.svn.wordpress.org/trunk@54042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-11 15:26:55 +00:00
davidbaumwald
4de88db482 Editor: Update packages for 6.1 Beta 3.
Package updates for bug and regression fixes:

* @wordpress/annotations: 2.17.3
* @wordpress/block-directory: 3.15.4
* @wordpress/block-editor: 10.0.4
* @wordpress/block-library: 7.14.4
* @wordpress/blocks: 11.16.4
* @wordpress/components: 21.0.4
* @wordpress/core-data: 5.0.4
* @wordpress/customize-widgets: 3.14.4
* @wordpress/data: 7.1.3
* @wordpress/data-controls: 2.17.3
* @wordpress/edit-post: 6.14.4
* @wordpress/edit-site: 4.14.5
* @wordpress/edit-widgets: 4.14.4
* @wordpress/editor: 12.16.4
* @wordpress/format-library: 3.15.4
* @wordpress/interface: 4.16.3
* @wordpress/keyboard-shortcuts: 3.15.3
* @wordpress/list-reusable-blocks: 3.15.4
* @wordpress/notices: 3.17.3
* @wordpress/nux: 5.15.4
* @wordpress/preferences: 2.9.4
* @wordpress/reusable-blocks: 3.15.4
* @wordpress/rich-text: 5.15.3
* @wordpress/server-side-render: 3.15.4
* @wordpress/style-engine: 1.0.3
* @wordpress/viewport: 4.15.3
* @wordpress/widgets: 2.15.4

References:
* [https://github.com/WordPress/gutenberg/pull/44634 Gutenberg PR 44634] – Quote block: stop slash inserter popup showing in citation
* [https://github.com/WordPress/gutenberg/pull/44630 Gutenberg PR 44630] – Query Loop: Fix condition for displaying 'parents' control
* [https://github.com/WordPress/gutenberg/pull/44554 Gutenberg PR 44554] – Hide the Classic block in the Site Editor
* [https://github.com/WordPress/gutenberg/pull/44594 Gutenberg PR 44594] – Fix navigation block console error
* [https://github.com/WordPress/gutenberg/pull/44555 Gutenberg PR 44555] – Theme export: Fix broken spacingScale export
* [https://github.com/WordPress/gutenberg/pull/44580 Gutenberg PR 44580] – Code Block: Add box-sizing to fix inconsistent layout
* [https://github.com/WordPress/gutenberg/pull/44556 Gutenberg PR 44556] – Remove border from Global Styles previews
* [https://github.com/WordPress/gutenberg/pull/44141 Gutenberg PR 44141] – Spacing presets: Modify the styling of the input controls when in unlinked mode in order to better differentiate sides
* [https://github.com/WordPress/gutenberg/pull/44453 Gutenberg PR 44453] – Preserve the generic signature of getEntityRecord and getEntityRecords through currying
* [https://github.com/WordPress/gutenberg/pull/44504 Gutenberg PR 44504] – Theme.json: fix some outline properties doesn't work properly on the editor
* [https://github.com/WordPress/gutenberg/pull/44516 Gutenberg PR 44516] – Add style engine to editor tsconfig references
* [https://github.com/WordPress/gutenberg/pull/44523 Gutenberg PR 44523] – Query Loop Block: Rename Query Loop variations allowControls to allowedControls
* [https://github.com/WordPress/gutenberg/pull/44520 Gutenberg PR 44520] – Post Featured Image: Fix application of default border style in editor
* [https://github.com/WordPress/gutenberg/pull/44286 Gutenberg PR 44286] – Post Featured Image: Fix borders after addition of overlay feature
* [https://github.com/WordPress/gutenberg/pull/44482 Gutenberg PR 44482] – Template Editor: Fix crashes due to undefined variables
* [https://github.com/WordPress/gutenberg/pull/44480 Gutenberg PR 44480] – Template Parts: Prevent adding block in post editor or inside post template or content blocks
* [https://github.com/WordPress/gutenberg/pull/44425 Gutenberg PR 44425] – Fix rotated image crop area aspect ratio
* [https://github.com/WordPress/gutenberg/pull/44485 Gutenberg PR 44485] – Fix padding/margin visualizer accuracy
* [https://github.com/WordPress/gutenberg/pull/44569 Gutenberg PR 44569] – Theme.json: Fix some shadow properties that do not work properly in the site editor
* [https://github.com/WordPress/gutenberg/pull/44575 Gutenberg PR 44575] – ToggleGroupControl: Fix unselected icon color
* [https://github.com/WordPress/gutenberg/pull/44526 Gutenberg PR 44526] – TokenInput Field: Try alternative approach to fix screen reader focus issue
* [https://github.com/WordPress/gutenberg/pull/44506 Gutenberg PR 44506] – Edit Post: Optimize legacy post content layout
* [https://github.com/WordPress/gutenberg/pull/44258 Gutenberg PR 44258] – Add layout styles from Post Content block to post editor

Follow-up to [54257] and [54335].

Props czapla, isabel_brison, wildworks, bernhard-reiter, hellofromTonya.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54383


git-svn-id: http://core.svn.wordpress.org/trunk@53942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-04 15:06:52 +00:00