-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix duotone rendering in site editor #37727
Changes from all commits
2012290
01de5c3
bfb1e11
b692976
c6d4113
3e07d40
3a576b1
c683e0d
6df1f72
e3679e1
914f961
8dc561e
3dda274
0ca4ed7
498fbe7
7a03f72
6b568ed
91a77e7
fc571fa
8e99d6f
57a8d43
ae3e332
d75b3a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,6 +104,10 @@ export const __EXPERIMENTAL_STYLE_PROPERTY = { | |
support: [ 'color', 'text' ], | ||
requiresOptOut: true, | ||
}, | ||
filter: { | ||
value: [ 'filter', 'duotone' ], | ||
support: [ 'color', '__experimentalDuotone' ], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't really need declare There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is actually the cause of the block instance issue #37727 (comment). It's adding the filter to the block container which we don't want. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we remove the I've checked the plugin with the following versions:
Why does it work in 5.9 and onwards? It seems we enqueue some extra stylesheet starting in 5.9. I don't know why or when we've introduced this, but we shouldn't rely on it in the site editor, as it's redundant and it should be removed. Can we make the duotone rendering in the site editor work? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #40185 is related although probably don't fully solve the issue (need to test more) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 40185 has landed and fixes this for 5.9. In 6.0 we need to get WordPress/wordpress-develop#2542 in for the extra global stylesheet not being enqueued. |
||
}, | ||
linkColor: { | ||
value: [ 'elements', 'link', 'color', 'text' ], | ||
support: [ 'color', 'link' ], | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand we need this for the block-instance duotone. Though, in the site editor, we'll be adding the SVG when we already have it, don't we? This is all the ways we add SVGs in the site editor:
in_admin_header
hook (see). These aren't in the scope of the iframed editor. So perhaps we can add there a check for not loading them if we're in the site editor?svgFilters
).I don't think this is a blocker given the time-sensitive situation we're in. Thought I'd think it merits a follow-up PR to organize it a bit.