-
Notifications
You must be signed in to change notification settings - Fork 473
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 / full width alignment not applicable when layout has sidebar/non full width #1270
Comments
Reported in 2766114-zen (Mentioned in #1286 by @anant1811) |
Related: there's a specific module in Storefront which resets/tweaks an alignment attribute for blocks when the template is changed. See this file: https://github.com/woocommerce/storefront/commits/master/assets/js/src/editor.js |
I have investigated and I think I understand what's happening. Storefront does have some support for alignwide/alignfull. This is declared in class- You can see this working for columns and cover blocks, on pages that use the full width template. (Note this screenshot is taken with browser zoomed out, so looks weird) Images don't seem to work. Since cover block and columns are working, perhaps we have some overrides which have regressed at some point. In addition, there's support in I haven't tested what's happening with posts (as opposed to pages) – posts can be displayed in different templates/routes (e.g. posts/category archives, the post page) which can have sidebar. So in Storefront there may be limited benefit in using |
Removing from 2.5.6 for now – I don't think we should rush into a fix for this. The existing behaviour is not causing problems, just has some quirks. |
In my testing for 2.5.6 RC I saw that full/wide seem to be working well for pages with In blog posts, if there is a sidebar (i.e. sidebar has widgets) then the full width setting doesn't work - which makes sense. Full width still works when there's no sidebar content, so maybe that explains what I saw. |
Updated the title to clarify. Now I understand what's supported, I don't think this is a major problem. We may be able to clarify documentation, and review if the |
Added this to 2.5.7 - would be good to simplify/improve this if safe to do so. |
Something similar was reported in 21600190-hc / 3343680-zen. On desktop, a full-width cover block image appears full width on all pages (backend and frontend), except for the Shop page (backend appears full-width, frontend is not full width). On mobile, the full-width cover block images do not appear full width on any page (frontend). If this requires a separate issue, let me know. |
Describe the bug
The Gutenberg image block has full and wide alignment options. In Storefront these are not fully supported - on pages and posts, images are limited to the main body content width.
Also there's a quirk with editor preview of wide and full. When editing, if you select wide or full alignment, the image is displayed with wide or full aligment (wider than content column). (Side note: this is a misleading preview, since it's not supported on the front end.) If you reload the editor, the image block displays with centered alignment - images are limited to the content width (default alignment).
Perhaps we should explicitly not support wide and full - there's a theme_option for this. Alternatively, if this is an important feature, we could improve our support and fix the editor preview (as an enhancement).
To Reproduce
Steps to reproduce the behavior:
Screenshots
Full
alignment selected in editor, preview shows image expanded to full width:On front end,
full
is limited to column width (looks different from preview):Reload editor, block set to
full
but preview is limited to column width:The text was updated successfully, but these errors were encountered: