Commit Graph

27 Commits

Author SHA1 Message Date
Bernhard Reiter
a63a6ae7ee General: Add $schema property to block and theme JSON files.
Additionally, this changeset fixes some of the `block.json` and `theme.json` files in PHPUnit tests by adding missing `title` properties to satisfy the schema. Those changes have no impact on the runtime whatsoever and do not change the result of unit tests.

Note that some block and theme JSON files still aren't valid according to the schema. Fixing is underway; the required changes will be merged subsequently.

Props jonsurrell, dmsnell, gziolo.
Fixes #60255.
Built from https://develop.svn.wordpress.org/trunk@57336


git-svn-id: http://core.svn.wordpress.org/trunk@56842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-23 13:07:16 +00:00
isabel_brison
2f5d2da8f8 Editor: add lightbox setting.
Adds lightbox as a valid setting to `WP_Theme_JSON` class and as an image block setting in theme.json.

Props czapla, costdev, desrosj.
Fixes #59393.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-09-21 06:35:20 +00:00
isabel_brison
df3137aca1 Editor: add text orientation for blocks with typography support.
Adds a new text orientation option to the typography block support, implemented with CSS writing-mode.

Props poena.
Fixes #59306.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-09-18 06:49:20 +00:00
isabel_brison
2e2aea02c2 Editor: stabilise layout and refactor definitions.
Marks the layout support stable and moves layout definitions from `theme.json` into `wp-includes/block-supports/layout.php`.

Props andrewserong, poena, ramonopoly, peterwilsoncc.
Fixes #58550.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-27 07:25:22 +00:00
isabel_brison
2fbd7aeb8f Editor: add support for block-level link hover colors.
Adds the ability to set link hover colors for individual blocks from the block inspector color panel.

Props @youknowriad, @peterwilsoncc, @kebbet.
Fixes #58575.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-26 01:15:21 +00:00
isabel_brison
cf320a85d3 Editor: add grid layout type
Add a new `grid` type to the layout block support.

Props andrewserong, costdev, ramonopoly.
Fixes #58554.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-22 04:06:26 +00:00
isabel_brison
06beef84d5 Editor: revert add grid layout type
Reverting the previous commit because it causes e2e to fail on trunk.

See #58554.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-21 06:58:18 +00:00
isabel_brison
03f5a6e91d Editor: add grid layout type
Add a new `grid` type to the layout block support.

Props andrewserong, costdev, ramonopoly.
Fixes #58554.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-21 05:56:21 +00:00
isabel_brison
49aa42f3b6 Editor: update layout classnames and specificity.
Adds a compound layout classname and reduces layout spacing rule specificity.

Props ramonopoly, andrewserong, poena.
Fixes #58548.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-21 05:32:19 +00:00
hellofromTonya
93dfe28aaf Themes: Add 3 and update 2 shadow presets in theme.json.
Adds Deep, Outlined, and Crisp default shadow presets to Core's `theme.json` file.

Updates the Natural and Sharp `'shadow'` styles.

These shadow presets are used to populate the Shadow tools in the Site Editor's Global Styles UI.

