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

Wide alignment control needs to be polished #5342

Closed
1 task
lindseymacmillan opened this issue Oct 5, 2020 · 3 comments
Closed
1 task

Wide alignment control needs to be polished #5342

lindseymacmillan opened this issue Oct 5, 2020 · 3 comments
Assignees
Labels
type: enhancement An improvement to existing user-facing functionality

Comments

@lindseymacmillan
Copy link
Contributor

User Story

As an admin, I want Multi-Form Goal block wide alignment controls to be polished so that I have a simpler editing experience.

Details

When testing the wide alignment in the block editor, I expected the block to behave similarly an image block that is set to wide alignment. Instead I saw the Multi-form Goal block jump to the left margin and it not fill the entirety of the wide container.
Note: This is only an issue in the block editor (Astra theme). The wide alignment seems to work correctly on the front end.

Additional Context

Screencast: https://cln.sh/4GpcXD

Acceptance Criteria

  • In wide alignment, block width should be limited to card width
@lindseymacmillan lindseymacmillan added the type: enhancement An improvement to existing user-facing functionality label Oct 5, 2020
@lindseymacmillan lindseymacmillan self-assigned this Oct 5, 2020
@canny
Copy link

canny bot commented Oct 5, 2020

This issue has been linked to a Canny post: Wide alignment control needs polished 🎉

@lindseymacmillan
Copy link
Contributor Author

Update: 10/7/20

After investigating this further, I am running into something of a blocker - related to the Block Editor's functionality around align-wide and InnerBlocks. Confusingly, then the block is set to "align wide", the parent div loses the wp-block class, and instead a child div with wp-block class is added to wrap the Multi-Form Goal block's contents. For reference, see these screenshots:

Markup of Multi-Form Goal block with normal align:
Screen Shot 2020-10-07 at 1 46 25 PM

Markup of Multi-Form Goal block with wide align:
Screen Shot 2020-10-07 at 1 45 19 PM

This ruuns contrary to other core Block Editor blocks (ex: Cover), where the setting of "align wide" does not result in the parent div losing the wp-block class, and having a child wrapper div added.

This issue can be resolved through a hardcoded set of styles like this:
Screen Shot 2020-10-07 at 1 53 28 PM

But that solution fails to consider that every theme can define it's own content width.

I will be looking into this more this afternoon.

@lindseymacmillan
Copy link
Contributor Author

This issue is related to an identified alignment bug with the Block Editor. It has been documented previously in these two issues of the Gutenberg repo:

WordPress/gutenberg#25088
WordPress/gutenberg#24721

In the issues, other devs point out various inconsistencies in the way alignment is handled by different core blocks, and how the block editor's current implementation produces issue for most custom blocks which make use of the alignment options.

Notably, the Multi-Form Goal block is the only block which presents users with alignment options - so this bug does not impact any other GiveWP core blocks.

With all this information, I'm going to close this issue for now, with plans to improve the wide alignment experience in a future release if changes to the block editor necessitate new styling on our end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement An improvement to existing user-facing functionality
Projects
None yet
Development

No branches or pull requests

1 participant