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: cover text block with color options #2036

Merged
merged 6 commits into from
Jul 27, 2017
Merged

Try: cover text block with color options #2036

merged 6 commits into from
Jul 27, 2017

Conversation

mtias
Copy link
Member

@mtias mtias commented Jul 26, 2017

image

@mtias mtias added [Status] In Progress Tracking issues with work in progress [Feature] Blocks Overall functionality of blocks New Block Suggestion for a new block and removed [Status] In Progress Tracking issues with work in progress labels Jul 26, 2017
@jasmussen
Copy link
Contributor

I love this feature. I love it so much that I think this shouldn't be a separate block, but indeed the text block. This would require there was a "no swatch" option, though, to remove a color if you've already set one. We'd probably also want to add the block padding only if a swatch is selected, and longer term we'd want themes to be able to provide the swatches.

However, I can understand that it would also be good to get some testing for this feature before deciding that the text block needs it. Especially when we're this close to 1.0. We might also find that this isn't a text feature at all, but instead the first block that is intended for other blocks to be nested inside. (Matías idea in a chat discussion)

As such, in the name of testing, 👍 👍 for merging from me.

@mtias mtias merged commit 2d91294 into master Jul 27, 2017
@mtias mtias deleted the try/cover-text-block branch July 27, 2017 11:55
@jasmussen
Copy link
Contributor

jasmussen commented Jul 28, 2017

I just realize that this block breaks a little bit with the design patterns laid forth in https://github.com/WordPress/gutenberg/blob/master/docs/design.md, which suggest that any basic actions you need to be able to take on the block should be doable without having the sidebar open. Since the primary purpose of this block is to change the background color and this is done in the inspector, it's arguably crossing that line.

It's not important to fix this right now, because the meta purpose of this block is to "explore what's possible" in Gutenberg, and it does that super well.

Later on, though, when we have time to fix, we can do it in a ton of ways, though:

  1. Make this a feature of the text block. This is the obvious one. The purpose of the text block is text, and if you explore the advanced controls, hey, there's the color!

  2. Move the swatch picker to be a button on the quick toolbar. Probably somewhat more tricky.

  3. Tweak the defaults of the block to be about highlighting a snippet of text or something in that vein, so it comes with a default color and look (preferrably a default supplied by the theme). This would make the block "useful" even in its non-color-configured state, and again, supply further customizations in the inspector.

@StaggerLeee
Copy link

StaggerLeee commented Jul 30, 2017

I like this block, much.
News portals, but not only them, use it often.

Some options that could be added, so it could be more versatile.

  • To filter easy what background and text colors are visible.

  • To be able to align whole block (as Post image) left of text, right of text. (Include somehow to be able to decide width, in % of content area best)

  • Maybe if it is not difficult, filter to tie up background colors to font colors. To prevent Users make crazy circus of website. Say developer decide for 3-4 block background colors, depending what Editor wants to announce to the visitors/readers. In custom functions.php be able to tie up 3 specific font colors to them, and remove font color options.

@mtias
Copy link
Member Author

mtias commented Jul 31, 2017

To filter easy what background and text colors are visible.

Yes! This needs to exist for themes to supply a palette, and could be easily configurable by plugins as well.

To be able to align whole block (as Post image) left of text, right of text.

I disabled floated left/right from this block, but we can easily enable it back if we think it'd be useful.

@melchoyce
Copy link
Contributor

I'd love to eventually see this idea merged with Cover Image to create a... nestable "Banner" or "Section" block, maybe? Wording on it will be hard. I'm thinking:

  • You can change the background to display an image, video, or a background color (or even gradient!)
  • You can drop all text blocks (header, paragraph, lists, etc.) and the button block into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks New Block Suggestion for a new block
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants