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

Site Editor: Content-width and wide widths sometimes don't apply when browsing through Pages #59593

Closed
jasmussen opened this issue Mar 5, 2024 · 2 comments · Fixed by #59628
Assignees
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@jasmussen
Copy link
Contributor

This one is hard to describe, so it's best to describe steps to reproduce:

  • Have some pages saved/published on your site.
  • Have a site design, ideally a Header template part, that leverages the wide width for the main containing group. E.g. Twenty TwentyFour by default.
  • Go to the site editor (/wp-admin/site-editor.php).
  • Navigate to "Pages"
  • Select a page, and observe how the wide content-width for the header template becomes full-wide (or just unbounded).
  • Now reload the page and observe how upon reload, the same wide content-width for the header template is correct.

The above steps are shown in these two GIF files as well:

wide alignment in page editor
reloading to fix it

In other words, the wide width is not respected when browsing to a page, that incorrect width even persists inside the editor. Until you reload in either the site editor page detail page, or the fullscreen editor. So some width-related CSS is missing in one case, but not the other.

@jasmussen jasmussen added the [Type] Bug An existing feature does not function as intended label Mar 5, 2024
@jasmussen
Copy link
Contributor Author

Testing this more, here are the results:

  • 6.4.3: not affected by this issue.
  • 6.4.3 with the trunk Gutenberg plugin: can reproduce.
  • 6.5 nightly: can reproduce. (With or without the Gutenberg trunk plugin.)

@annezazu annezazu changed the title Bug: Content-width and wide widths sometimes don't apply when browsing Pages in the site editor Site Editor: Content-width and wide widths sometimes don't apply when browsing through Pages Mar 5, 2024
@annezazu annezazu added the [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") label Mar 5, 2024
@andrewserong
Copy link
Contributor

I'm not too sure the cause, but from a (very) quick test, it looks like the .has-global-padding rules aren't being output (potentially) when we go to view the individual page. However, upon reloading the site editor, these rules are applying correctly:

image

So in terms of next steps to investigate, I wonder why the global padding rules might be being skipped or not being output correctly in this case?

I might not get a chance to dig any deeper until later on in the week since I'm travelling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants