diff --git a/.eslintrc.js b/.eslintrc.js index 11e5eb394dd39..70926c8a9c541 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -392,6 +392,7 @@ module.exports = { rules: { '@wordpress/no-global-active-element': 'off', '@wordpress/no-global-get-selection': 'off', + 'playwright/no-page-pause': 'error', 'no-restricted-syntax': [ 'error', { diff --git a/changelog.txt b/changelog.txt index 1168776ff8d27..46f339243bd08 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,363 @@ == Changelog == += 15.1.1 = + + + +## Changelog + +### Various + +- Fonts API: Add missing files to lib/load.php. ([48108](https://github.com/WordPress/gutenberg/pull/48108)) + + +## First time contributors + +The following PRs were merged by first time contributors: + + + +## Contributors + +The following contributors merged PRs in this release: + +@hellofromtonya + + += 15.2.0-rc.1 = + + + +## Changelog + +### Features + +#### Design Tools +- Add aspect-ratio to post featured image block. ([47854](https://github.com/WordPress/gutenberg/pull/47854)) + + +### Enhancements + +#### Site Editor +- Add a nested level when selecting templates or template parts. ([47777](https://github.com/WordPress/gutenberg/pull/47777)) +- Add back link to Design heading in site editor navigation to return to Dashboard. ([47950](https://github.com/WordPress/gutenberg/pull/47950)) +- Add: Modal to choose a start pattern on new templates. ([46248](https://github.com/WordPress/gutenberg/pull/46248)) +- Adds a global save button to the site editor. ([47142](https://github.com/WordPress/gutenberg/pull/47142)) +- Tidy up the generation of the site editor page title. ([48053](https://github.com/WordPress/gutenberg/pull/48053)) +- Update gutenberg_get_template_hierarchy. ([47716](https://github.com/WordPress/gutenberg/pull/47716)) + +#### Block Library +- Button: Update: Make button a content block. ([47936](https://github.com/WordPress/gutenberg/pull/47936)) +- File block: Add color block support to File block. ([41870](https://github.com/WordPress/gutenberg/pull/41870)) +- Navigation: Add integration tests for NavigationMenuSelector component. ([47825](https://github.com/WordPress/gutenberg/pull/47825)) +- Navigation: Updates "Add Submenu item" text to "Add Submenu link". ([48030](https://github.com/WordPress/gutenberg/pull/48030)) +- Post excerpt: Add excerpt length control. ([44964](https://github.com/WordPress/gutenberg/pull/44964)) +- Update: Make OffCanvasEditor use LeafMoreMenu by default. ([47844](https://github.com/WordPress/gutenberg/pull/47844)) + +#### Global Styles +- Extract the Global Styles Typography Panel into block-editor package. ([47356](https://github.com/WordPress/gutenberg/pull/47356)) +- Move more link about custom CSS to part of description. ([47781](https://github.com/WordPress/gutenberg/pull/47781)) +- Site Editor: Update 'Additional CSS' subtitle string. ([47671](https://github.com/WordPress/gutenberg/pull/47671)) +- Style Book: Exclude blocks that are not allowed to insert. ([47461](https://github.com/WordPress/gutenberg/pull/47461)) + +#### Design Tools +- Button: Adopt support for border color, style, and width. ([44574](https://github.com/WordPress/gutenberg/pull/44574)) +- Latest Comments: Add typography support. ([43310](https://github.com/WordPress/gutenberg/pull/43310)) +- Verse: Adopt border supports. ([48021](https://github.com/WordPress/gutenberg/pull/48021)) + +#### Block Editor +- Migrate from TextControl to NumberControl to remove margin overrides. ([47160](https://github.com/WordPress/gutenberg/pull/47160)) +- Add code owner. ([47733](https://github.com/WordPress/gutenberg/pull/47733)) +- Add settings "drawer" to Link Control. ([47328](https://github.com/WordPress/gutenberg/pull/47328)) +- Button: Prepend HTTP to Buttons block links when missing protocol. ([47311](https://github.com/WordPress/gutenberg/pull/47311)) +- Show a pointer/hint in the settings tab informing the user about the styles tab. ([47670](https://github.com/WordPress/gutenberg/pull/47670)) + +#### Components +- Add parent navigation support for the navigator component. ([47883](https://github.com/WordPress/gutenberg/pull/47883)) +- Zoom out mode: Scale iframe instead of contents. ([47004](https://github.com/WordPress/gutenberg/pull/47004)) + +#### Testing +- end-to-end perf tests: Run each test in a separate page. ([47889](https://github.com/WordPress/gutenberg/pull/47889)) + +#### Navigation Screen +- Components: Add support for named arguments in the navigator components. ([47827](https://github.com/WordPress/gutenberg/pull/47827)) + +#### Document Settings +- Term sorting is incorrect in flat term selector. ([47795](https://github.com/WordPress/gutenberg/pull/47795)) + +#### Patterns +- [Patterns]: Reorder pattern categories. ([47760](https://github.com/WordPress/gutenberg/pull/47760)) + +#### Block API +- Set block attributes to require either type or enum. ([45365](https://github.com/WordPress/gutenberg/pull/45365)) + +#### Inspector Controls +- Add template revision button. ([45215](https://github.com/WordPress/gutenberg/pull/45215)) + +#### Accessibility +- List view: Modify the shortcut to focus while open. ([45135](https://github.com/WordPress/gutenberg/pull/45135)) + +#### Scripts +- Scripts: Add PostCSS (.pcss extension) file support to wp-scripts. ([45352](https://github.com/WordPress/gutenberg/pull/45352)) +- Scripts: Use start without watcher using --no-watch. ([44237](https://github.com/WordPress/gutenberg/pull/44237)) + +### Bug Fixes + +- Distraction free mode: Fix keyboard shortcut not working. ([47900](https://github.com/WordPress/gutenberg/pull/47900)) +- useResizeObserver: Handle strict mode double effects. ([47703](https://github.com/WordPress/gutenberg/pull/47703)) + +#### Block Library +- Embed: Fix: Remove browser default border for iframe in the editor. ([47987](https://github.com/WordPress/gutenberg/pull/47987)) +- File block: Re-add editor styles for classic themes. ([47686](https://github.com/WordPress/gutenberg/pull/47686)) +- Image: Revert "Prevent the image from being resized larger than its container". ([47846](https://github.com/WordPress/gutenberg/pull/47846)) +- Image: Update image block margins on RTL. ([47617](https://github.com/WordPress/gutenberg/pull/47617)) +- Navigation Block inspector: Fix link UI popover opening on links that have a URL. ([47828](https://github.com/WordPress/gutenberg/pull/47828)) +- Navigation: Close Link UI if cancelled. ([48029](https://github.com/WordPress/gutenberg/pull/48029)) +- Navigation: Enable undo after creating a new menu. ([47683](https://github.com/WordPress/gutenberg/pull/47683)) +- Navigation: Fixes undo and redo for nesting operations in the navigation block's inspector. ([47633](https://github.com/WordPress/gutenberg/pull/47633)) +- Navigation: Remove the IS_GUTENBERG_PLUGIN check around block_core_navigation_parse_blocks_from_menu_items. ([47824](https://github.com/WordPress/gutenberg/pull/47824)) +- Navigation: Update deps for the useEffect that creates navigation menus. ([47912](https://github.com/WordPress/gutenberg/pull/47912)) +- OffCanvasEditor: Only allow some blocks to be converted to submenus. ([47974](https://github.com/WordPress/gutenberg/pull/47974)) +- Page List: Respect the selected parent page when converting to a list of navigation links. ([47651](https://github.com/WordPress/gutenberg/pull/47651)) +- Read More: I18N: Update string concatenation method in read more block. ([47815](https://github.com/WordPress/gutenberg/pull/47815)) +- ToolsPanel: Display optional items when values are updated externally. ([47727](https://github.com/WordPress/gutenberg/pull/47727)) +- [Quote]: Fix deprectated `large` style specificity rule. ([47969](https://github.com/WordPress/gutenberg/pull/47969)) + +#### Site Editor +- [Block Editor]: Lock `blockInspectorAnimation` setting. ([47740](https://github.com/WordPress/gutenberg/pull/47740)) +- Disable Strict Mode, breaks dev site editor. ([47701](https://github.com/WordPress/gutenberg/pull/47701)) +- Add: Modal to choose a start pattern on new templates. Take 2. ([47927](https://github.com/WordPress/gutenberg/pull/47927)) +- Fix ComplementaryArea's initial isActive state. ([47498](https://github.com/WordPress/gutenberg/pull/47498)) +- Fix custom Template Parts rename action. ([47932](https://github.com/WordPress/gutenberg/pull/47932)) +- Fix site editor navigation. ([48025](https://github.com/WordPress/gutenberg/pull/48025)) +- Shadow: Move shadow into own panel. ([47634](https://github.com/WordPress/gutenberg/pull/47634)) +- Specify active state color for template navigation button. ([47851](https://github.com/WordPress/gutenberg/pull/47851)) + +#### Accessibility +- Add an aria label to the site save dialog. ([47898](https://github.com/WordPress/gutenberg/pull/47898)) +- Fix UrlInput combobox to use the ARIA 1.0 pattern. ([47148](https://github.com/WordPress/gutenberg/pull/47148)) +- Fix constrained tabbing failures with Safari and Firefox. ([47426](https://github.com/WordPress/gutenberg/pull/47426)) +- Fix the headings hierarchy in the styles sidebar. ([43848](https://github.com/WordPress/gutenberg/pull/43848)) +- Site Editor: Append template type and name to the site editor page title. ([47855](https://github.com/WordPress/gutenberg/pull/47855)) +- Template editor: Only disable the save button if no changes rather than hiding it. ([47895](https://github.com/WordPress/gutenberg/pull/47895)) + +#### Block Editor +- useBlockSync: Change subscribed.current on unsubscribe. ([47752](https://github.com/WordPress/gutenberg/pull/47752)) +- Edit Post: Fix the 'inlineToolbar' settings toggle. ([47960](https://github.com/WordPress/gutenberg/pull/47960)) +- Fix clicking on the toggle button not closing the block inserter. ([47926](https://github.com/WordPress/gutenberg/pull/47926)) +- LinkControl: Fix scrollbar displayed on toggle link settings. ([47986](https://github.com/WordPress/gutenberg/pull/47986)) +- Rich text: Stabilise onFocus. ([47685](https://github.com/WordPress/gutenberg/pull/47685)) + +#### Design Tools +- Avatar: Fix application of borders. ([47630](https://github.com/WordPress/gutenberg/pull/47630)) +- Image: Allow deprecated blocks to render border-radius. ([47766](https://github.com/WordPress/gutenberg/pull/47766)) +- ToolsPanel: Ensure display of optional items when panel id is null. ([47864](https://github.com/WordPress/gutenberg/pull/47864)) + +#### Testing +- Fix `editor.getBlocks` for unmodified default block. ([48093](https://github.com/WordPress/gutenberg/pull/48093)) +- Visual Regression tests: Use default playwright utils. ([47991](https://github.com/WordPress/gutenberg/pull/47991)) + +#### Global Styles +- Fix incorrect targeting of block wrappers for root padding in the ediā€¦. ([48002](https://github.com/WordPress/gutenberg/pull/48002)) +- Fix infinite render of inline block preview. ([47697](https://github.com/WordPress/gutenberg/pull/47697)) + +#### Components +- ColorPalette: Ensure text label contrast checking works with CSS variables. ([47373](https://github.com/WordPress/gutenberg/pull/47373)) +- SelectControl: Fix `multiple` prop styling. ([47893](https://github.com/WordPress/gutenberg/pull/47893)) + +#### Post Editor +- Fix multi entities saved state in the post editor. ([47734](https://github.com/WordPress/gutenberg/pull/47734)) +- LocalAutosaveNotice: Use stable notice id to prevent double notices. ([47776](https://github.com/WordPress/gutenberg/pull/47776)) + +#### Layout +- [Layout]: Fix align controls for hybrid themes. ([47961](https://github.com/WordPress/gutenberg/pull/47961)) + +#### Patterns +- Cover: Ensure `url` is not malformed due to sanitization through `wp_kses`. ([47906](https://github.com/WordPress/gutenberg/pull/47906)) + +#### Themes +- Fix: Issues on block level settings. ([47842](https://github.com/WordPress/gutenberg/pull/47842)) + +#### Plugin +- Fix the 'WP_HTML_Tag_Processor' file path. ([47823](https://github.com/WordPress/gutenberg/pull/47823)) + +#### Build Tooling +- Performance: Restore initial reduce value in perf results log script. ([47650](https://github.com/WordPress/gutenberg/pull/47650)) + +#### Block API +- Block Spacing: Don't show UI when only one direction is supported. ([47523](https://github.com/WordPress/gutenberg/pull/47523)) + +#### Scripts +- Cherry-pick CLI: Fix the default label to match the documentation. ([47832](https://github.com/WordPress/gutenberg/pull/47832)) + +### Performance + +- Avoid string-allocation on keypress with inputRule. ([47094](https://github.com/WordPress/gutenberg/pull/47094)) +- Fix empty results handling in performance test results. ([47646](https://github.com/WordPress/gutenberg/pull/47646)) +- Fix typo in performance script name. ([47647](https://github.com/WordPress/gutenberg/pull/47647)) +- Lodash: Remove from `@wordpress/keycodes` package. ([47737](https://github.com/WordPress/gutenberg/pull/47737)) + +#### Block Editor +- Block Editor: Optimize `__unstableGetVisibleBlocks()`. ([47681](https://github.com/WordPress/gutenberg/pull/47681)) + +#### Site Editor +- Enable React StrictMode again. ([47639](https://github.com/WordPress/gutenberg/pull/47639)) + +#### Block Library +- Navigation: Performance: Improve params in `block_core_navigation_get_most_recently_published_navigation`. ([47998](https://github.com/WordPress/gutenberg/pull/47998)) +- Page List: Block improvement.. ([47981](https://github.com/WordPress/gutenberg/pull/47981)) +- Page List: Performance: Improve page list callback. ([48004](https://github.com/WordPress/gutenberg/pull/48004)) +- Post Title: Performance: Render_block_core_post_title - Use post object instead of id. ([48001](https://github.com/WordPress/gutenberg/pull/48001)) +- Template Part: Performance: Replace usage of wp_get_theme()->get_stylesheet() with get_stylesheet(). ([48027](https://github.com/WordPress/gutenberg/pull/48027)) +- Tweaks to gutenberg_render_layout_support_flag. ([48003](https://github.com/WordPress/gutenberg/pull/48003)) + +#### Data Layer +- Lodash: Refactor away from `_.get()` in resolvers cache middleware. ([47743](https://github.com/WordPress/gutenberg/pull/47743)) +- Lodash: Refactor away from `_.mapValues()` in data registry. ([47742](https://github.com/WordPress/gutenberg/pull/47742)) +- Lodash: Refactor persistence plugin away from `_.merge()`. ([47790](https://github.com/WordPress/gutenberg/pull/47790)) +- Lodash: Remove from `@wordpress/data`'s `getResolutionState()`. ([47838](https://github.com/WordPress/gutenberg/pull/47838)) +- Lodash: Remove from `@wordpress/data`. ([47848](https://github.com/WordPress/gutenberg/pull/47848)) +- Lodash: Remove from `useDispatchWithMap()`. ([47835](https://github.com/WordPress/gutenberg/pull/47835)) + +#### Template Editor +- Disable lazy loading term meta get_block_templates. ([47999](https://github.com/WordPress/gutenberg/pull/47999)) + +#### Themes +- Improvements on append_to_selector method. ([47833](https://github.com/WordPress/gutenberg/pull/47833)) + +#### Block Directory +- Optimize `DownloadableBlocksPanel`. ([47679](https://github.com/WordPress/gutenberg/pull/47679)) + + +### Experiments + +- Handle block metadata attribute and related experimental APIs. ([47791](https://github.com/WordPress/gutenberg/pull/47791)) +- Rename the "experiments" export to "privateApis". ([47975](https://github.com/WordPress/gutenberg/pull/47975)) +- [Trunk] Rename experiments package to private-apis. ([47839](https://github.com/WordPress/gutenberg/pull/47839)) + + +### Documentation + +- Add: Database credentials to wp-env documentation. ([47940](https://github.com/WordPress/gutenberg/pull/47940)) +- Block schema and block supports docs: Add dimensions and position settings. ([48057](https://github.com/WordPress/gutenberg/pull/48057)) +- Components: Polish heading level component APIs. ([47788](https://github.com/WordPress/gutenberg/pull/47788)) +- Docs: Add ancestor property to block-registration.md doc. ([45832](https://github.com/WordPress/gutenberg/pull/45832)) +- Docs: Don't recommend using short array syntax in WP_HTML_Tag_Processor. ([47958](https://github.com/WordPress/gutenberg/pull/47958)) +- Docs: Fix the incorrect link to eslint-plugin-jsx-a11y. ([47773](https://github.com/WordPress/gutenberg/pull/47773)) +- Fix unbalanced parenthesis in Element README. ([47700](https://github.com/WordPress/gutenberg/pull/47700)) +- Minor updates in Private APIs. ([47953](https://github.com/WordPress/gutenberg/pull/47953)) + + +### Code Quality + +- Core Data: Fix ESLint warnings for the hooks directory. ([47811](https://github.com/WordPress/gutenberg/pull/47811)) +- ESLint: Change `jsdoc/check-line-alignment` from `warn` to `error`. ([47878](https://github.com/WordPress/gutenberg/pull/47878)) +- ESLint: Fix a bunch of ESLint alignment warnings. ([47872](https://github.com/WordPress/gutenberg/pull/47872)) +- Enable react-hooks/exhaustive-deps eslint rules. ([24914](https://github.com/WordPress/gutenberg/pull/24914)) +- Update `moment` and `moment-timezone` packages to fix timezone issues. ([47879](https://github.com/WordPress/gutenberg/pull/47879)) + +#### Components +- AnglePickerControl: Refactor to TypeScript. ([45820](https://github.com/WordPress/gutenberg/pull/45820)) +- BorderBoxControl: Migrate tests to TypeScript, remove `act()` call. ([47755](https://github.com/WordPress/gutenberg/pull/47755)) +- BoxControl: Convert to TypeScript. ([47622](https://github.com/WordPress/gutenberg/pull/47622)) +- ComboboxControl: Convert to TypeScript. ([47581](https://github.com/WordPress/gutenberg/pull/47581)) +- CustomSelectControl: Privatise __experimentalShowSelectedHint using @wordpress/experiments. ([47229](https://github.com/WordPress/gutenberg/pull/47229)) +- CustomSelectControl: Update size prop options to new format in Storybook examples. ([47779](https://github.com/WordPress/gutenberg/pull/47779)) +- Navigator: Add more pattern matching tests, refine existing tests. ([47910](https://github.com/WordPress/gutenberg/pull/47910)) +- NavigatorButton: Reuse Button types. ([47754](https://github.com/WordPress/gutenberg/pull/47754)) +- Panel: Convert to TypeScript. ([47259](https://github.com/WordPress/gutenberg/pull/47259)) +- Popover: Lock the __experimentalPopoverPositionToPlacement function. ([47505](https://github.com/WordPress/gutenberg/pull/47505)) +- Refactor Toolbar component to TypeScript. ([47087](https://github.com/WordPress/gutenberg/pull/47087)) +- Remove BaseField component. ([47911](https://github.com/WordPress/gutenberg/pull/47911)) +- Remove unnecessary `act()` from `Button` tests. ([47687](https://github.com/WordPress/gutenberg/pull/47687)) +- Remove unnecessary `act()` from `DropdownMenu` tests. ([47692](https://github.com/WordPress/gutenberg/pull/47692)) +- Remove unnecessary `act()` from `Popover` tests. ([47690](https://github.com/WordPress/gutenberg/pull/47690)) +- Remove unnecessary `act()` from `ToolsPanel` tests. ([47691](https://github.com/WordPress/gutenberg/pull/47691)) +- ResizableBox: Refactor styles to TypeScript. ([47756](https://github.com/WordPress/gutenberg/pull/47756)) +- TreeGrid: Convert to TypeScript. ([47516](https://github.com/WordPress/gutenberg/pull/47516)) +- `MenuItemsChoice`: Refactor to TypeScript. ([47180](https://github.com/WordPress/gutenberg/pull/47180)) +- `ToolsPanel`: Refactor Storybook examples to TypeScript, fix types inconsistencies. ([47944](https://github.com/WordPress/gutenberg/pull/47944)) + +#### Block Library +- Gallery: Minor code quality update. ([47774](https://github.com/WordPress/gutenberg/pull/47774)) +- Image: Simplify the method for getting block editor settings. ([47903](https://github.com/WordPress/gutenberg/pull/47903)) +- Navigation: Chore Remove unexistant parameter from selectNavigationMenus call. ([47941](https://github.com/WordPress/gutenberg/pull/47941)) +- Site Logo: Simplify the method for getting block editor settings. ([47736](https://github.com/WordPress/gutenberg/pull/47736)) +- Table Block: Don't render empty section. ([47753](https://github.com/WordPress/gutenberg/pull/47753)) + +#### Site Editor +- Make process_blocks_custom_css method protected. ([47725](https://github.com/WordPress/gutenberg/pull/47725)) +- Move site editor 6.2 specific code to the right file. ([48023](https://github.com/WordPress/gutenberg/pull/48023)) +- Remove: Unused code from the navigation inspector select logic. ([48044](https://github.com/WordPress/gutenberg/pull/48044)) + +#### Global Styles +- Extract the getSupportedStyles selector to the blocks store as a private selector. ([47606](https://github.com/WordPress/gutenberg/pull/47606)) +- Remove the name and element props from the TypographyPanel component. ([47908](https://github.com/WordPress/gutenberg/pull/47908)) + +#### Post Editor +- Add missing period in keyboard shortcut descriptions. ([47899](https://github.com/WordPress/gutenberg/pull/47899)) +- Edit Post: Remove unnecessary 'classnames' in Header component. ([47635](https://github.com/WordPress/gutenberg/pull/47635)) + +#### REST API +- Chore: Move Gutenberg_REST_Templates_Controller from 6.2 to 6.3 compatibility. ([48077](https://github.com/WordPress/gutenberg/pull/48077)) + +#### Themes +- Sync: Widget import changes from the core. ([47875](https://github.com/WordPress/gutenberg/pull/47875)) + +#### Patterns +- Refactor: usePatternsCategories: Simplify category sorting. ([47843](https://github.com/WordPress/gutenberg/pull/47843)) + +#### Document Settings +- Most Used Terms: Pass dependency to the useSelect. ([47810](https://github.com/WordPress/gutenberg/pull/47810)) + +#### Block API +- HTML API: Move into 6.2 Compat Folder since inclusion in Core. ([47749](https://github.com/WordPress/gutenberg/pull/47749)) + +#### Data Layer +- Fixed incorrect type annotations in @wordpress/data. ([46881](https://github.com/WordPress/gutenberg/pull/46881)) + + +### Tools +- Dependency Extraction Webpack Plugin: Update json2php dependency. ([47831](https://github.com/WordPress/gutenberg/pull/47831)) + +#### Testing +- Add tests for gutenberg_render_layout_support_flag. ([47719](https://github.com/WordPress/gutenberg/pull/47719)) +- Migrate Heading block tests to Playwright. ([47955](https://github.com/WordPress/gutenberg/pull/47955)) +- Migrate query test to Playwright. ([47995](https://github.com/WordPress/gutenberg/pull/47995)) +- Navigation: end-to-end tests: Default to classic menu. ([47867](https://github.com/WordPress/gutenberg/pull/47867)) +- Navigation: end-to-end tests: Default to my only existing menu. ([47744](https://github.com/WordPress/gutenberg/pull/47744)) +- Remove obsolete failing test for Font Size Picker. ([47913](https://github.com/WordPress/gutenberg/pull/47913)) +- Shard playwright tests into two separate jobs using a matrix. ([47629](https://github.com/WordPress/gutenberg/pull/47629)) +- Update code and tests for theme json class after the back port in core. ([47668](https://github.com/WordPress/gutenberg/pull/47668)) +- Upgrade Playwright to 1.30.0. ([48007](https://github.com/WordPress/gutenberg/pull/48007)) + +#### Build Tooling +- Add basic tsconfig.json validation. ([47595](https://github.com/WordPress/gutenberg/pull/47595)) +- Front-end classic performance test: Set TwentyTwentyOne when running in isolation. ([47965](https://github.com/WordPress/gutenberg/pull/47965)) +- Perf tests: Store test run results as artifact. ([45747](https://github.com/WordPress/gutenberg/pull/45747)) +- Performance suite: Track Largest Contentful Paint in the front-end. ([47938](https://github.com/WordPress/gutenberg/pull/47938)) + +#### Block Library +- Navigation: Add warning test. ([45207](https://github.com/WordPress/gutenberg/pull/45207)) + + +## First time contributors + +The following PRs were merged by first time contributors: + +- @creative-andrew: Add: Database credentials to wp-env documentation. ([47940](https://github.com/WordPress/gutenberg/pull/47940)) +- @dpellenwood: Scripts: Add PostCSS (.pcss extension) file support to wp-scripts. ([45352](https://github.com/WordPress/gutenberg/pull/45352)) +- @griffinjohndavid: Set block attributes to require either type or enum. ([45365](https://github.com/WordPress/gutenberg/pull/45365)) +- @mike-day: Refactor Toolbar component to TypeScript. ([47087](https://github.com/WordPress/gutenberg/pull/47087)) + + +## Contributors + +The following contributors merged PRs in this release: + +@aaronrobertshaw @adamziel @afercia @ajlende @alexstine @andrewserong @aristath @brookewp @carolinan @ciampo @creative-andrew @d-alleyne @dcalhoun @dmsnell @dpellenwood @draganescu @ellatrix @flootr @fluiddot @georgeh @geriux @getdave @glendaviesnz @griffinjohndavid @gziolo @jhnstn @jorgefilipecosta @jsnajdr @kebbet @kevin940726 @kkmuffme @madhusudhand @MaggieCabrera @Mamaduka @marekdedic @mauteri @mcsf @mike-day @mirka @mreishus @nielslange @noahtallen @noisysocks @ntsekouras @oandregal @scruffian @sgomes @SiobhyB @spacedmonkey @t-hamano @talldan @tellthemachines @tyxla @wojtekn @WunderBart @youknowriad + + = 15.1.0 = ## Changelog diff --git a/gutenberg.php b/gutenberg.php index 07ded24a330e2..ca9be89162ebc 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -5,7 +5,7 @@ * Description: Printing since 1440. This is the development plugin for the block editor, site editor, and other future WordPress core functionality. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: 15.1.0 + * Version: 15.2.0-rc.1 * Author: Gutenberg Team * Text Domain: gutenberg * diff --git a/lib/load.php b/lib/load.php index 035fbe3740627..c99668ff3739c 100644 --- a/lib/load.php +++ b/lib/load.php @@ -109,15 +109,20 @@ function gutenberg_is_experiment_enabled( $name ) { require __DIR__ . '/experimental/kses.php'; // Fonts API. -require __DIR__ . '/experimental/fonts-api/class-wp-fonts-provider.php'; -require __DIR__ . '/experimental/fonts-api/deprecations/webfonts-deprecations.php'; -require __DIR__ . '/experimental/fonts-api/deprecations/class-wp-webfonts-provider.php'; -require __DIR__ . '/experimental/fonts-api/deprecations/class-wp-webfonts.php'; -require __DIR__ . '/experimental/fonts-api/class-wp-fonts-utils.php'; -require __DIR__ . '/experimental/fonts-api/register-fonts-from-theme-json.php'; -require __DIR__ . '/experimental/fonts-api/class-wp-fonts.php'; -require __DIR__ . '/experimental/fonts-api/class-wp-fonts-provider-local.php'; -require __DIR__ . '/experimental/fonts-api/fonts-api.php'; +if ( ! class_exists( 'WP_Fonts' ) ) { + require __DIR__ . '/experimental/fonts-api/class-wp-fonts-provider.php'; + require __DIR__ . '/experimental/fonts-api/deprecations/webfonts-deprecations.php'; + require __DIR__ . '/experimental/fonts-api/deprecations/class-wp-webfonts-utils.php'; + require __DIR__ . '/experimental/fonts-api/deprecations/class-wp-webfonts-provider.php'; + require __DIR__ . '/experimental/fonts-api/deprecations/class-wp-webfonts-provider-local.php'; + require __DIR__ . '/experimental/fonts-api/deprecations/class-wp-webfonts.php'; + require __DIR__ . '/experimental/fonts-api/deprecations/class-wp-web-fonts.php'; + require __DIR__ . '/experimental/fonts-api/class-wp-fonts-utils.php'; + require __DIR__ . '/experimental/fonts-api/register-fonts-from-theme-json.php'; + require __DIR__ . '/experimental/fonts-api/class-wp-fonts.php'; + require __DIR__ . '/experimental/fonts-api/class-wp-fonts-provider-local.php'; + require __DIR__ . '/experimental/fonts-api/fonts-api.php'; +} // Plugin specific code. require __DIR__ . '/class-wp-theme-json-gutenberg.php'; diff --git a/package-lock.json b/package-lock.json index 6fb9ece91f420..a59aa9f4bbae2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "15.1.0", + "version": "15.2.0-rc.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -17458,12 +17458,14 @@ "classnames": "^2.3.1", "colord": "^2.7.0", "date-fns": "^2.28.0", + "deepmerge": "^4.3.0", "dom-scroll-into-view": "^1.2.1", "downshift": "^6.0.15", "fast-deep-equal": "^3.1.3", "framer-motion": "^7.6.1", "gradient-parser": "^0.1.5", "highlight-words-core": "^1.2.2", + "is-plain-object": "^5.0.0", "lodash": "^4.17.21", "memize": "^1.1.0", "path-to-regexp": "^6.2.1", @@ -17481,6 +17483,11 @@ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.3.tgz", "integrity": "sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==" }, + "deepmerge": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.0.tgz", + "integrity": "sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==" + }, "path-to-regexp": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", diff --git a/package.json b/package.json index aaf16e907f13e..cdac43e2d4ecb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "15.1.0", + "version": "15.2.0-rc.1", "private": true, "description": "A new WordPress editor experience.", "author": "The WordPress Contributors", diff --git a/packages/a11y/CHANGELOG.md b/packages/a11y/CHANGELOG.md index d835cb8815a22..2119cc67d4a23 100644 --- a/packages/a11y/CHANGELOG.md +++ b/packages/a11y/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.27.0 (2023-02-15) + ## 3.26.0 (2023-02-01) ## 3.25.0 (2023-01-11) diff --git a/packages/a11y/package.json b/packages/a11y/package.json index 7f48d5db5599c..a21ceb6a1ceaf 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/a11y", - "version": "3.26.0", + "version": "3.27.0", "description": "Accessibility (a11y) utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/annotations/CHANGELOG.md b/packages/annotations/CHANGELOG.md index 33bce817cc802..0987d90e86022 100644 --- a/packages/annotations/CHANGELOG.md +++ b/packages/annotations/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.27.0 (2023-02-15) + ## 2.26.0 (2023-02-01) ## 2.25.0 (2023-01-11) diff --git a/packages/annotations/package.json b/packages/annotations/package.json index fd067a851e948..32bc5b386d21b 100644 --- a/packages/annotations/package.json +++ b/packages/annotations/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/annotations", - "version": "2.26.0", + "version": "2.27.0", "description": "Annotate content in the Gutenberg editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/api-fetch/CHANGELOG.md b/packages/api-fetch/CHANGELOG.md index 7dd9fea4831cb..d40c43fa486b8 100644 --- a/packages/api-fetch/CHANGELOG.md +++ b/packages/api-fetch/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.24.0 (2023-02-15) + ## 6.23.0 (2023-02-01) ## 6.22.0 (2023-01-11) diff --git a/packages/api-fetch/package.json b/packages/api-fetch/package.json index 8aa13a4940774..81ccd648f3a41 100644 --- a/packages/api-fetch/package.json +++ b/packages/api-fetch/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/api-fetch", - "version": "6.23.0", + "version": "6.24.0", "description": "Utility to make WordPress REST API requests.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/autop/CHANGELOG.md b/packages/autop/CHANGELOG.md index 84e66fe3f547a..cb9ab86c44b51 100644 --- a/packages/autop/CHANGELOG.md +++ b/packages/autop/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.27.0 (2023-02-15) + ## 3.26.0 (2023-02-01) ## 3.25.0 (2023-01-11) diff --git a/packages/autop/package.json b/packages/autop/package.json index e2cce204d0ffd..f0365c7841f93 100644 --- a/packages/autop/package.json +++ b/packages/autop/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/autop", - "version": "3.26.0", + "version": "3.27.0", "description": "WordPress's automatic paragraph functions `autop` and `removep`.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md b/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md index 76a158423ffb5..d76cedc4682ee 100644 --- a/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md +++ b/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.10.0 (2023-02-15) + ## 4.9.0 (2023-02-01) ## 4.8.0 (2023-01-11) diff --git a/packages/babel-plugin-import-jsx-pragma/package.json b/packages/babel-plugin-import-jsx-pragma/package.json index b3c45e6500756..afc65467414cc 100644 --- a/packages/babel-plugin-import-jsx-pragma/package.json +++ b/packages/babel-plugin-import-jsx-pragma/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-plugin-import-jsx-pragma", - "version": "4.9.0", + "version": "4.10.0", "description": "Babel transform plugin for automatically injecting an import to be used as the pragma for the React JSX Transform plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-plugin-makepot/CHANGELOG.md b/packages/babel-plugin-makepot/CHANGELOG.md index 744a7bc7d0cad..4e059b869e585 100644 --- a/packages/babel-plugin-makepot/CHANGELOG.md +++ b/packages/babel-plugin-makepot/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.11.0 (2023-02-15) + ## 5.10.0 (2023-02-01) ## 5.9.0 (2023-01-11) diff --git a/packages/babel-plugin-makepot/package.json b/packages/babel-plugin-makepot/package.json index b816b4c6995b2..f172ca8f270a9 100644 --- a/packages/babel-plugin-makepot/package.json +++ b/packages/babel-plugin-makepot/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-plugin-makepot", - "version": "5.10.0", + "version": "5.11.0", "description": "WordPress Babel internationalization (i18n) plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-preset-default/CHANGELOG.md b/packages/babel-preset-default/CHANGELOG.md index faa0ff6cf8464..9c43933c86635 100644 --- a/packages/babel-preset-default/CHANGELOG.md +++ b/packages/babel-preset-default/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 7.11.0 (2023-02-15) + ## 7.10.0 (2023-02-01) ## 7.9.0 (2023-01-11) diff --git a/packages/babel-preset-default/package.json b/packages/babel-preset-default/package.json index ce128cbd577f0..d7b6737d7f950 100644 --- a/packages/babel-preset-default/package.json +++ b/packages/babel-preset-default/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-preset-default", - "version": "7.10.0", + "version": "7.11.0", "description": "Default Babel preset for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/base-styles/CHANGELOG.md b/packages/base-styles/CHANGELOG.md index 7087147ca31db..24dd4aeec450f 100644 --- a/packages/base-styles/CHANGELOG.md +++ b/packages/base-styles/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.18.0 (2023-02-15) + ## 4.17.0 (2023-02-01) ## 4.16.0 (2023-01-11) diff --git a/packages/base-styles/package.json b/packages/base-styles/package.json index a5c25ef1ef129..ed16d987fba50 100644 --- a/packages/base-styles/package.json +++ b/packages/base-styles/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/base-styles", - "version": "4.17.0", + "version": "4.18.0", "description": "Base SCSS utilities and variables for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/blob/CHANGELOG.md b/packages/blob/CHANGELOG.md index 700c3ae303932..cf0ccba9c6862 100644 --- a/packages/blob/CHANGELOG.md +++ b/packages/blob/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.27.0 (2023-02-15) + ## 3.26.0 (2023-02-01) ## 3.25.0 (2023-01-11) diff --git a/packages/blob/package.json b/packages/blob/package.json index a3d52b827be1f..18569dcb97416 100644 --- a/packages/blob/package.json +++ b/packages/blob/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/blob", - "version": "3.26.0", + "version": "3.27.0", "description": "Blob utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-directory/CHANGELOG.md b/packages/block-directory/CHANGELOG.md index 4de8815381e8c..9498e6da9dfa8 100644 --- a/packages/block-directory/CHANGELOG.md +++ b/packages/block-directory/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.4.0 (2023-02-15) + ## 4.3.0 (2023-02-01) ## 4.2.0 (2023-01-11) diff --git a/packages/block-directory/package.json b/packages/block-directory/package.json index df4c760a669d1..d051dcb44c83c 100644 --- a/packages/block-directory/package.json +++ b/packages/block-directory/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-directory", - "version": "4.3.0", + "version": "4.4.0", "description": "Extend editor with block directory features to search, download and install blocks.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-editor/CHANGELOG.md b/packages/block-editor/CHANGELOG.md index be28b8306406b..17a8fcb5b872c 100644 --- a/packages/block-editor/CHANGELOG.md +++ b/packages/block-editor/CHANGELOG.md @@ -2,6 +2,12 @@ ## Unreleased +## 11.4.0 (2023-02-15) + +### Bug Fix + +- `LinkControl`: fix scrollbar displayed on toggle link settings ([#47986](https://github.com/WordPress/gutenberg/pull/47986)). + ## 11.3.0 (2023-02-01) ## 11.2.0 (2023-01-11) diff --git a/packages/block-editor/package.json b/packages/block-editor/package.json index 129a4f6f178bb..4cacc59299a63 100644 --- a/packages/block-editor/package.json +++ b/packages/block-editor/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-editor", - "version": "11.3.0", + "version": "11.4.0", "description": "Generic block editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-editor/src/components/block-types-list/index.native.js b/packages/block-editor/src/components/block-types-list/index.native.js index d62987d408aea..450e45220436e 100644 --- a/packages/block-editor/src/components/block-types-list/index.native.js +++ b/packages/block-editor/src/components/block-types-list/index.native.js @@ -32,6 +32,7 @@ export default function BlockTypesList( { name, sections, onSelect, + label, listProps, initialNumToRender = 3, } ) { @@ -154,6 +155,7 @@ export default function BlockTypesList( { ); } diff --git a/packages/block-editor/src/components/inserter/reusable-blocks-tab.native.js b/packages/block-editor/src/components/inserter/reusable-blocks-tab.native.js index 825169e17315f..d50a5a99f2728 100644 --- a/packages/block-editor/src/components/inserter/reusable-blocks-tab.native.js +++ b/packages/block-editor/src/components/inserter/reusable-blocks-tab.native.js @@ -2,6 +2,7 @@ * WordPress dependencies */ import { useSelect } from '@wordpress/data'; +import { __ } from '@wordpress/i18n'; /** * Internal dependencies @@ -31,6 +32,7 @@ function ReusableBlocksTab( { onSelect, rootClientId, listProps } ) { sections={ sections } onSelect={ onSelect } listProps={ listProps } + label={ __( 'Reusable blocks' ) } /> ); } diff --git a/packages/block-editor/src/components/inserter/search-results.native.js b/packages/block-editor/src/components/inserter/search-results.native.js index a32c6ecf1a1c3..bc951dac1de02 100644 --- a/packages/block-editor/src/components/inserter/search-results.native.js +++ b/packages/block-editor/src/components/inserter/search-results.native.js @@ -2,6 +2,7 @@ * WordPress dependencies */ import { useSelect } from '@wordpress/data'; +import { __ } from '@wordpress/i18n'; /** * Internal dependencies @@ -54,6 +55,7 @@ function InserterSearchResults( { sections={ [ createInserterSection( { key: 'search', items } ) ] } onSelect={ handleSelect } listProps={ listProps } + label={ __( 'Blocks' ) } /> ); } diff --git a/packages/block-editor/src/components/link-control/style.scss b/packages/block-editor/src/components/link-control/style.scss index f93c724598b89..743ebcebc23c2 100644 --- a/packages/block-editor/src/components/link-control/style.scss +++ b/packages/block-editor/src/components/link-control/style.scss @@ -463,7 +463,13 @@ $preview-image-height: 140px; justify-content: space-between; margin: 0; padding: $grid-unit-20; - padding-top: 0; + + // To hide the horizontal scrollbar on toggle. + // Margin and padding are needed to prevent cutoff of the toggle button focus outline. + // See: https://github.com/WordPress/gutenberg/pull/47986 + margin-top: calc(var(--wp-admin-border-width-focus) * -1); + padding-top: var(--wp-admin-border-width-focus); + overflow: hidden; } .block-editor-link-control__unlink { diff --git a/packages/block-editor/src/components/list-view/block.js b/packages/block-editor/src/components/list-view/block.js index e80d2a9348741..bf024b1fb758b 100644 --- a/packages/block-editor/src/components/list-view/block.js +++ b/packages/block-editor/src/components/list-view/block.js @@ -27,6 +27,7 @@ import { sprintf, __ } from '@wordpress/i18n'; * Internal dependencies */ import ListViewLeaf from './leaf'; +import useListViewScrollIntoView from './use-list-view-scroll-into-view'; import { BlockMoverUpButton, BlockMoverDownButton, @@ -57,6 +58,7 @@ function ListViewBlock( { isSyncedBranch, } ) { const cellRef = useRef( null ); + const rowRef = useRef( null ); const [ isHovered, setIsHovered ] = useState( false ); const { clientId } = block; @@ -220,6 +222,15 @@ function ListViewBlock( { ? selectedClientIds : [ clientId ]; + // Pass in a ref to the row, so that it can be scrolled + // into view when selected. For long lists, the placeholder for the + // selected block is also observed, within ListViewLeafPlaceholder. + useListViewScrollIntoView( { + isSelected, + rowItemRef: rowRef, + selectedClientIds, + } ); + return ( { showBlock && ( diff --git a/packages/block-editor/src/components/list-view/leaf.js b/packages/block-editor/src/components/list-view/leaf.js index 41bf4bc34cc66..63c154fd62037 100644 --- a/packages/block-editor/src/components/list-view/leaf.js +++ b/packages/block-editor/src/components/list-view/leaf.js @@ -8,6 +8,8 @@ import classnames from 'classnames'; * WordPress dependencies */ import { __experimentalTreeGridRow as TreeGridRow } from '@wordpress/components'; +import { useMergeRefs } from '@wordpress/compose'; +import { forwardRef } from '@wordpress/element'; /** * Internal dependencies @@ -16,33 +18,45 @@ import useMovingAnimation from '../use-moving-animation'; const AnimatedTreeGridRow = animated( TreeGridRow ); -export default function ListViewLeaf( { - isSelected, - position, - level, - rowCount, - children, - className, - path, - ...props -} ) { - const ref = useMovingAnimation( { - isSelected, - adjustScrolling: false, - enableAnimation: true, - triggerAnimationOnChange: path, - } ); +const ListViewLeaf = forwardRef( + ( + { + isSelected, + position, + level, + rowCount, + children, + className, + path, + ...props + }, + ref + ) => { + const animationRef = useMovingAnimation( { + isSelected, + adjustScrolling: false, + enableAnimation: true, + triggerAnimationOnChange: path, + } ); - return ( - - { children } - - ); -} + const mergedRef = useMergeRefs( [ ref, animationRef ] ); + + return ( + + { children } + + ); + } +); + +export default ListViewLeaf; diff --git a/packages/block-editor/src/components/list-view/use-list-view-scroll-into-view.js b/packages/block-editor/src/components/list-view/use-list-view-scroll-into-view.js new file mode 100644 index 0000000000000..bee9c3b87a729 --- /dev/null +++ b/packages/block-editor/src/components/list-view/use-list-view-scroll-into-view.js @@ -0,0 +1,48 @@ +/** + * WordPress dependencies + */ +import { getScrollContainer } from '@wordpress/dom'; +import { useLayoutEffect } from '@wordpress/element'; + +export default function useListViewScrollIntoView( { + isSelected, + selectedClientIds, + rowItemRef, +} ) { + const isSingleSelection = selectedClientIds.length === 1; + + useLayoutEffect( () => { + // Skip scrolling into view if this particular block isn't selected, + // or if more than one block is selected overall. This is to avoid + // scrolling the view in a multi selection where the user has intentionally + // selected multiple blocks within the list view, but the initially + // selected block may be out of view. + if ( ! isSelected || ! isSingleSelection || ! rowItemRef.current ) { + return; + } + + const scrollContainer = getScrollContainer( rowItemRef.current ); + const { ownerDocument } = rowItemRef.current; + + const windowScroll = + scrollContainer === ownerDocument.body || + scrollContainer === ownerDocument.documentElement; + + // If the there is no scroll container, of if the scroll container is the window, + // do not scroll into view, as the block is already in view. + if ( windowScroll || ! scrollContainer ) { + return; + } + + const rowRect = rowItemRef.current.getBoundingClientRect(); + const scrollContainerRect = scrollContainer.getBoundingClientRect(); + + // If the selected block is not currently visible, scroll to it. + if ( + rowRect.top < scrollContainerRect.top || + rowRect.bottom > scrollContainerRect.bottom + ) { + rowItemRef.current.scrollIntoView(); + } + }, [ isSelected, isSingleSelection, rowItemRef ] ); +} diff --git a/packages/block-editor/src/components/off-canvas-editor/leaf-more-menu.js b/packages/block-editor/src/components/off-canvas-editor/leaf-more-menu.js index a266f0d9377c3..a3829998361bc 100644 --- a/packages/block-editor/src/components/off-canvas-editor/leaf-more-menu.js +++ b/packages/block-editor/src/components/off-canvas-editor/leaf-more-menu.js @@ -2,9 +2,14 @@ * WordPress dependencies */ import { createBlock } from '@wordpress/blocks'; -import { addSubmenu, moreVertical } from '@wordpress/icons'; +import { + addSubmenu, + chevronUp, + chevronDown, + moreVertical, +} from '@wordpress/icons'; import { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components'; -import { useDispatch } from '@wordpress/data'; +import { useDispatch, useSelect } from '@wordpress/data'; import { __, sprintf } from '@wordpress/i18n'; /** @@ -80,14 +85,24 @@ function AddSubmenuItem( { block, onClose } ) { export default function LeafMoreMenu( props ) { const { clientId, block } = props; - const { removeBlocks } = useDispatch( blockEditorStore ); + const { moveBlocksDown, moveBlocksUp, removeBlocks } = + useDispatch( blockEditorStore ); - const label = sprintf( + const removeLabel = sprintf( /* translators: %s: block name */ __( 'Remove %s' ), BlockTitle( { clientId, maximumLength: 25 } ) ); + const rootClientId = useSelect( + ( select ) => { + const { getBlockRootClientId } = select( blockEditorStore ); + + return getBlockRootClientId( clientId ); + }, + [ clientId ] + ); + return ( { ( { onClose } ) => ( - - - { - removeBlocks( [ clientId ], false ); - onClose(); - } } - > - { label } - - + <> + + { + moveBlocksUp( [ clientId ], rootClientId ); + onClose(); + } } + > + { __( 'Move up' ) } + + { + moveBlocksDown( [ clientId ], rootClientId ); + onClose(); + } } + > + { __( 'Move down' ) } + + + + + { + removeBlocks( [ clientId ], false ); + onClose(); + } } + > + { removeLabel } + + + ) } ); diff --git a/packages/block-library/CHANGELOG.md b/packages/block-library/CHANGELOG.md index fe963a9dd32db..e07172a0f625b 100644 --- a/packages/block-library/CHANGELOG.md +++ b/packages/block-library/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 8.4.0 (2023-02-15) + ## 8.3.0 (2023-02-01) ## 8.2.0 (2023-01-11) diff --git a/packages/block-library/package.json b/packages/block-library/package.json index 49d2bbb51a21d..dd445c6b462b0 100644 --- a/packages/block-library/package.json +++ b/packages/block-library/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-library", - "version": "8.3.0", + "version": "8.4.0", "description": "Block library for the WordPress editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-library/src/navigation/edit/index.js b/packages/block-library/src/navigation/edit/index.js index e0f4da63c6e44..f3fe01508818b 100644 --- a/packages/block-library/src/navigation/edit/index.js +++ b/packages/block-library/src/navigation/edit/index.js @@ -148,34 +148,6 @@ function Navigation( { createNavigationMenu( '' ); }; - useEffect( () => { - hideNavigationMenuStatusNotice(); - - if ( isCreatingNavigationMenu ) { - speak( __( `Creating Navigation Menu.` ) ); - } - - if ( createNavigationMenuIsSuccess ) { - handleUpdateMenu( createNavigationMenuPost.id, { - focusNavigationBlock: true, - } ); - - showNavigationMenuStatusNotice( - __( `Navigation Menu successfully created.` ) - ); - } - - if ( createNavigationMenuIsError ) { - showNavigationMenuStatusNotice( - __( 'Failed to create Navigation Menu.' ) - ); - } - }, [ - createNavigationMenuStatus, - createNavigationMenuError, - createNavigationMenuPost, - ] ); - const { hasUncontrolledInnerBlocks, uncontrolledInnerBlocks, @@ -421,6 +393,40 @@ function Navigation( { handleUpdateMenu( menuId ); }; + useEffect( () => { + hideNavigationMenuStatusNotice(); + + if ( isCreatingNavigationMenu ) { + speak( __( `Creating Navigation Menu.` ) ); + } + + if ( createNavigationMenuIsSuccess ) { + handleUpdateMenu( createNavigationMenuPost.id, { + focusNavigationBlock: true, + } ); + + showNavigationMenuStatusNotice( + __( `Navigation Menu successfully created.` ) + ); + } + + if ( createNavigationMenuIsError ) { + showNavigationMenuStatusNotice( + __( 'Failed to create Navigation Menu.' ) + ); + } + }, [ + createNavigationMenuStatus, + createNavigationMenuError, + createNavigationMenuPost, + createNavigationMenuIsError, + createNavigationMenuIsSuccess, + handleUpdateMenu, + hideNavigationMenuStatusNotice, + isCreatingNavigationMenu, + showNavigationMenuStatusNotice, + ] ); + useEffect( () => { hideClassicMenuConversionNotice(); if ( classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_PENDING ) { diff --git a/packages/block-library/src/navigation/edit/navigation-menu-selector.js b/packages/block-library/src/navigation/edit/navigation-menu-selector.js index 2914d4fae56de..94d1890af8420 100644 --- a/packages/block-library/src/navigation/edit/navigation-menu-selector.js +++ b/packages/block-library/src/navigation/edit/navigation-menu-selector.js @@ -65,7 +65,7 @@ function NavigationMenuSelector( { }; } ) || [] ); - }, [ currentMenuId, navigationMenus, actionLabel ] ); + }, [ currentMenuId, navigationMenus, actionLabel, isCreatingMenu ] ); const hasNavigationMenus = !! navigationMenus?.length; const hasClassicMenus = !! classicMenus?.length; diff --git a/packages/block-library/src/navigation/edit/placeholder/index.js b/packages/block-library/src/navigation/edit/placeholder/index.js index 68f81c4aed99d..9914f1a128b3e 100644 --- a/packages/block-library/src/navigation/edit/placeholder/index.js +++ b/packages/block-library/src/navigation/edit/placeholder/index.js @@ -38,7 +38,7 @@ export default function NavigationPlaceholder( { if ( hasResolvedMenus ) { speak( __( 'Navigation block setup options ready.' ) ); } - }, [ isResolvingMenus, isSelected ] ); + }, [ hasResolvedMenus, isResolvingMenus, isSelected ] ); const isResolvingActions = isResolvingMenus && isResolvingCanUserCreateNavigationMenu; diff --git a/packages/block-library/src/navigation/edit/unsaved-inner-blocks.js b/packages/block-library/src/navigation/edit/unsaved-inner-blocks.js index ec91f7aa68fa4..bb23db9c3bc8d 100644 --- a/packages/block-library/src/navigation/edit/unsaved-inner-blocks.js +++ b/packages/block-library/src/navigation/edit/unsaved-inner-blocks.js @@ -146,6 +146,8 @@ export default function UnsavedInnerBlocks( { createNavigationMenu( null, blocks ); }, [ + blocks, + createNavigationMenu, isDisabled, isSaving, hasResolvedDraftNavigationMenus, diff --git a/packages/block-library/src/navigation/edit/use-convert-classic-menu-to-block-menu.js b/packages/block-library/src/navigation/edit/use-convert-classic-menu-to-block-menu.js index 01eea8d0261aa..8731cb5c32045 100644 --- a/packages/block-library/src/navigation/edit/use-convert-classic-menu-to-block-menu.js +++ b/packages/block-library/src/navigation/edit/use-convert-classic-menu-to-block-menu.js @@ -120,56 +120,59 @@ function useConvertClassicToBlockMenu( clientId ) { return navigationMenu; } - const convert = useCallback( async ( menuId, menuName, postStatus ) => { - // Check whether this classic menu is being imported already. - if ( classicMenuBeingConvertedId === menuId ) { - return; - } - - // Set the ID for the currently importing classic menu. - classicMenuBeingConvertedId = menuId; - - if ( ! menuId || ! menuName ) { - setError( 'Unable to convert menu. Missing menu details.' ); - setStatus( CLASSIC_MENU_CONVERSION_ERROR ); - return; - } - - setStatus( CLASSIC_MENU_CONVERSION_PENDING ); - setError( null ); - - return await convertClassicMenuToBlockMenu( - menuId, - menuName, - postStatus - ) - .then( ( navigationMenu ) => { - setStatus( CLASSIC_MENU_CONVERSION_SUCCESS ); - // Reset the ID for the currently importing classic menu. - classicMenuBeingConvertedId = null; - return navigationMenu; - } ) - .catch( ( err ) => { - setError( err?.message ); - // Reset the ID for the currently importing classic menu. + const convert = useCallback( + async ( menuId, menuName, postStatus ) => { + // Check whether this classic menu is being imported already. + if ( classicMenuBeingConvertedId === menuId ) { + return; + } + + // Set the ID for the currently importing classic menu. + classicMenuBeingConvertedId = menuId; + + if ( ! menuId || ! menuName ) { + setError( 'Unable to convert menu. Missing menu details.' ); setStatus( CLASSIC_MENU_CONVERSION_ERROR ); + return; + } - // Reset the ID for the currently importing classic menu. - classicMenuBeingConvertedId = null; - - // Rethrow error for debugging. - throw new Error( - sprintf( - // translators: %s: the name of a menu (e.g. Header navigation). - __( `Unable to create Navigation Menu "%s".` ), - menuName - ), - { - cause: err, - } - ); - } ); - }, [] ); + setStatus( CLASSIC_MENU_CONVERSION_PENDING ); + setError( null ); + + return await convertClassicMenuToBlockMenu( + menuId, + menuName, + postStatus + ) + .then( ( navigationMenu ) => { + setStatus( CLASSIC_MENU_CONVERSION_SUCCESS ); + // Reset the ID for the currently importing classic menu. + classicMenuBeingConvertedId = null; + return navigationMenu; + } ) + .catch( ( err ) => { + setError( err?.message ); + // Reset the ID for the currently importing classic menu. + setStatus( CLASSIC_MENU_CONVERSION_ERROR ); + + // Reset the ID for the currently importing classic menu. + classicMenuBeingConvertedId = null; + + // Rethrow error for debugging. + throw new Error( + sprintf( + // translators: %s: the name of a menu (e.g. Header navigation). + __( `Unable to create Navigation Menu "%s".` ), + menuName + ), + { + cause: err, + } + ); + } ); + }, + [ convertClassicMenuToBlockMenu ] + ); return { convert, diff --git a/packages/block-library/src/navigation/edit/use-create-navigation-menu.js b/packages/block-library/src/navigation/edit/use-create-navigation-menu.js index 32b6f9c3925f5..79fcd7d692545 100644 --- a/packages/block-library/src/navigation/edit/use-create-navigation-menu.js +++ b/packages/block-library/src/navigation/edit/use-create-navigation-menu.js @@ -90,7 +90,7 @@ export default function useCreateNavigationMenu( clientId ) { } ); } ); }, - [ serialize, saveEntityRecord ] + [ serialize, saveEntityRecord, editEntityRecord, generateDefaultTitle ] ); return { diff --git a/packages/block-library/src/navigation/edit/use-generate-default-navigation-title.js b/packages/block-library/src/navigation/edit/use-generate-default-navigation-title.js index e268ed288f154..0a134a256e664 100644 --- a/packages/block-library/src/navigation/edit/use-generate-default-navigation-title.js +++ b/packages/block-library/src/navigation/edit/use-generate-default-navigation-title.js @@ -75,5 +75,5 @@ export default function useGenerateDefaultNavigationTitle( clientId ) { : title; return titleWithCount || ''; - }, [ isDisabled, area ] ); + }, [ isDisabled, area, registry ] ); } diff --git a/packages/block-library/src/page-list/convert-to-links-modal.js b/packages/block-library/src/page-list/convert-to-links-modal.js new file mode 100644 index 0000000000000..b212fccb77417 --- /dev/null +++ b/packages/block-library/src/page-list/convert-to-links-modal.js @@ -0,0 +1,38 @@ +/** + * WordPress dependencies + */ +import { Button, Modal } from '@wordpress/components'; +import { __ } from '@wordpress/i18n'; + +export const convertDescription = __( + 'This menu is automatically kept in sync with pages on your site. You can manage the menu yourself by clicking "Edit" below.' +); + +export function ConvertToLinksModal( { onClick, onClose, disabled } ) { + return ( + +

+ { convertDescription } +

+
+ + +
+
+ ); +} diff --git a/packages/block-library/src/page-list/edit.js b/packages/block-library/src/page-list/edit.js index 6b525960db224..876496686929a 100644 --- a/packages/block-library/src/page-list/edit.js +++ b/packages/block-library/src/page-list/edit.js @@ -23,7 +23,6 @@ import { Notice, ComboboxControl, Button, - Modal, } from '@wordpress/components'; import { __, sprintf } from '@wordpress/i18n'; import { useMemo, useState, useEffect } from '@wordpress/element'; @@ -34,16 +33,15 @@ import { useSelect } from '@wordpress/data'; * Internal dependencies */ import { useConvertToNavigationLinks } from './use-convert-to-navigation-links'; +import { + convertDescription, + ConvertToLinksModal, +} from './convert-to-links-modal'; // We only show the edit option when page count is <= MAX_PAGE_COUNT // Performance of Navigation Links is not good past this value. const MAX_PAGE_COUNT = 100; const NOOP = () => {}; - -const convertDescription = __( - 'This menu is automatically kept in sync with pages on your site. You can manage the menu yourself by clicking "Edit" below.' -); - function BlockContent( { blockProps, innerBlocksProps, @@ -113,7 +111,7 @@ function BlockContent( { } } -function ConvertToLinksModal( { onClick, disabled } ) { +function ConvertToLinks( { onClick, disabled } ) { const [ isOpen, setOpen ] = useState( false ); const openModal = () => setOpen( true ); const closeModal = () => setOpen( false ); @@ -126,30 +124,11 @@ function ConvertToLinksModal( { onClick, disabled } ) { { isOpen && ( - -

- { convertDescription } -

-
- - -
-
+ ) } ); @@ -344,7 +323,7 @@ export default function PageListEdit( { ) } { allowConvertToLinks && ( - diff --git a/packages/block-serialization-default-parser/CHANGELOG.md b/packages/block-serialization-default-parser/CHANGELOG.md index 553a92191f500..82c1d6453aa95 100644 --- a/packages/block-serialization-default-parser/CHANGELOG.md +++ b/packages/block-serialization-default-parser/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.27.0 (2023-02-15) + ## 4.26.0 (2023-02-01) ## 4.25.0 (2023-01-11) diff --git a/packages/block-serialization-default-parser/package.json b/packages/block-serialization-default-parser/package.json index 9d062413d81c8..381d07c918f9a 100644 --- a/packages/block-serialization-default-parser/package.json +++ b/packages/block-serialization-default-parser/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-serialization-default-parser", - "version": "4.26.0", + "version": "4.27.0", "description": "Block serialization specification parser for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-serialization-spec-parser/CHANGELOG.md b/packages/block-serialization-spec-parser/CHANGELOG.md index 886a06c3cb6ce..3fc96701edacf 100644 --- a/packages/block-serialization-spec-parser/CHANGELOG.md +++ b/packages/block-serialization-spec-parser/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.27.0 (2023-02-15) + ## 4.26.0 (2023-02-01) ## 4.25.0 (2023-01-11) diff --git a/packages/block-serialization-spec-parser/package.json b/packages/block-serialization-spec-parser/package.json index af79ff1c1e7e6..a7bb45d218ca8 100644 --- a/packages/block-serialization-spec-parser/package.json +++ b/packages/block-serialization-spec-parser/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-serialization-spec-parser", - "version": "4.26.0", + "version": "4.27.0", "description": "Block serialization specification parser for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/blocks/CHANGELOG.md b/packages/blocks/CHANGELOG.md index 94f99ef8f882f..69003025592fb 100644 --- a/packages/blocks/CHANGELOG.md +++ b/packages/blocks/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 12.4.0 (2023-02-15) + ## 12.3.0 (2023-02-01) ## 12.2.0 (2023-01-11) diff --git a/packages/blocks/package.json b/packages/blocks/package.json index db61fc2af49c0..2cbd572c6d7a2 100644 --- a/packages/blocks/package.json +++ b/packages/blocks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/blocks", - "version": "12.3.0", + "version": "12.4.0", "description": "Block API for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/browserslist-config/CHANGELOG.md b/packages/browserslist-config/CHANGELOG.md index 59cee0278531f..a7445ce055787 100644 --- a/packages/browserslist-config/CHANGELOG.md +++ b/packages/browserslist-config/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.10.0 (2023-02-15) + ## 5.9.0 (2023-02-01) ## 5.8.0 (2023-01-11) diff --git a/packages/browserslist-config/package.json b/packages/browserslist-config/package.json index 25a0873665df6..d43ea54c28b2a 100644 --- a/packages/browserslist-config/package.json +++ b/packages/browserslist-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/browserslist-config", - "version": "5.9.0", + "version": "5.10.0", "description": "WordPress Browserslist shared configuration.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 8889af90dd997..14b2a74eaf6db 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 23.4.0 (2023-02-15) + ### Bug Fix - `ToolsPanel`: fix type inconsistencies between types, docs and normal component usage ([47944](https://github.com/WordPress/gutenberg/pull/47944)). diff --git a/packages/components/package.json b/packages/components/package.json index c4c94f7e6558c..df4f01273bedf 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/components", - "version": "23.3.0", + "version": "23.4.0", "description": "UI components for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", @@ -59,12 +59,14 @@ "classnames": "^2.3.1", "colord": "^2.7.0", "date-fns": "^2.28.0", + "deepmerge": "^4.3.0", "dom-scroll-into-view": "^1.2.1", "downshift": "^6.0.15", "fast-deep-equal": "^3.1.3", "framer-motion": "^7.6.1", "gradient-parser": "^0.1.5", "highlight-words-core": "^1.2.2", + "is-plain-object": "^5.0.0", "lodash": "^4.17.21", "memize": "^1.1.0", "path-to-regexp": "^6.2.1", diff --git a/packages/components/src/autocomplete/autocompleter-ui.native.js b/packages/components/src/autocomplete/autocompleter-ui.native.js index a8f0efa447c4f..1785d742d1ee4 100644 --- a/packages/components/src/autocomplete/autocompleter-ui.native.js +++ b/packages/components/src/autocomplete/autocompleter-ui.native.js @@ -144,6 +144,7 @@ export function getAutoCompleterUI( autocompleter ) { { // Deep clone `parentContext` to avoid mutating it later. - return merge( JSON.parse( JSON.stringify( parentContext ) ), value ); + return deepmerge( parentContext ?? {}, value ?? {}, { + isMergeableObject: isPlainObject, + } ); }, [ parentContext, value ] ); return config; diff --git a/packages/compose/CHANGELOG.md b/packages/compose/CHANGELOG.md index 1d1c0fdf710c3..a71915b4af86f 100644 --- a/packages/compose/CHANGELOG.md +++ b/packages/compose/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.4.0 (2023-02-15) + ## 6.3.0 (2023-02-01) ## 6.2.0 (2023-01-11) diff --git a/packages/compose/package.json b/packages/compose/package.json index 776d082d93ccb..e5ac5893ac72d 100644 --- a/packages/compose/package.json +++ b/packages/compose/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/compose", - "version": "6.3.0", + "version": "6.4.0", "description": "WordPress higher-order components (HOCs).", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/core-data/CHANGELOG.md b/packages/core-data/CHANGELOG.md index c7d7941938f14..037da410f061d 100644 --- a/packages/core-data/CHANGELOG.md +++ b/packages/core-data/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.4.0 (2023-02-15) + ## 6.3.0 (2023-02-01) ## 6.2.0 (2023-01-11) diff --git a/packages/core-data/package.json b/packages/core-data/package.json index 240fded9a50b7..1bcb6eb473653 100644 --- a/packages/core-data/package.json +++ b/packages/core-data/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/core-data", - "version": "6.3.0", + "version": "6.4.0", "description": "Access to and manipulation of core WordPress entities.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/create-block-tutorial-template/CHANGELOG.md b/packages/create-block-tutorial-template/CHANGELOG.md index 4612933dd2363..b12550512d848 100644 --- a/packages/create-block-tutorial-template/CHANGELOG.md +++ b/packages/create-block-tutorial-template/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.15.0 (2023-02-15) + ## 2.14.0 (2023-02-01) ## 2.13.0 (2023-01-11) diff --git a/packages/create-block-tutorial-template/package.json b/packages/create-block-tutorial-template/package.json index 950b3f566426e..0b343a2fc2043 100644 --- a/packages/create-block-tutorial-template/package.json +++ b/packages/create-block-tutorial-template/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/create-block-tutorial-template", - "version": "2.14.0", + "version": "2.15.0", "description": "Template for @wordpress/create-block used in the official WordPress tutorial.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/create-block/CHANGELOG.md b/packages/create-block/CHANGELOG.md index 5f8ebb7dfcf4c..2fdc6f8b703c1 100644 --- a/packages/create-block/CHANGELOG.md +++ b/packages/create-block/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.11.0 (2023-02-15) + ## 4.10.0 (2023-02-01) ## 4.9.0 (2023-01-11) diff --git a/packages/create-block/package.json b/packages/create-block/package.json index acd42d1598585..56da4bec71603 100644 --- a/packages/create-block/package.json +++ b/packages/create-block/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/create-block", - "version": "4.10.0", + "version": "4.11.0", "description": "Generates PHP, JS and CSS code for registering a block for a WordPress plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/custom-templated-path-webpack-plugin/CHANGELOG.md b/packages/custom-templated-path-webpack-plugin/CHANGELOG.md index aae7b687edf7e..4baf5cc031639 100644 --- a/packages/custom-templated-path-webpack-plugin/CHANGELOG.md +++ b/packages/custom-templated-path-webpack-plugin/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.11.0 (2023-02-15) + ## 2.10.0 (2023-02-01) ## 2.9.0 (2023-01-11) diff --git a/packages/custom-templated-path-webpack-plugin/package.json b/packages/custom-templated-path-webpack-plugin/package.json index 848d7f0902f2f..3551401eda52a 100644 --- a/packages/custom-templated-path-webpack-plugin/package.json +++ b/packages/custom-templated-path-webpack-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/custom-templated-path-webpack-plugin", - "version": "2.10.0", + "version": "2.11.0", "description": "Webpack plugin for creating custom path template tags.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/customize-widgets/CHANGELOG.md b/packages/customize-widgets/CHANGELOG.md index 68356dc960bdd..f0548fb33a5f4 100644 --- a/packages/customize-widgets/CHANGELOG.md +++ b/packages/customize-widgets/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.4.0 (2023-02-15) + ## 4.3.0 (2023-02-01) ## 4.2.0 (2023-01-11) diff --git a/packages/customize-widgets/package.json b/packages/customize-widgets/package.json index 0b54cfc01fdbc..f601f60d30eb3 100644 --- a/packages/customize-widgets/package.json +++ b/packages/customize-widgets/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/customize-widgets", - "version": "4.3.0", + "version": "4.4.0", "description": "Widgets blocks in Customizer Module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/data-controls/CHANGELOG.md b/packages/data-controls/CHANGELOG.md index e0b8bc63ec280..123ee33bad4c5 100644 --- a/packages/data-controls/CHANGELOG.md +++ b/packages/data-controls/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.27.0 (2023-02-15) + ## 2.26.0 (2023-02-01) ## 2.25.0 (2023-01-11) diff --git a/packages/data-controls/package.json b/packages/data-controls/package.json index f68c93c6e4aca..c28c407053f38 100644 --- a/packages/data-controls/package.json +++ b/packages/data-controls/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/data-controls", - "version": "2.26.0", + "version": "2.27.0", "description": "A set of common controls for the @wordpress/data api.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/data/CHANGELOG.md b/packages/data/CHANGELOG.md index c97fa92ce8dc7..fe4eaaf65340c 100644 --- a/packages/data/CHANGELOG.md +++ b/packages/data/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 8.4.0 (2023-02-15) + ## 8.3.0 (2023-02-01) ## 8.2.0 (2023-01-11) diff --git a/packages/data/package.json b/packages/data/package.json index e3cc7063b617c..b75e2a8fca091 100644 --- a/packages/data/package.json +++ b/packages/data/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/data", - "version": "8.3.0", + "version": "8.4.0", "description": "Data module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/date/CHANGELOG.md b/packages/date/CHANGELOG.md index d28672547e90a..46e7285c0bddc 100644 --- a/packages/date/CHANGELOG.md +++ b/packages/date/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.27.0 (2023-02-15) + ## 4.26.0 (2023-02-01) ## 4.25.0 (2023-01-11) diff --git a/packages/date/package.json b/packages/date/package.json index 1eea686d9f8c3..6a6dfc5af5fcd 100644 --- a/packages/date/package.json +++ b/packages/date/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/date", - "version": "4.26.0", + "version": "4.27.0", "description": "Date module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dependency-extraction-webpack-plugin/CHANGELOG.md b/packages/dependency-extraction-webpack-plugin/CHANGELOG.md index 88cca047d2b1f..0df3a6d0a4f09 100644 --- a/packages/dependency-extraction-webpack-plugin/CHANGELOG.md +++ b/packages/dependency-extraction-webpack-plugin/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.10.0 (2023-02-15) + ### Bug Fix - The bundled `json2php` dependency has been upgraded from requiring `^0.0.5` to `^0.0.7` ([#47831](https://github.com/WordPress/gutenberg/pull/47831)). diff --git a/packages/dependency-extraction-webpack-plugin/package.json b/packages/dependency-extraction-webpack-plugin/package.json index f61ac5deb3684..d6ace91e05128 100644 --- a/packages/dependency-extraction-webpack-plugin/package.json +++ b/packages/dependency-extraction-webpack-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dependency-extraction-webpack-plugin", - "version": "4.9.0", + "version": "4.10.0", "description": "Extract WordPress script dependencies from webpack bundles.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/deprecated/CHANGELOG.md b/packages/deprecated/CHANGELOG.md index 6e38a348f0eee..a60c919549fd7 100644 --- a/packages/deprecated/CHANGELOG.md +++ b/packages/deprecated/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.27.0 (2023-02-15) + ## 3.26.0 (2023-02-01) ## 3.25.0 (2023-01-11) diff --git a/packages/deprecated/package.json b/packages/deprecated/package.json index bc3dd6cedb872..2fc8cb1103cdc 100644 --- a/packages/deprecated/package.json +++ b/packages/deprecated/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/deprecated", - "version": "3.26.0", + "version": "3.27.0", "description": "Deprecation utility for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/docgen/CHANGELOG.md b/packages/docgen/CHANGELOG.md index 175c112b91644..788c6ec4c382c 100644 --- a/packages/docgen/CHANGELOG.md +++ b/packages/docgen/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 1.36.0 (2023-02-15) + ## 1.35.0 (2023-02-01) ## 1.34.0 (2023-01-11) diff --git a/packages/docgen/package.json b/packages/docgen/package.json index f7d6d80cffeeb..fa0b973fb4203 100644 --- a/packages/docgen/package.json +++ b/packages/docgen/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/docgen", - "version": "1.35.0", + "version": "1.36.0", "description": "Autogenerate public API documentation from exports and JSDoc comments.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dom-ready/CHANGELOG.md b/packages/dom-ready/CHANGELOG.md index 39a5e2c779185..fb3375fd38095 100644 --- a/packages/dom-ready/CHANGELOG.md +++ b/packages/dom-ready/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.27.0 (2023-02-15) + ## 3.26.0 (2023-02-01) ## 3.25.0 (2023-01-11) diff --git a/packages/dom-ready/package.json b/packages/dom-ready/package.json index 3e9692305a67c..f76a3e038aefb 100644 --- a/packages/dom-ready/package.json +++ b/packages/dom-ready/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dom-ready", - "version": "3.26.0", + "version": "3.27.0", "description": "Execute callback after the DOM is loaded.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dom/CHANGELOG.md b/packages/dom/CHANGELOG.md index 5cde31184492f..c5894b74d05fe 100644 --- a/packages/dom/CHANGELOG.md +++ b/packages/dom/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.27.0 (2023-02-15) + ## 3.26.0 (2023-02-01) ## 3.25.0 (2023-01-11) diff --git a/packages/dom/package.json b/packages/dom/package.json index b51f937a92d6a..745ad558ba518 100644 --- a/packages/dom/package.json +++ b/packages/dom/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dom", - "version": "3.26.0", + "version": "3.27.0", "description": "DOM utilities module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-test-utils-playwright/src/request-utils/menus.ts b/packages/e2e-test-utils-playwright/src/request-utils/menus.ts index e5da27e032c79..4058662a4d9ee 100644 --- a/packages/e2e-test-utils-playwright/src/request-utils/menus.ts +++ b/packages/e2e-test-utils-playwright/src/request-utils/menus.ts @@ -16,8 +16,8 @@ export interface NavigationMenu { /** * Create a classic menu * - * @param {string} name Menu name. - * @return {string} Menu content. + * @param name Menu name. + * @return Menu content. */ export async function createClassicMenu( this: RequestUtils, name: string ) { const menuItems = [ @@ -37,20 +37,18 @@ export async function createClassicMenu( this: RequestUtils, name: string ) { }, } ); - if ( menuItems?.length ) { - await this.batchRest( - menuItems.map( ( menuItem ) => ( { - method: 'POST', - path: `/wp/v2/menu-items`, - body: { - menus: menu.id, - object_id: undefined, - ...menuItem, - parent: undefined, - }, - } ) ) - ); - } + await this.batchRest( + menuItems.map( ( menuItem ) => ( { + method: 'POST', + path: `/wp/v2/menu-items`, + body: { + menus: menu.id, + object_id: undefined, + ...menuItem, + parent: undefined, + }, + } ) ) + ); return menu; } @@ -58,7 +56,7 @@ export async function createClassicMenu( this: RequestUtils, name: string ) { /** * Create a navigation menu * - * @param {Object} menuData navigation menu post data. + * @param menuData navigation menu post data. * @return {string} Menu content. */ export async function createNavigationMenu( @@ -84,7 +82,7 @@ export async function deleteAllMenus( this: RequestUtils ) { path: `/wp/v2/navigation/`, } ); - if ( navMenus?.length ) { + if ( navMenus.length ) { await this.batchRest( navMenus.map( ( menu ) => ( { method: 'DELETE', @@ -97,7 +95,7 @@ export async function deleteAllMenus( this: RequestUtils ) { path: `/wp/v2/menus/`, } ); - if ( classicMenus?.length ) { + if ( classicMenus.length ) { await this.batchRest( classicMenus.map( ( menu ) => ( { method: 'DELETE', diff --git a/packages/e2e-test-utils/CHANGELOG.md b/packages/e2e-test-utils/CHANGELOG.md index bf76e65dd74dd..5538d331b059b 100644 --- a/packages/e2e-test-utils/CHANGELOG.md +++ b/packages/e2e-test-utils/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 9.4.0 (2023-02-15) + ## 9.3.0 (2023-02-01) ## 9.2.0 (2023-01-11) diff --git a/packages/e2e-test-utils/package.json b/packages/e2e-test-utils/package.json index c81cab5b25702..74146ffea83a2 100644 --- a/packages/e2e-test-utils/package.json +++ b/packages/e2e-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-test-utils", - "version": "9.3.0", + "version": "9.4.0", "description": "End-To-End (E2E) test utils for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-tests/CHANGELOG.md b/packages/e2e-tests/CHANGELOG.md index 93911a424655e..ddcb10f10413f 100644 --- a/packages/e2e-tests/CHANGELOG.md +++ b/packages/e2e-tests/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.4.0 (2023-02-15) + ## 6.3.0 (2023-02-01) ## 6.2.0 (2023-01-11) diff --git a/packages/e2e-tests/package.json b/packages/e2e-tests/package.json index dcd96047d13a4..e7d53a76d8e19 100644 --- a/packages/e2e-tests/package.json +++ b/packages/e2e-tests/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-tests", - "version": "6.3.0", + "version": "6.4.0", "description": "End-To-End (E2E) tests for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-tests/specs/performance/site-editor.test.js b/packages/e2e-tests/specs/performance/site-editor.test.js index 2e4002bf0bb1c..a14b40d72b01b 100644 --- a/packages/e2e-tests/specs/performance/site-editor.test.js +++ b/packages/e2e-tests/specs/performance/site-editor.test.js @@ -90,7 +90,6 @@ describe( 'Site Editor Performance', () => { await visitSiteEditor( { postId: id, postType: 'page', - path: '/navigation/single', } ); } ); diff --git a/packages/e2e-tests/specs/site-editor/multi-entity-saving.test.js b/packages/e2e-tests/specs/site-editor/multi-entity-saving.test.js index 30b634712119a..fa039fb10fd2e 100644 --- a/packages/e2e-tests/specs/site-editor/multi-entity-saving.test.js +++ b/packages/e2e-tests/specs/site-editor/multi-entity-saving.test.js @@ -265,7 +265,6 @@ describe( 'Multi-entity save flow', () => { await visitSiteEditor( { postId: 'emptytheme//index', postType: 'wp_template', - path: '/templates/single', } ); await enterEditMode(); @@ -305,7 +304,6 @@ describe( 'Multi-entity save flow', () => { await visitSiteEditor( { postId: 'emptytheme//index', postType: 'wp_template', - path: '/templates/single', } ); await enterEditMode(); diff --git a/packages/e2e-tests/specs/site-editor/settings-sidebar.test.js b/packages/e2e-tests/specs/site-editor/settings-sidebar.test.js index c1d4a755a7c57..3428ddd654023 100644 --- a/packages/e2e-tests/specs/site-editor/settings-sidebar.test.js +++ b/packages/e2e-tests/specs/site-editor/settings-sidebar.test.js @@ -69,7 +69,6 @@ describe( 'Settings sidebar', () => { await visitSiteEditor( { postId: 'emptytheme//singular', postType: 'wp_template', - path: '/templates/single', } ); await enterEditMode(); const templateCardAfterNavigation = await getTemplateCard(); diff --git a/packages/edit-post/CHANGELOG.md b/packages/edit-post/CHANGELOG.md index 6eab2fff67655..5a21c72e0cfd5 100644 --- a/packages/edit-post/CHANGELOG.md +++ b/packages/edit-post/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 7.4.0 (2023-02-15) + ## 7.3.0 (2023-02-01) ## 7.2.0 (2023-01-11) diff --git a/packages/edit-post/package.json b/packages/edit-post/package.json index b5045c96bfcf0..30c5bdd88995a 100644 --- a/packages/edit-post/package.json +++ b/packages/edit-post/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/edit-post", - "version": "7.3.0", + "version": "7.4.0", "description": "Edit Post module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/edit-post/src/components/visual-editor/index.js b/packages/edit-post/src/components/visual-editor/index.js index 21760ccfb40dd..263dc8044e3f2 100644 --- a/packages/edit-post/src/components/visual-editor/index.js +++ b/packages/edit-post/src/components/visual-editor/index.js @@ -44,6 +44,8 @@ import { store as coreStore } from '@wordpress/core-data'; */ import { store as editPostStore } from '../../store'; +const isGutenbergPlugin = process.env.IS_GUTENBERG_PLUGIN ? true : false; + function MaybeIframe( { children, contentRef, shouldIframe, styles, style } ) { const ref = useMouseMoveTypingReset(); @@ -339,7 +341,9 @@ export default function VisualEditor( { styles } ) { > { - history.push( { - postId: templatePart.id, - postType: 'wp_template_part', - path: '/template-parts/single', - } ); + history.push( { + postId: templatePart.id, + postType: 'wp_template_part', } ); // TODO: Add a success notice? diff --git a/packages/edit-site/src/components/add-new-template/new-template.js b/packages/edit-site/src/components/add-new-template/new-template.js index 6b41c0625a4ca..fb1a6f1fb9f79 100644 --- a/packages/edit-site/src/components/add-new-template/new-template.js +++ b/packages/edit-site/src/components/add-new-template/new-template.js @@ -128,12 +128,9 @@ export default function NewTemplate( { setCanvasMode( 'edit' ); // Navigate to the created template editor. - window.queueMicrotask( () => { - history.push( { - postId: newTemplate.id, - postType: newTemplate.type, - path: '/templates/single', - } ); + history.push( { + postId: newTemplate.id, + postType: newTemplate.type, } ); createSuccessNotice( diff --git a/packages/edit-site/src/components/global-styles/ui.js b/packages/edit-site/src/components/global-styles/ui.js index 5372ce9e5fbd5..13c1d0f2067a1 100644 --- a/packages/edit-site/src/components/global-styles/ui.js +++ b/packages/edit-site/src/components/global-styles/ui.js @@ -68,7 +68,7 @@ function GlobalStylesActionMenu() { - + + { __( 'Styles' ) }