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

Try: Use amp-mathml and amp-fit-text components in Gutenberg block edit function's React components #1342

Closed
wants to merge 2 commits into from

Conversation

westonruter
Copy link
Member

@westonruter westonruter commented Aug 16, 2018

In order to be able to create content using AMP components, it is important that the AMP components be able to be rendered in the editing context. For the next generation editor of WordPress, Gutenberg, this means being able to use AMP components inside of React components, and that changes to the AMP components' attributes will cause the shadow DOM to dynamically update as expected.

This does work as expected amp-mathml component:

maxresdefault

This may be because it doesn't have much shadow DOM to speak of, other than a single iframe child.

However, using the amp-fit-text component in React does not work as expected:

maxresdefault (1)

Note that even though the amp-fit-text component's height, min-font-size, and max-font-size attributes are being modified, the changes to them are not getting applied to the shadow DOM.

@swissspidy
Copy link
Collaborator

Quick note: we built our own amp-fit-text implementation for the AMP Stories editor. Maybe we could re-use that here as well?

@swissspidy swissspidy added the Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Oct 3, 2019
@swissspidy
Copy link
Collaborator

Created a new #3434 issue for amp-fit-text support in the editor.

@schlessera schlessera deleted the try/amp-in-react-components branch November 6, 2020 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integration: Gutenberg Stale Gives the original author opportunity to update before closing. Can be reopened as needed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants