Gutenberg: Full Screen alignment/display option on several blocks

Created on 2 Jul 2019  路  14Comments  路  Source: WordPress/gutenberg

Is your feature request related to a problem? Please describe.
Would be really nice to have ability to set several blocks as full screen. It's a very powerful option to have on Cover and Media Text Blocks.

Tagging @mtias :)

Describe the solution you'd like
I've added this feature on EditorsKit plugin and here's the preview : https://twitter.com/phpbits/status/1143122996552335362

Good First Issue Needs Dev [Feature] Block API [Status] In Progress

All 14 comments

I think this is pretty neat. It'd be interesting to see how this could work as an alignment option: "full screen". How do you handle that in the editor 100vh would be slightly more than what is visible (with the header toolbar, etc)?

@phpbits how do you feel about exploring how this might work within the alignments group?

@mtias Sorry for late response. I'm actually planning to explore this are next week. I'm just finishing up the custom classes for editorsKit which is almost done. I'm really sure this will work on the alignment group though, I'm just not sure which filter to use right now. I'll let you know how it goes. Thanks!

@mtias Just checked and it seems that there's now SlotFill available to register new alignment. It has to be manually added here : https://github.com/WordPress/gutenberg/blob/359858da0675943d8a759a0a7c03e7b3846536f5/packages/block-editor/src/components/block-alignment-toolbar/index.js . Thanks!

@phpbits yes, let's try to add it there directly as a new alignment and see how it feels.

I'm going to work on this one. No guarantee, though.

My first question is which icon would we use?
Are these ones all icons available?
https://developer.wordpress.org/resource/dashicons

let's try to add it there directly as a new alignment and see how it feels.

It seems to be possible to work combined with the alignment options. For instance, it's possible to align the image at the right and turn on the full-screen mode:

  • align right - full screen off
    image

  • align right - full screen off
    image

hi @phpbits, 馃憢
Could you help me to understand what you mean with extensible?

@retrofox Is it possible to make the alignment extensible, similar to block styles?

I think I got it. Do you mean to be able to add this option to other blocks, right? For instance, add it paragraphs, etc. Is it right?

@retrofox I've actually had a second thought and removed my comment sorry. I just thought it'll be better if we can easily add alignment like registerBlockStyle but it should be different issue than this one.

I've updated the PR this morning: https://github.com/WordPress/gutenberg/pull/16738 馃憢

Just noting that I'd love to see this resurrected. A fullscreen alignment would be excellent for use in certain block patterns.

Now that we have vh unit support at the component level it seems we could make the alignment be a shortcut to it. cc @ItsJonQ

Was this page helpful?
0 / 5 - 0 ratings

Related issues

moorscode picture moorscode  路  3Comments

maddisondesigns picture maddisondesigns  路  3Comments

franz-josef-kaiser picture franz-josef-kaiser  路  3Comments

youknowriad picture youknowriad  路  3Comments

spocke picture spocke  路  3Comments