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: Editor Grid #4314

Closed
wants to merge 4 commits into
base: master
from

Conversation

6 participants
@mtias
Contributor

mtias commented Jan 5, 2018

In progress (Highly Experimental)

This PR seeks to explore setting up a grid as the layout manager for the editor content. It absorbs the responsibility of handling wide and full widths. A theme should be able to overwrite the grid and every block would fall into place. This should greatly simplify calculations for presence of sidebar (collapsed or not). The biggest challenge is accommodating floats without changing the editor markup.

This follows early explorations by @mor10.

Extra Alignment Options

Another thing this enables is registering extra alignment options (pulled content, side-by-side cards, etc) that a user can easily toggle with one click.

See this rough video for some of these explorations: https://cloudup.com/cxerBaTpMI9

Themes

A theme should be able to overwrite the grid template definition and, if using the same named areas, all content and alignment possibilities should follow through.

Concerns

The grid paradigm is fundamentally incompatible with floating and wrapping direct descendant nodes. That means if we want to support both, we need to add a container wrapper to the elements that want to interact in a float context.

@melchoyce melchoyce added this to To Do in Customization Jan 16, 2018

@melchoyce melchoyce moved this from To Do to In progress in Customization Jan 16, 2018

@jeffpaul

This comment has been minimized.

Show comment
Hide comment
@jeffpaul

jeffpaul Jan 18, 2018

Per today's bug scrub, note that this resolves #1483.

jeffpaul commented Jan 18, 2018

Per today's bug scrub, note that this resolves #1483.

@mor10

This comment has been minimized.

Show comment
Hide comment
@mor10

mor10 Feb 6, 2018

How are you envisioning the theme providing instructions to the editor here? Just overriding styles in editor-styles.css or something in functions.php?

mor10 commented Feb 6, 2018

How are you envisioning the theme providing instructions to the editor here? Just overriding styles in editor-styles.css or something in functions.php?

@mtias

This comment has been minimized.

Show comment
Hide comment
@mtias

mtias Feb 7, 2018

Contributor

@mor10 likely enqueuing and overriding the editor layout element through https://wordpress.org/gutenberg/handbook/blocks/applying-styles-with-stylesheets/#enqueueing-editor-and-front-end-assets

That would give the best flexibility for responsive styles that would be hard and convoluted to provide otherwise.

Contributor

mtias commented Feb 7, 2018

@mor10 likely enqueuing and overriding the editor layout element through https://wordpress.org/gutenberg/handbook/blocks/applying-styles-with-stylesheets/#enqueueing-editor-and-front-end-assets

That would give the best flexibility for responsive styles that would be hard and convoluted to provide otherwise.

@bordoni

This comment has been minimized.

Show comment
Hide comment
@bordoni

bordoni Feb 17, 2018

Contributor

Was wondering, for Post Types (plugin based) that mostly control the size of the output unless the theme is very vocal about it's width. Should be allowed for that to be configured on a Post Type level?

Contributor

bordoni commented Feb 17, 2018

Was wondering, for Post Types (plugin based) that mostly control the size of the output unless the theme is very vocal about it's width. Should be allowed for that to be configured on a Post Type level?

@aduth

This comment has been minimized.

Show comment
Hide comment
@aduth

aduth Sep 13, 2018

Member

This pull request appears to have languished and will not be easily reconciled with master. Please feel free to reopen and rebase against the current master, or open a new pull request.

Member

aduth commented Sep 13, 2018

This pull request appears to have languished and will not be easily reconciled with master. Please feel free to reopen and rebase against the current master, or open a new pull request.

@aduth aduth closed this Sep 13, 2018

@aduth aduth deleted the try/editor-grid branch Sep 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment