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

TT1 blocks: differences in spacing between editor & front end #244

Open
annezazu opened this issue Apr 1, 2021 · 8 comments
Open

TT1 blocks: differences in spacing between editor & front end #244

annezazu opened this issue Apr 1, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@annezazu
Copy link

annezazu commented Apr 1, 2021

In chatting with someone about the latest FSE outreach program here bobbingwide/bobbingwide#14, the issue of spacing at the top of the editor came up as the editor makes the spacing seem okay whereas, when viewing the site, it quickly becomes clear that a spacer block is needed. This breaks the WYSIWYG experience currently.

Editor View:
Screen Shot 2021-04-01 at 2 09 18 PM

Front End View:
Screen Shot 2021-04-01 at 2 09 25 PM

To me, this seems to be a TT1 blocks issue but, let me know if not! Happy to report in the main Gutenberg repo :)

@kjellr
Copy link
Collaborator

kjellr commented Apr 5, 2021

The extra space added there comes from margins in Gutenberg, so this could be an issue there. But themes may end up with the ability to customize it, as per issues like WordPress/gutenberg#30371 and WordPress/gutenberg#30375. So let's keep this open here for now and see if those enable a theme-based fix. 👍

@kjellr kjellr added the bug Something isn't working label Apr 5, 2021
@annezazu
Copy link
Author

annezazu commented Apr 5, 2021

Thanks for the wider context, @kjellr!

@annezazu
Copy link
Author

annezazu commented Apr 6, 2021

Another tester reported more spacing issues with the editor showing far more spacing than the front end as part of the fourth call for testing. Passing along here and renaming this issue to touch on general spacing differences.

Editor View:

editor view

Front End View:

front end view

@annezazu annezazu changed the title TT1 blocks: differences in spacing for content at top of editor TT1 blocks: differences in spacing between editor & front end Apr 6, 2021
@annezazu
Copy link
Author

Cross referencing this issue as this seems to be the culprit :) WordPress/gutenberg#30545

@carolinan
Copy link
Collaborator

The padding in the site editor is seen as the mint green background above and to the sides of the header area.
It doesn't explain the big difference in the space between that edge and the top of the order button 🤔

@carolinan
Copy link
Collaborator

It is difficult to troubleshoot this without the block markup.
I went back and followed the instructions from the call for testing for the restaurant header and I am not seeing this drastic difference.

Here is front view on top of the editor view. The image where the order button is closer to the top is the front.
image

@annezazu
Copy link
Author

What would be helpful to share next time this happens @carolinan ? :)

@annezazu
Copy link
Author

Passing along wonderful context showing differences between editor and front end from the last FSE call for testing. Happy to open any individual issues that are needed but do need some guidance on what that would be:

Here’s some screenshots comparing a single section from this test’s content. I’d deleted my initial test site before I saw your reply, and what you see here is a bare minimum re-do of this testing call.

Front end:
fse-6-frontend-0001
Editor:
fse-6-backend-0001

The first image is a snapshot from the template editor, from steps 19-22. Each button has a small default top margin applied and there’s no default horizontal spacing between these elements.

The second image is the same content as rendered on the front of the site. In the first column, the first child of the column has a top margin applied; in the second column, the first child has no top margin applied (the top margins applied here and in the previous image are also different values). The buttons now have a small horizontal margin applied by default.

It’s these types of details that often mean the difference between a design that looks well-resolved vs. one that looks unintentional. So far, I’ve been able to manage this in my own themes by not using the native block styles, though I’m concerned there’ll be a point where it’s no longer feasible to write custom CSS for this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants