-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Heading Block] Fix double alignment controls in toolbar (#26492)
* fix heading alignments * add proper supports in deprecation * update all previous deprecations * regenerate fixtures for heading * change migration call * remove previous className + revert saves * Revert "regenerate fixtures for heading" This reverts commit 27af8c3. * change fixtures * create new fixtures + fix deprecation save * address review feedback
- Loading branch information
1 parent
5060734
commit 467175e
Showing
14 changed files
with
156 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/e2e-tests/fixtures/blocks/core__heading__deprecated-1.serialized.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<!-- wp:heading {"align":"right","level":3} --> | ||
<!-- wp:heading {"textAlign":"right","level":3} --> | ||
<h3 class="has-text-align-right">A picture is worth a thousand words, or so the saying goes</h3> | ||
<!-- /wp:heading --> |
4 changes: 4 additions & 0 deletions
4
packages/e2e-tests/fixtures/blocks/core__heading__deprecated-4.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<!-- wp:heading {"textColor":"accent","align":"center"} --> | ||
<h2 class="has-accent-color has-text-color has-text-align-center">Text</h2> | ||
<!-- /wp:heading --> | ||
|
15 changes: 15 additions & 0 deletions
15
packages/e2e-tests/fixtures/blocks/core__heading__deprecated-4.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[ | ||
{ | ||
"clientId": "_clientId_0", | ||
"name": "core/heading", | ||
"isValid": true, | ||
"attributes": { | ||
"content": "Text", | ||
"level": 2, | ||
"textColor": "accent", | ||
"textAlign": "center" | ||
}, | ||
"innerBlocks": [], | ||
"originalContent": "<h2 class=\"has-accent-color has-text-color has-text-align-center\">Text</h2>" | ||
} | ||
] |
23 changes: 23 additions & 0 deletions
23
packages/e2e-tests/fixtures/blocks/core__heading__deprecated-4.parsed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[ | ||
{ | ||
"blockName": "core/heading", | ||
"attrs": { | ||
"textColor": "accent", | ||
"align": "center" | ||
}, | ||
"innerBlocks": [], | ||
"innerHTML": "\n<h2 class=\"has-accent-color has-text-color has-text-align-center\">Text</h2>\n", | ||
"innerContent": [ | ||
"\n<h2 class=\"has-accent-color has-text-color has-text-align-center\">Text</h2>\n" | ||
] | ||
}, | ||
{ | ||
"blockName": null, | ||
"attrs": {}, | ||
"innerBlocks": [], | ||
"innerHTML": "\n\n", | ||
"innerContent": [ | ||
"\n\n" | ||
] | ||
} | ||
] |
3 changes: 3 additions & 0 deletions
3
packages/e2e-tests/fixtures/blocks/core__heading__deprecated-4.serialized.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<!-- wp:heading {"textAlign":"center","textColor":"accent"} --> | ||
<h2 class="has-text-align-center has-accent-color has-text-color">Text</h2> | ||
<!-- /wp:heading --> |
3 changes: 3 additions & 0 deletions
3
packages/e2e-tests/fixtures/blocks/core__heading_align-textalign.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<!-- wp:heading {"textAlign":"center","align":"wide"} --> | ||
<h2 class="alignwide has-text-align-center">Text</h2> | ||
<!-- /wp:heading --> |
15 changes: 15 additions & 0 deletions
15
packages/e2e-tests/fixtures/blocks/core__heading_align-textalign.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[ | ||
{ | ||
"clientId": "_clientId_0", | ||
"name": "core/heading", | ||
"isValid": true, | ||
"attributes": { | ||
"textAlign": "center", | ||
"content": "Text", | ||
"level": 2, | ||
"align": "wide" | ||
}, | ||
"innerBlocks": [], | ||
"originalContent": "<h2 class=\"alignwide has-text-align-center\">Text</h2>" | ||
} | ||
] |
23 changes: 23 additions & 0 deletions
23
packages/e2e-tests/fixtures/blocks/core__heading_align-textalign.parsed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[ | ||
{ | ||
"blockName": "core/heading", | ||
"attrs": { | ||
"textAlign": "center", | ||
"align": "wide" | ||
}, | ||
"innerBlocks": [], | ||
"innerHTML": "\n<h2 class=\"alignwide has-text-align-center\">Text</h2>\n", | ||
"innerContent": [ | ||
"\n<h2 class=\"alignwide has-text-align-center\">Text</h2>\n" | ||
] | ||
}, | ||
{ | ||
"blockName": null, | ||
"attrs": {}, | ||
"innerBlocks": [], | ||
"innerHTML": "\n", | ||
"innerContent": [ | ||
"\n" | ||
] | ||
} | ||
] |
3 changes: 3 additions & 0 deletions
3
packages/e2e-tests/fixtures/blocks/core__heading_align-textalign.serialized.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<!-- wp:heading {"textAlign":"center","align":"wide"} --> | ||
<h2 class="alignwide has-text-align-center">Text</h2> | ||
<!-- /wp:heading --> |