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

Content displays incorrectly when switching themes, such as wide or full-width #4342

Closed
BinaryMoon opened this issue Jan 6, 2018 · 9 comments
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Type] Enhancement A suggestion for improvement.

Comments

@BinaryMoon
Copy link

Issue Overview

If you switch between themes that support different gutenberg features then the content in the editor displays differently depending upon the theme. For example if you switch from a theme that supports full width content to a theme that doesn't then the editor will still display the content full width even though it won't display like this in the post.

In addition if you then edit the width setting (center an image for example) then there is no way to switch back to full width - which could be confusing to users. "Why can't I change it back to it's previous state?"

Steps to Reproduce (for bugs)

  1. Enable a theme that supports wide images.
  2. Create a new post with a full bleed image in it.
  3. Switch to a theme that doesn't support wide images.
  4. Edit the post you created in step 2. It will still be full bleed.

Expected Behavior

I imagine that if you are editing a post when running a theme that doesn't support full bleed content that the content will revert to the largest size supported by the theme. Essentially the full bleed setting is ignored. I also imagine that the setting would be kept - so that if you then switch back to a theme with full width support the image will go back to it's previous design.

@NewJenk
Copy link

NewJenk commented Jan 11, 2018

Gutenberg styles would have to be theme-specific for it to be WYSIWYG so it would be up to theme authors to include Gutenberg styles.

If no Gutenberg styles are included with the theme then it would just be default Gutenberg that displays (so it wouldn't be WYSIWYG).

@BinaryMoon
Copy link
Author

I'm not talking about the styles. I'm talking about the features and their use in the editor.

If you have a theme that has align-wide support, and then you switch to a theme that doesn't, then existing wide images will be displayed full width in the editor, but they won't be displayed full width on the post/ page. When you edit the image in the editor then you won't be able to make them full width again.

@NewJenk
Copy link

NewJenk commented Jan 11, 2018

Hi @BinaryMoon,

Ah apologies - I get what you mean now.

@jeffpaul jeffpaul added the [Type] Bug An existing feature does not function as intended label Jan 26, 2018
@jeffpaul
Copy link
Member

This ticket was mentioned in Slack in #core-editor by jeffpaul. View the logs.

@designsimply designsimply added the [Type] Plugin Interoperability Incompatibilities between a specific plugin and the block editor. Close with workaround notes. label Jun 27, 2018
@mtias mtias removed the [Type] Bug An existing feature does not function as intended label Oct 7, 2018
@designsimply designsimply added [Type] Enhancement A suggestion for improvement. General Interface Parts of the UI which don't fall neatly under other labels. and removed [Type] Plugin Interoperability Incompatibilities between a specific plugin and the block editor. Close with workaround notes. labels Jan 8, 2019
@designsimply
Copy link
Member

Closed #11259 to consolidate here and noting that the Media & Text block was specifically called out in that issue (in addition to a full bleed image mentioned here).

@designsimply designsimply changed the title Content displays incorrectly when switching themes Content displays incorrectly when switching themes, such as wide or full-width Jan 8, 2019
@paaljoachim
Copy link
Contributor

Hey @BinaryMoon Ben. Can you recheck? I am doing a status check of the issue. Thanks.

@BinaryMoon
Copy link
Author

It's still an issue but I don't think it's a big one. I'd be happy to close it.

@paaljoachim
Copy link
Contributor

I am hoping a few people can take a closer look, and give some kind of knowledgable feedback.

@tellthemachines @jasmussen @gziolo
Thank you!

@tellthemachines
Copy link
Contributor

I'm afraid there's no way to fix this on the editor side. Because users expect to be able to switch between themes and preserve their content settings, we can't remove the wide/full width classes and block attributes for a theme that doesn't happen to support them, and default editor styles provide a basic level of support for all alignments, so if those classes are set and the theme doesn't provide its own editor styles, the blocks will display as wide/full width in the editor.

The ideal solution is for themes that don't support wide/full width to provide editor styles that match their front end ones.

Closing the issue as there is nothing actionable here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

7 participants