-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Duotone: Pass filters to the Post Editor #49239
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
Changes from all commits
a98c60b
32355ba
7810e0a
0e6304e
690cca4
5a99e30
8f9541e
2b8484b
6a19107
6e0d5c0
44e46c8
0b4dfe7
9f84812
57471f9
05121a2
20a6fde
9b4e96c
4fb10d4
5fe3835
32f2147
3688db6
f426d62
0dabaf4
6bc19a9
a0be2bf
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 |
|---|---|---|
|
|
@@ -67,12 +67,12 @@ function MaybeIframe( { children, contentRef, shouldIframe, styles, style } ) { | |
|
|
||
| return ( | ||
| <Iframe | ||
| head={ <EditorStyles styles={ styles } /> } | ||
ajlende marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ref={ ref } | ||
| contentRef={ contentRef } | ||
| style={ { width: '100%', height: '100%', display: 'block' } } | ||
| name="editor-canvas" | ||
| > | ||
| <EditorStyles styles={ styles } /> | ||
|
Member
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. Why are we adding non styles to Also what if we move this to the iframe component in the block-editor package? Wouldn't it then work automatically in all editors and allow us to remove a bunch of duplication?
Contributor
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. That was my suggestion and for me these SVG filters are styles. They're just not "CSS styles". Basically if you check the code base, in all the places we use The move to body is necessary because the filters can't be inserted into head in HTML. I suggest that we could potentially use ownerDocument to solve that.
Member
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. Yes, you could use a portal. Maybe we should build
Contributor
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.
@ellatrix Is it okay if that's handled in a follow-up? Or do you think it's important for this PR?
Contributor
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.
I tried doing this, but it causes a flash of unstyled content while React is grabbing the ref to use for the portal. Is there any reason we can't have the
Contributor
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.
|
||
| { children } | ||
| </Iframe> | ||
| ); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.