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

Alignments Overview #29506

Closed
7 of 12 tasks
mtias opened this issue Mar 3, 2021 · 4 comments
Closed
7 of 12 tasks

Alignments Overview #29506

mtias opened this issue Mar 3, 2021 · 4 comments
Labels
[Feature] Blocks Overall functionality of blocks [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Overview Comprehensive, high level view of an area of focus often with multiple tracking issues

Comments

@mtias
Copy link
Member

mtias commented Mar 3, 2021

Gathering some of the current efforts and idea around improving how block alignments are handled and the kind of interactions they unlock.

System

The first and most important aspect is a foundation that allows to express alignments declaratively and incorporate the existence of nested contexts as a first-class set. The original alignments predate the existence of nested blocks, so they were not taken into account.

This work would improve upon a few fundamental issues that have been affecting the handling of alignments and greatly simplify theme integration, which right now requires a heavy amount of CSS to properly handle.

The other highly relevant aspect is the integration with theme.json declarations and the global styles UI representation.

Another important aspect would be to allow block to have a default alignment set through those same mechanisms so that “videos” always are inserted as “wide” rather than “content”, for example.

It'd be important to also incorporate this information and help clarify contextually some of the tools in the interface, as outlined in:

Screenshot 2021-03-03 at 11 49 19

Finally, a consideration that needs handling is how these alignments map or evolve for different breakpoints. Good default are important here.

  • Handling of breakpoints.

Concerning interactivity

The snap to grid idea has been generally coupled with the development of a grid system, but that doesn't have to be the case. We can still have snap-to-alignment-breakpoints for blocks that support it within a container.

  • Add snap to "wide", "full", "content" for resizable elements.
  • Show lines / bars when editing the breakpoint values.

grids

One more area to explore is the interaction with drag and drop. For example, dragging an image to the canvas, depending on where you are dropping can default to content, wide, or full.

  • Explore drag and drop improvements connected with alignment breakpoints.
@mtias mtias added [Feature] Blocks Overall functionality of blocks [Type] Overview Comprehensive, high level view of an area of focus often with multiple tracking issues [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. labels Mar 3, 2021
@youknowriad
Copy link
Contributor

#29335 landed and it checks a few items on this issue. We can now define a default layout (widths) in theme.json and use it consistently in themes or add a specific layout for some areas of the site/content.

@skorasaurus
Copy link
Member

skorasaurus commented Apr 23, 2021

"Allow modifying the default values in Global Styles -> Spacing." has an issue made for it at #30761

@mtias mtias mentioned this issue Jun 30, 2021
57 tasks
@mtias mtias mentioned this issue Sep 6, 2021
16 tasks
@jasmussen
Copy link
Contributor

I have an update on the visuals. This one features the basic alignments, plus wide and full-wide. The center icon has been updated, and the previous icon for centering has been repurposed for indicating "None". There's help text for "None" and "Wide", to show the values for the content and wide area layout values.

Group 259

The next one is shown for themes that do not support wide or fullwide alignments. It has the same basic qualities, but shows additional help text at the bottom, to explain the missing buttons:

Group 260

@annezazu
Copy link
Contributor

Closing this out as most tasks have been completed and it's a few years old at this point.

The snap to grid idea has been generally coupled with the development of a grid system, but that doesn't have to be the case. We can still have snap-to-alignment-breakpoints for blocks that support it within a container.

As a follow up to this, please follow along here: #44357

Finally, a consideration that needs handling is how these alignments map or evolve for different breakpoints. Good default are important here.

For breakpoints and more recent conversation/thinking there, please refer to this issue: #34641

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 [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Overview Comprehensive, high level view of an area of focus often with multiple tracking issues
Projects
No open projects
Archived in project
Development

No branches or pull requests

5 participants