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] Add any missing features necessary for templates #2013

Closed
5 tasks done
miina opened this issue Mar 21, 2019 · 12 comments
Closed
5 tasks done

[AMP Stories] Add any missing features necessary for templates #2013

miina opened this issue Mar 21, 2019 · 12 comments
Milestone

Comments

@miina
Copy link
Contributor

miina commented Mar 21, 2019

AC: All the features needed for the templates exist.
AC: User can set border radius to Image and Text blocks via block style (accessible via block style button in the left top corner of the block, or in the right sidebar in the block settings.
AC: User can align the text in Text block.
AC: User can add a gradient to the Page block.

  • Look through the templates and log the features that we need to add for templates.
  • Implement any missing features.

Features needed:

Add opacity Range control to allowed (child) blocks which use background color. Moved to a separate issue: #2058

@miina
Copy link
Contributor Author

miina commented Mar 21, 2019

Based on the template designs the following features seem to be missing:

  • Adding opacity to block (this would also be useful with a Color Fill block -- a resizable block which can be just filled with color and then placed on top of an image or background image is 100% size with opacity setting);
  • Gradient (would also be useful with a Color Fill block).
  • Aligning text to center;
  • Rotation (is already logged in [AMP Stories] Element rotation #2005.)

cc @swissspidy @westonruter

@swissspidy
Copy link
Collaborator

Color Fill block: My immediate thought was WordPress/gutenberg#4900. The PR for that, WordPress/gutenberg#13964, is still in the works, but according to the comments there it might be ready soon.

@swissspidy
Copy link
Collaborator

Aligning text to center

Should be as easy as setting supports: { align: true } and adding the necessary text-align CSS.

@westonruter
Copy link
Member

As I'm sure you're aware, also related to Section block is the Cover Image as a proto block: it allows you to add additional children to it. The Overlay has a color and opacity setting:

image

@westonruter
Copy link
Member

  • Adding opacity to block

What about adding opacity to a block as a whole, and not just the background color? I know this was done for layers in the previous incarnation of AMP Stories. Maybe that is just asking for trouble.

@miina
Copy link
Contributor Author

miina commented Mar 22, 2019

What about adding opacity to a block as a whole, and not just the background color? I know this was done for layers in the previous incarnation of AMP Stories. Maybe that is just asking for trouble.

Unless there is a reason why not to then seems like we could add it generally for other blocks, too, or at least to Image and Text Block.

Another style-related thing that occurs frequently in the templates is having rounded corners for images and Text blocks with background color. Maybe that'd also be something necessary?

@westonruter
Copy link
Member

It would indeed be useful if background colors everywhere in Gutenberg had the ability to specify the opacity. It's not currently provided normal Color Settings:

image

The Overlay has the opacity as a separate slider for Background Opacity as shown above:

image

By it would be cool if all color pickers just had opacity as a standard parameter.

Another style-related thing that occurs frequently in the templates is having rounded corners for images and Text blocks with background color. Maybe that'd also be something necessary?

Oh yeah, a border radius setting for the text block and image block would be very nice!

@miina
Copy link
Contributor Author

miina commented Mar 22, 2019

Ticket description is now updated based on the discussion.

@swissspidy
Copy link
Collaborator

a border radius setting for the text block and image block would be very nice

Could this be a block style instead? Then one could choose between "Default" and "Rounded" without having to worry about the block radius always being consistent between blocks. Or is there a strong use case for a block radius range control?

@miina
Copy link
Contributor Author

miina commented Apr 1, 2019

"Default" and "Rounded" should be sufficient, we can adjust later if it should become necessary.

@miina
Copy link
Contributor Author

miina commented Apr 1, 2019

Will start working on adding the gradient/scrim setting to Page. cc @swissspidy

@csossi
Copy link

csossi commented Apr 14, 2019

verified in QA

@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
None yet
Projects
None yet
Development

No branches or pull requests

5 participants