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

[AMP Stories] Text Block #1893

Merged
merged 11 commits into from
Feb 28, 2019
Merged

Conversation

swissspidy
Copy link
Collaborator

@swissspidy swissspidy commented Feb 21, 2019

Work in progress

Smart text block that replaces/combines the paragraph and heading blocks.

See #1883.

@googlebot googlebot added the cla: yes Signed the Google CLA label Feb 21, 2019
blocks/amp-story/text/edit.js Outdated Show resolved Hide resolved
blocks/amp-story/text/edit.js Outdated Show resolved Hide resolved
@swissspidy swissspidy changed the title AMP Stories: Text Block [AMP Stories] Text Block Feb 22, 2019
assets/src/blocks/amp-story-text/index.js Show resolved Hide resolved
assets/src/blocks/amp-story-text/index.js Outdated Show resolved Hide resolved
assets/src/blocks/amp-story-text/index.js Outdated Show resolved Hide resolved
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no Has not signed the Google CLA and removed cla: yes Signed the Google CLA labels Feb 26, 2019
@swissspidy
Copy link
Collaborator Author

^ eb61fc6 contains my personal email address as a co-author, hence the googlebot warning. Should be all good now.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes Signed the Google CLA and removed cla: no Has not signed the Google CLA labels Feb 26, 2019
Copy link
Contributor

@miina miina left a comment

Choose a reason for hiding this comment

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

A few notes from testing the block -- let me know if these are not happening for you:

  • When adding an animation while having more than one Text block, sometimes the following error occurred:
    TypeError: Cannot read property 'replace' of undefined at eval (webpack-internal:///./assets/src/components/animation-controls.js:50:45)
    Another error occurred while trying to use the "Begin After" setting.
  • Adding animation doesn't seem to get saved (choose animation settings => save => refresh) and causes block validation errors;
  • At this moment when clicking "Return" in the Text block adds a break (br) instead of creating a new block -- is this intended?

Let me know if it works as expected for you or if perhaps some animation parts are not intended to work at this moment (tested on WP 5.1).

@miina
Copy link
Contributor

miina commented Feb 26, 2019

^ One more finding in addition to these: choosing the font family doesn't seem to be reflected in the editor at this moment.

@swissspidy
Copy link
Collaborator Author

When adding an animation while having more than one Text block, sometimes the following error occurred
Adding animation doesn't seem to get saved

Noticed that too today while working on animations. Probably a leftover from when I introduced some foundation for animation ordering in #1896. Already being addressed in #1904.

At this moment when clicking "Return" in the Text block adds a break (br) instead of creating a new block -- is this intended?

I've intentionally left out key handling like this at the moment. With #1897 in mind it felt a bit odd. I think we can add it in a separate PR later if needed.

Choosing the font family doesn't seem to be reflected in the editor at this moment.

Hmm would have to test this. At first glance I can't see why this particular PR would have broken this. But font selection is undergoing quite some changes in #1885 anyway.

@miina
Copy link
Contributor

miina commented Feb 27, 2019

Hmm would have to test this. At first glance I can't see why this particular PR would have broken this. But font selection is undergoing quite some changes in #1885 anyway.

Yes, you're right about not being related to this PR, it doesn't seem to be working in the general AMP Stories branch either.

@miina
Copy link
Contributor

miina commented Feb 27, 2019

@swissspidy FYI: I'll fix the font-family issue in a separate PR, it's related to the wrapperProps not being assigned as expected and causes some other issues, too.

@swissspidy swissspidy requested a review from miina February 28, 2019 09:47
Copy link
Contributor

@miina miina left a comment

Choose a reason for hiding this comment

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

It has some conflicts now but otherwise LGTM!

@swissspidy swissspidy merged commit bd28e34 into amp-stories-redux Feb 28, 2019
@swissspidy swissspidy deleted the amp-story/1883-text-block branch February 28, 2019 14:43
@westonruter westonruter added this to the v1.2 milestone May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Signed the Google CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants