Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ServerSideRender: add new skipBlockSupportAttributes prop #44491

Merged
merged 25 commits into from
Oct 7, 2022
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3b35e88
ServerSideRender: add new `skipBlockSupportAttributes` prop
t-hamano Sep 27, 2022
2b6ec9a
Update readme
t-hamano Sep 27, 2022
43fde25
update changelog
t-hamano Sep 27, 2022
59a6178
add unit test
t-hamano Sep 27, 2022
b70814f
Fix typo
t-hamano Sep 27, 2022
8791cc3
Don't remove attributes and styles which serialization is omitted
t-hamano Oct 2, 2022
05ab652
Merge branch 'trunk' into enhancement/server-side-render-global-styles
t-hamano Oct 2, 2022
a42b10e
Update unit tests
t-hamano Oct 2, 2022
f1b0670
Update readme
t-hamano Oct 2, 2022
04f3af0
Don't remove custom style
t-hamano Oct 2, 2022
abf2d7e
Support color.link and update tests
t-hamano Oct 2, 2022
e027d44
Update function docs
t-hamano Oct 2, 2022
d9600d6
Revert "Update function docs"
t-hamano Oct 5, 2022
1a7fd7c
Revert "Support color.link and update tests"
t-hamano Oct 5, 2022
43910b2
Revert "Don't remove custom style"
t-hamano Oct 5, 2022
5d811c8
Revert "Update readme"
t-hamano Oct 5, 2022
bd1ff1e
Revert "Update unit tests"
t-hamano Oct 5, 2022
aa507a1
Revert "Don't remove attributes and styles which serialization is omi…
t-hamano Oct 5, 2022
452c11d
Merge branch 'trunk' into enhancement/server-side-render-global-styles
t-hamano Oct 5, 2022
7b02d8d
Don't pass className
t-hamano Oct 5, 2022
4be4688
Update unit test
t-hamano Oct 5, 2022
ce8937a
Update readme
t-hamano Oct 7, 2022
d58e60c
Update readme
t-hamano Oct 7, 2022
60e711d
Fix conflicts
t-hamano Oct 7, 2022
0de5c1f
Revert unexpected changes
t-hamano Oct 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "Don't remove custom style"
This reverts commit 04f3af0.
  • Loading branch information
t-hamano committed Oct 5, 2022
commit 43910b23d86ed2638b4bd070747536e73275fd2d
5 changes: 0 additions & 5 deletions packages/server-side-render/src/test/index.js
Original file line number Diff line number Diff line change
@@ -103,7 +103,6 @@ describe( 'skipBlockSupportAttributes', () => {
fontFamily: 'system-font',
borderColor: 'foreground',
style: {
customStyle: 'custom-style',
color: {
text: '#000000',
background: '#000000',
@@ -195,9 +194,6 @@ describe( 'skipBlockSupportAttributes', () => {
removeBlockSupportAttributes( 'core/test-block', attributes )
).toEqual( {
customAttribute: 'custom-attribute',
style: {
customStyle: 'custom-style',
},
} );
} );

@@ -251,7 +247,6 @@ describe( 'skipBlockSupportAttributes', () => {
gradient: 'vivid-cyan-blue-to-vivid-purple',
fontSize: 'small',
style: {
customStyle: 'custom-style',
color: {
text: '#000000',
},
5 changes: 1 addition & 4 deletions packages/server-side-render/src/utils.js
Original file line number Diff line number Diff line change
@@ -126,10 +126,7 @@ export function removeBlockSupportAttributes( block, attributes ) {
return cleanEmptyObject( {
...restAttributes,
...newAttributes,
style: {
...style,
...newStyle,
},
style: newStyle,
} );
}