Skip to content

Commit

Permalink
Consistent default typography controls across blocks (#55208)
Browse files Browse the repository at this point in the history
* remove default controls for heading

* Standardize default controls for other content blocks

* Update e2e tests

---------

Co-authored-by: George Mamadashvili <[email protected]>
  • Loading branch information
richtabor and Mamaduka authored Dec 1, 2023
1 parent c2dfa29 commit 4d1d4f8
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 20 deletions.
4 changes: 1 addition & 3 deletions packages/block-library/src/heading/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@
"__experimentalTextDecoration": true,
"__experimentalWritingMode": true,
"__experimentalDefaultControls": {
"fontSize": true,
"fontAppearance": true,
"textTransform": true
"fontSize": true
}
},
"__unstablePasteTextInline": true,
Expand Down
4 changes: 1 addition & 3 deletions packages/block-library/src/post-title/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true,
"fontAppearance": true,
"textTransform": true
"fontSize": true
}
}
},
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/pullquote/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true,
"fontAppearance": true
"fontSize": true
}
},
"__experimentalBorder": {
Expand Down
4 changes: 1 addition & 3 deletions packages/block-library/src/query-title/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalDefaultControls": {
"fontSize": true,
"fontAppearance": true,
"textTransform": true
"fontSize": true
}
}
},
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/quote/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true,
"fontAppearance": true
"fontSize": true
}
},
"color": {
Expand Down
6 changes: 1 addition & 5 deletions packages/block-library/src/site-title/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@
"__experimentalFontWeight": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true,
"lineHeight": true,
"fontAppearance": true,
"letterSpacing": true,
"textTransform": true
"fontSize": true
}
}
},
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/verse/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalDefaultControls": {
"fontSize": true,
"fontAppearance": true
"fontSize": true
}
},
"spacing": {
Expand Down
10 changes: 10 additions & 0 deletions test/e2e/specs/site-editor/push-to-global-styles.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ test.describe( 'Push to Global Styles button', () => {
} )
).toBeDisabled();

// Enable letter case.
const typographyOptions = page.getByRole( 'button', {
name: 'Typography options',
} );
await typographyOptions.click();
await page
.getByRole( 'menuitemcheckbox', { name: 'Letter case' } )
.click();
await typographyOptions.click();

// Make the Heading block uppercase
await page.getByRole( 'button', { name: 'Uppercase' } ).click();

Expand Down

0 comments on commit 4d1d4f8

Please sign in to comment.