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

[Gutenberg] Add amp-mathml block #1165

Merged
merged 29 commits into from
May 23, 2018
Merged

Conversation

miina
Copy link
Contributor

@miina miina commented May 22, 2018

Adds Gutenberg block for amp-mathml width input for formula and toggle for displaying inline.

screen shot 2018-05-22 at 8 38 24 pm

@miina
Copy link
Contributor Author

miina commented May 22, 2018

@westonruter Currently the block is not displaying the converted formula within editor, do you think that's OK for the first iteration, or should we try to implement displaying the converted formula in editor, too?

@westonruter
Copy link
Member

Currently the block is not displaying the converted formula within editor, do you think that's OK for the first iteration, or should we try to implement displaying the converted formula in editor, too?

Yes, this is OK for the first iteration. Once AMP can be embedded inside of React components, then we can hook up amp-mathml proper in the preview.

),
<PlainText
key='formula'
tagName='div'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting a warning here:

Warning: React does not recognize the tagName prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase tagname instead. If you accidentally passed it from a parent component, remove it from the DOM element.

…Gutenberg

Remove amp-runtime from being enqueued
<InspectorControls key='inspector'>
<PanelBody title={ __( 'AMP MathML Settings' ) }>
<ToggleControl
label={ __( 'Display inline' ) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While amp-mathml has an inline option, it doesn't really work in the context of Gutenberg blocks which really stay mostly in the domain of block contexts. So I think this inline option should be removed until we can figure out how better to handle inline blocks in Gutenberg. I think that the work being explored with Inline Images will make this possible: WordPress/gutenberg#2043

@westonruter westonruter changed the title [WIP] [Gutenberg] Add amp-mathml block [Gutenberg] Add amp-mathml block May 23, 2018
@westonruter westonruter added this to the v1.0 milestone May 23, 2018
@westonruter westonruter merged commit 2435b18 into develop May 23, 2018
@westonruter westonruter deleted the add/amp-mathml_component branch May 23, 2018 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants