Skip to content

Site Editor: Tablet Preview cuts off bottom part of template #37708

Closed

Description

@annezazu

Description

In the Site Editor, using the Preview option to see the Tablet view cuts off the bottom part of the template being edited. This only happens with the Site Editor (rather than Template editor).

Originally noted in core-test slack here: https://wordpress.slack.com/archives/C03B0H5J0/p1641303448050400?thread_ts=1641303130.049800&cid=C03B0H5J0

Step-by-step reproduction instructions

  1. Open Site Editor
  2. Select Preview.
  3. Select Tablet option.
  4. Notice you can't see the footer.

Screenshots, screen recording, code snippet

Updated video:

preview.cut.off.mov

Environment info

  • WordPress 5.9 RC1
  • Problem with both Gutenberg 12.2 activated and deactivated.
  • Twenty Twenty-Two
  • MacOS
  • Chrome

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Activity

  1. added
    [Type] BugAn existing feature does not function as intended
    General InterfaceParts of the UI which don't fall neatly under other labels.
    [Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")
    on Jan 4, 2022
  2. changed the title [-]Site Editor: Tablet & Mobile Preview cuts off bottom part of template[/-] [+]Site Editor: Tablet Preview cuts off bottom part of template[/+] on Jan 4, 2022
  3. annezazu commented on Jan 4, 2022

    @annezazu
    ContributorAuthor

    Updated after testing with RC1 :)

  4. Mamaduka commented on Jan 5, 2022

    @Mamaduka
    Member

    Unfortunately, I couldn't reproduce the issue. So please, let me know if I'm missing any steps.

    Tested with WP 5.9 RC 1 and Gutenberg trunk.

    Screencast

    CleanShot.2022-01-05.at.20.32.51.mp4
  5. annezazu commented on Jan 5, 2022

    @annezazu
    ContributorAuthor

    @Mamaduka curious what browser you're using and if that makes a difference here? I was using Chrome and can still replicate today :D

  6. Mamaduka commented on Jan 5, 2022

    @Mamaduka
    Member

    Chrome/MacOS

  7. annezazu commented on Jan 5, 2022

    @annezazu
    ContributorAuthor

    From @costdev in slack:

    Yeah I can reproduce 37708 on Chrome/Windows (1920x1080). Seems to be a simple issue of the height of the iframe.
    Not an actual fix, but it seems that applying this to the iframe does the trick:
    max-height: calc(100vh - 144px - 60px - 25px);
    144px is the top + bottom margin of the iframe
    60px is the height of .edit-site-header
    25px is the height of .interface-interface-skeleton__footer

  8. piotrbak commented on Jan 7, 2022

    @piotrbak

    I'm also able to reproduce it on Chrome 1920x1080.

  9. juhi123 commented on Jan 11, 2022

    @juhi123
    Contributor

    I also could reproduce this issue on Mac OS Chrome.

  10. Mamaduka commented on Jan 13, 2022

    @Mamaduka
    Member

    @jasmussen, @jameskoster, do you mind having a look at this? I'm pretty sure it's an overflow issue, but I can't point my finger on it 😄

  11. jameskoster commented on Jan 13, 2022

    @jameskoster
    Contributor

    Yup it's cause by this line: https://github.com/WordPress/gutenberg/blob/trunk/packages/edit-site/src/components/editor/style.scss#L35 which was added in #35974. Perhaps @kevin940726 can confirm why we need that rule and if there's an alternative approach we could try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

General InterfaceParts of the UI which don't fall neatly under other labels.[Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions