Make WordPress Core


Ignore:
Timestamp:
09/14/2022 06:42:04 PM (20 months ago)
Author:
hellofromTonya
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/blocks/editor.php

    r54160 r54162  
    203203        $settings = get_default_block_editor_settings();
    204204
    205         $this->assertCount( 18, $settings );
     205        $this->assertCount( 19, $settings );
    206206        $this->assertFalse( $settings['alignWide'] );
    207207        $this->assertIsArray( $settings['allowedMimeTypes'] );
     
    250250        $this->assertFalse( $settings['disableCustomFontSizes'] );
    251251        $this->assertFalse( $settings['disableCustomGradients'] );
     252        $this->assertFalse( $settings['disableLayoutStyles'] );
    252253        $this->assertFalse( $settings['enableCustomLineHeight'] );
    253254        $this->assertFalse( $settings['enableCustomSpacing'] );
Note: See TracChangeset for help on using the changeset viewer.