References:
* [https://github.com/WordPress/gutenberg/pull/46502 Gutenberg PR 46502]

Follow-up to [55176].

Props franz00, madhudollu, ajlende, beafialho, costdev, dhrupo, fabiankaegy, hellofromTonya, jameskoster, joen, kellychoffman, mamaduka, mtias, oandregal, priethor, richtabor, scruffian. 
Fixes #57708.
See #57559.
Built from https://develop.svn.wordpress.org/trunk@55405


git-svn-id: http://core.svn.wordpress.org/trunk@54938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-22 16:00:21 +00:00
hellofromTonya
263ef5505d Themes: Add shadow presets support for theme.json.
Adds shadow presets support for `theme.json` within the `WP_Theme_JSON` by 

* Adding it to presets metadata and valid settings.
* Defining the default shadow presets in Core's `theme.json`.

Includes PHPUnit tests. 

References:
* [https://github.com/WordPress/gutenberg/pull/46813 Gutenberg PR 46813]
* [https://github.com/WordPress/gutenberg/pull/47272 Gutenberg PR 47272]

Follow-up to [54162], [52049], [50973].

Props madhudollu, mamaduka, oandregal, scruffian, hellofromTonya.
Fixes #57559.
Built from https://develop.svn.wordpress.org/trunk@55176


git-svn-id: http://core.svn.wordpress.org/trunk@54709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-01 18:07:12 +00:00
hellofromTonya
bfcd054304 Editor: Backport foundation for Layout block support refactor (part 1).
Backports the following changes from the Gutenberg repository:

* [WordPress/gutenberg/40875 gutenberg/40875] Layout: Use semantic classnames, centralize layout definitions, reduce duplication, and fix blockGap in theme.json
* [WordPress/gutenberg/42544 gutenberg/42544] Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles gutenberg/42544
* [WordPress/gutenberg/42087 gutenberg/42087] Theme.json: Add block support feature level selectors for blocks gutenberg/42087
* [WordPress/gutenberg/43792 gutenberg/43792] Global Styles: Split root layout rules into a different function gutenberg/43792
* [WordPress/gutenberg/42544 gutenberg/42544] Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles gutenberg/42544
* [WordPress/gutenberg/42665 gutenberg/42665] Layout: Reduce specificity of fallback blockGap styles gutenberg/42665
* [WordPress/gutenberg/42085 gutenberg/42085] Core CSS support for root padding and alignfull blocks gutenberg/42085

Notes:
* It doesn't entirely port over PR 40875 — the remaining PHP changes for that PR will be explored in a separate PR targeting `layout.php`.
* [54159] was reverted in [54160] due to PHPUnit test failures for tests added by the commit. Later, tests passed when applied on top of `trunk`. There were various outages today of upstream `wp-env` dependencies, which likely were the root cause of the earlier failures. For historical tracking and to make sure, recommitting [54159] but instead on top of current `trunk`. See PR 3205 for more details.
* Giving additional props for those who did a deep dive investigation into the failed tests.

Follow-up to [54160], [54159].

Props andrewserong, aaronrobertshaw, isabel_brison, bernhard-reiter, hellofromTonya.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54162


git-svn-id: http://core.svn.wordpress.org/trunk@53721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 18:44:09 +00:00
hellofromTonya
d5c8952218 Editor: Revert [54159].
Reverting changeset due to failing PHPUnit tests. Tests pass without changeset [54156], but fail with it. Reverting to explore why in the original PR after rebasing.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 15:52:11 +00:00
audrasjb
c2ff10f1c1 Editor: Backport foundation for Layout block support refactor (part 1).
This change backports the following changes from Gutenberg repository:

- [WordPress/gutenberg#40875 gutenberg#40875] Layout: Use semantic classnames, centralize layout definitions, reduce duplication, and fix blockGap in theme.json
- [WordPress/gutenberg#42544 gutenberg#42544] Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles gutenberg#42544
- [WordPress/gutenberg#42087 gutenberg#42087] Theme.json: Add block support feature level selectors for blocks gutenberg#42087
- [WordPress/gutenberg#43792 gutenberg#43792] Global Styles: Split root layout rules into a different function gutenberg#43792
- [WordPress/gutenberg#42544 gutenberg#42544] Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles gutenberg#42544
- [WordPress/gutenberg#42665 gutenberg#42665] Layout: Reduce specificity of fallback blockGap styles gutenberg#42665
- [WordPress/gutenberg#42085 gutenberg#42085] Core CSS support for root padding and alignfull blocks gutenberg#42085

Note that it doesn't entirely port over PR40875 — the remaining PHP changes for that PR will be explored in a separate PR targeting `layout.php`.

Props andrewserong, aaronrobertshaw, isabel_brison.
See #56467.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 14:21:22 +00:00
audrasjb
4557cd683b Administration: Revert unwanted spaces found in theme.json after [53131].
Follow-up to [53131].

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


git-svn-id: http://core.svn.wordpress.org/trunk@52723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 11:55:00 +00:00
audrasjb
44d52e04a1 Administration: Revert accidental changes made to theme.json in changeset [53131].
Follow-up to [53131].

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


git-svn-id: http://core.svn.wordpress.org/trunk@52722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 11:53:00 +00:00
audrasjb
12fc2d9146 Administration: Remove self-reference ("we") in WordPress Admin.
This changes updates many strings to remove self-references to an undefined "we" collective across the WordPress Administration.

The goal of this change is to better match the guidelines and recommendations set forth in the make/core handbook, specifically:

> the word "we" should be avoided (…) unless its made very clear which group is speaking.

Props johnbillion, shital-patel, audrasjb, marybaum, SergeyBiryukov, peterwilsoncc, johnjamesjacoby, kebbet, costdev, chaion07, davidbaumwald.
Fixes #46057.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 11:42:04 +00:00
gziolo
c6ad5a6945 Editor: Add missing defaultDutone changes
Follow-up for [53129].

This PR backports the remaining `defaultDuotone` option changes added in the Gutenberg plugin. Related PRs: https://github.com/WordPress/gutenberg/pull/38681 and https://github.com/WordPress/gutenberg/pull/39966.

Props oandregal, ajlende.
See #55505.
 


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


git-svn-id: http://core.svn.wordpress.org/trunk@52719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 11:01:00 +00:00
isabel_brison
4939393799 Update @wordpress packages for Beta 4
Update packages with these bug fixes from Gutenberg:

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

Props hellofromtonya.
See #54487.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-21 07:02:34 +00:00
noisysocks
e4b553a201 Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

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

See #54487.
Props talldanwp, mamaduka, oandregal.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 00:24:27 +00:00
jorgefilipecosta
065c639a2a Update theme.json classes for WordPress 5.9.
This commit ports to core the changes to the classes that deal with theme.json code.

See #54336.
Props oandregal, spacedmonkey, noisysocks, hellofromtonya, youknowriad.
Built from https://develop.svn.wordpress.org/trunk@52049


git-svn-id: http://core.svn.wordpress.org/trunk@51641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 19:19:58 +00:00
jorgefilipecosta
eff1c81de6 Block Editor: Add missing border setting on button block.
This commit fixes a regression on WordPress 5.8 that made the border radius setting on the buttons block disappear.

Props Mamaduka, daisyo, priethor, desrosj, mikeschroder.
Fixes #53702.
Built from https://develop.svn.wordpress.org/trunk@51538


git-svn-id: http://core.svn.wordpress.org/trunk@51149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-08-03 18:14:58 +00:00
youknowriad
e76d4e1bcd Block Editor: Backport fixes targetted for WordPress 5.8 RC4.
This includes:

 - Suggestion List: Check if a node exists to scroll into view.
 - Autocomplete: reset state for empty text.
 - Adds auxiliary class names for editor styles in the widgets editor.
 - Extract snackbars into a separate component.
 - Rich text: run input rules after composition end.
 - iframe: load inline styles.
 - Multi select: select all: restore ref callback.
 - Writing flow: allow select all from empty selection.
 - Post Excerpt: Fix excerpt_more filter conflict and remove wordCount attribute.
 - Add the percent unit to the default units in Core.

Props desrosj.
See #53397.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-15 18:55:29 +00:00
youknowriad
e270f4f0f3 Block Editor: Include the fixes targetted for WordPress 5.8 RC3.
This includes the following fixes:
 - Safari: see if compositing layer size is more reasonable when position fixed divs are not inserted into content.
 - Site Logo Block: update Site Logo block UI and option syncing.
 - Fix moving inner blocks in the Widgets Customizer.
 - Allow themes to provide empty values for color.duotone and spacing.units
 - Update getTermsInfo() to workaround parsing issue for translatable strings.
 - Specify what settings can be part of settings.layout.
 - Update conditions to hide duotone panel.
 - Prevent entering invalid values in the Query Loop block config.
 - Prevent color panel from showing as empty.
 - Avoid calling gutenberg_ functions within code shipped through WordPress Core.

Props desrosj.
See #53397.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 16:41:28 +00:00
youknowriad
c114304471 Block Editor: Update the WordPress packages with the fixes for 5.8 beta 2.
This includes:

**Various**

 - Fix multi selection for nested blocks https://github.com/WordPress/gutenberg/pull/32536
 - Consistently show the drop indicator while dragging blocks https://github.com/WordPress/gutenberg/pull/31896
 - Fix horizontal drop indicator https://github.com/WordPress/gutenberg/pull/32589
 - Fix Safari flickering issue https://github.com/WordPress/gutenberg/pull/32581
 - Silence useSelect zombie bug errors https://github.com/WordPress/gutenberg/pull/32088

**Template Editor**

 - Clarify the template creation modal https://github.com/WordPress/gutenberg/pull/32427
 - Only add skip links for block templates https://github.com/WordPress/gutenberg/pull/32451

**Widgets Editor**

 - Add block breadcrumb https://github.com/WordPress/gutenberg/pull/32498 https://github.com/WordPress/gutenberg/pull/32528 https://github.com/WordPress/gutenberg/pull/32569
 - Saved deleted and restored widgets. https://github.com/WordPress/gutenberg/pull/32534
 - Fix unsaved changes detection https://github.com/WordPress/gutenberg/pull/32573
 - Fix button spacing in the header https://github.com/WordPress/gutenberg/pull/32585
 - Avoid extra undo levels https://github.com/WordPress/gutenberg/pull/32572
 - Move Legacy Widget block to the `@wordpress/widgets` package https://github.com/WordPress/gutenberg/pull/32501
 - Fix Social Links color inheritance https://github.com/WordPress/gutenberg/pull/32625
 - Use Button appender https://github.com/WordPress/gutenberg/pull/32580

**Global Styles (theme.json)**
 
 - Separate the presets per origin in the block editor settings https://github.com/WordPress/gutenberg/pull/32358 https://github.com/WordPress/gutenberg/pull/32622
 - Use CSS Custom Properties for the preset styles https://github.com/WordPress/gutenberg/pull/32627

**Performance**

 - Remove is-typing classname to improve typing performance https://github.com/WordPress/gutenberg/pull/32567

Props nosolosw, jorgefilipecosta, aristath, ntsekouras, peterwilsoncc, mcsf.
See #53397.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 08:52:30 +00:00
jorgefilipecosta
9b67649f40 Block Editor: Update color merging algorithm.
The npm packages in use were published a few hours ago, which include some changes to how we manage colors. This commit adds the corresponding PHP changes.

Props nosolosw.
See #53175.
Built from https://develop.svn.wordpress.org/trunk@50977


git-svn-id: http://core.svn.wordpress.org/trunk@50586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 18:57:55 +00:00
youknowriad
4e1dc7a28c Block Editor: Add Global Settings support using theme.json file.
This is the first piece of landing the theme.json processing in WordPress core. 
It allows themes to configure the different editor settings, allow cusomizations and define presets in theme.json file.
 
Props jorgefilipecosta, nosolosw.
See #53175.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 08:37:55 +00:00