-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Blocks: Full Screen alignment/display option on several blocks #16385
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! |
This PR makes the block alignments always be collapsed. This group would already collapse at mobile responsive breakpoints. In addition, this PR also adds a dropdown arrow. This comes with a couple of benefit: - It ensures that the block toolbar always fits even when the item is deeply nested inside columns. - It affords a scalable method to show additional alignment options, such as those suggested in #16385. - It scales to future ideas of allowing a theme to create CSS grid-based layouts, which could allow theme authors to create their own custom alignments such as "pull right" or others. - It has labels, to be descriptive of such new alignments. Noting that 3 is just an idea at this point, but the other items on the list can potentially benefit us today.
@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? |
hi @phpbits, 👋 |
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? |
This PR makes the block alignments always be collapsed. This group would already collapse at mobile responsive breakpoints. In addition, this PR also adds a dropdown arrow. This comes with a couple of benefit: - It ensures that the block toolbar always fits even when the item is deeply nested inside columns. - It affords a scalable method to show additional alignment options, such as those suggested in #16385. - It scales to future ideas of allowing a theme to create CSS grid-based layouts, which could allow theme authors to create their own custom alignments such as "pull right" or others. - It has labels, to be descriptive of such new alignments. Noting that 3 is just an idea at this point, but the other items on the list can potentially benefit us today.
* Try: Always collapse block alignments. This PR makes the block alignments always be collapsed. This group would already collapse at mobile responsive breakpoints. In addition, this PR also adds a dropdown arrow. This comes with a couple of benefit: - It ensures that the block toolbar always fits even when the item is deeply nested inside columns. - It affords a scalable method to show additional alignment options, such as those suggested in #16385. - It scales to future ideas of allowing a theme to create CSS grid-based layouts, which could allow theme authors to create their own custom alignments such as "pull right" or others. - It has labels, to be descriptive of such new alignments. Noting that 3 is just an idea at this point, but the other items on the list can potentially benefit us today. * Refactor alignment toolbars to be collapsed by default * Add arrow indicator to the Edit tabel dropdown menu * Update snapshot tests to work with updated components * Update failing e2e tests to work after UI changes introduced
@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 |
I've updated the PR this morning: #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 |
re-open... |
Can we add |
something talked with @jasmussen too if I'm not wrong. Thoughts? |
It looks like the first step would be to add a general height control to the Media & Text block, that's not present yet. |
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
The text was updated successfully, but these errors were encountered: