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

Patterns in focus mode should not render with layout padding applied #51937

Closed
richtabor opened this issue Jun 26, 2023 · 12 comments · Fixed by #54373
Closed

Patterns in focus mode should not render with layout padding applied #51937

richtabor opened this issue Jun 26, 2023 · 12 comments · Fixed by #54373
Assignees
Labels
[Feature] Focus Mode Zoomed in focus mode for editing things like template parts [Feature] Layout Layout block support, its UI controls, and style output. [Type] Bug An existing feature does not function as intended

Comments

@richtabor
Copy link
Member

As previewed, patterns seen within the Library do not render with applied layout padding. But as you click through to edit one, the padding is then applied.

The Global Styles > Layout > Padding value should probably be omitted from the canvas when in focus mode.

CleanShot 2023-06-26 at 15 21 59

CleanShot 2023-06-26 at 15 20 48

@richtabor richtabor added [Feature] Focus Mode Zoomed in focus mode for editing things like template parts [Type] Bug An existing feature does not function as intended labels Jun 26, 2023
@carolinan
Copy link
Contributor

Did you mean that the controls should be hidden too? I think the inconsistency could be confusing.

@richtabor
Copy link
Member Author

Did you mean that the controls should be hidden too?

No, I mean the padding applied to the block content area should not be present.

@carolinan
Copy link
Contributor

But then the control will be there in the sidebar but it will look like it does nothing when you change the spacing.

@richtabor
Copy link
Member Author

But then the control will be there in the sidebar but it will look like it does nothing when you change the spacing.

You're focused in on a pattern; not the site. The layout padding doesn't apply to each individual padding, so it shouldn't be applied visually within the editor - if it's not applied to the pattern anywhere else.

@richtabor
Copy link
Member Author

What about if the wrapping block is a container (group, columns, media & text) then the horizontal and vertical padding is omitted from focus view?

The trailing inserter is another issue.

CleanShot.2023-07-14.at.15.44.12.mp4

cc @jameskoster as you ran into this earlier as well.

@jameskoster
Copy link
Contributor

What about if the wrapping block is a container

I'm not sure there needs to be an if. Imo the "Layout" padding from global styles should be removed in this view regardless.

@richtabor
Copy link
Member Author

I suppose if the pattern doesn’t have a wrapper with its own padding, then its text/contents would be pressed up to the frame edges.

@jameskoster
Copy link
Contributor

I don't think that's a problem? It's an accurate portrayal of what you'd see when inserting the pattern which is (imo) what we should be aiming for in this context. Otherwise the user could mistakenly assume a doesn't need padding when it does.

@carolinan
Copy link
Contributor

I still find it confusing that if I am indeed focusing on the pattern, not the site, why are the site options like global styles available?

@jameskoster
Copy link
Contributor

@carolinan do you mean the global styles panel? I think that's a reasonable question to ask, but probably better suited to a separate issue.

@carolinan
Copy link
Contributor

1 Yes,
2 OK. 🙂

@tellthemachines tellthemachines added the [Feature] Layout Layout block support, its UI controls, and style output. label Jul 24, 2023
@bph bph moved this to ❓ Triage in WordPress 6.4 Editor Tasks Jul 25, 2023
@bph bph moved this from Triage to Needs Dev / Todo in WordPress 6.4 Editor Tasks Sep 8, 2023
@tellthemachines
Copy link
Contributor

It's an accurate portrayal of what you'd see when inserting the pattern which is (imo) what we should be aiming for in this context. Otherwise the user could mistakenly assume a doesn't need padding when it does.

That depends on where the pattern is inserted: if it goes in at root level, then what we currently see in focus mode is an accurate portrayal of what it'll look like. If it's inserted inside a nested container such as a Column, then the root padding won't appear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Focus Mode Zoomed in focus mode for editing things like template parts [Feature] Layout Layout block support, its UI controls, and style output. [Type] Bug An existing feature does not function as intended
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants