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

Transforms between Heading & Cover Image #4003

Closed
2 tasks
mcsf opened this issue Dec 14, 2017 · 4 comments · Fixed by #4129
Closed
2 tasks

Transforms between Heading & Cover Image #4003

mcsf opened this issue Dec 14, 2017 · 4 comments · Fixed by #4129
Labels
[Feature] Blocks Overall functionality of blocks [Type] Question Questions about the design or development of the editor.

Comments

@mcsf
Copy link
Contributor

mcsf commented Dec 14, 2017

Issue Overview

This issue seeks to ask:

  1. Does it conceptually make sense to offer transforms between Heading and Cover Image blocks?
  2. If so, what does that exactly look like?

To better frame question 2, it's worth noting that Cover Image currently only has two visual states:

  • No background image URL has been provided and we get the placeholder state prompting us to pick an image from the media library.
  • An image has been picked, and we see it in the background, with an Editable placed over it.

I gave this a quick try. Merely transforming from Heading to Cover Image with default attributes (only providing the text) was quite awkward because of the points above: transforming would result in a Cover Image in placeholder state, and only after picking the image would you see the original Heading's text had been ported too:

gutenberg-heading-cover-image-awkward

So my next try was to support a state where we have text but no image. With that, this is how the transformations look like, both ways:

gutenberg-heading-cover-image

Obviously, the gray background looks clunky, but it may hint at how to provide a better alternative to the former behavior.

Related Issues and/or PRs

Todos

  • Tests
  • Documentation
@mcsf mcsf added [Feature] Blocks Overall functionality of blocks Needs Design Feedback Needs general design feedback. [Type] Question Questions about the design or development of the editor. labels Dec 14, 2017
@karmatosed
Copy link
Member

I like this. We probably want to work out if the grey background as you say, I do like it as an option though. Transitioning between blocks should be easy and this helps a lot avoid a visual hitch.

What about this?

artboard

@mcsf
Copy link
Contributor Author

mcsf commented Dec 14, 2017

Yeah, I like that better. What could it look like if we wanted to preserve the style of the normal placeholder state?

@karmatosed
Copy link
Member

coverimage

What about the above @mcsf ?

@mcsf
Copy link
Contributor Author

mcsf commented Dec 20, 2017 via email

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 [Type] Question Questions about the design or development of the editor.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants