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

Focus mode: Unable to scroll when editing a longer template part #45084

Closed
annezazu opened this issue Oct 18, 2022 · 11 comments · Fixed by #45189
Closed

Focus mode: Unable to scroll when editing a longer template part #45084

annezazu opened this issue Oct 18, 2022 · 11 comments · Fixed by #45189
Assignees
Labels
[Feature] Focus Mode Zoomed in focus mode for editing things like template parts [Type] Bug An existing feature does not function as intended

Comments

@annezazu
Copy link
Contributor

Description

When using the focus mode, I'm unable to scroll down when trying to edit a comments block in isolation. I'm also noticing that more content shows up between modes (site editor vs focus mode) - I'm assuming that's to provide filler content but it's a bit of a confusing UX regardless.

Step-by-step reproduction instructions

  1. Use 6.1 RC 2.
  2. Head to Appearance > Editor.
  3. Add the comments block.
  4. Select the comments block and choose "edit" in the block toolbar.
  5. Notice you can't scroll down or move around in general except by selecting things in list view.

Screenshots, screen recording, code snippet

Video showing inability to scroll:

unable.to.scroll.down.mov

Screenshot of site editor showing no comments:

Screen Shot 2022-10-18 at 4 09 15 PM

Screenshot of focus mode showing 3 comments (I'm guessing as filler content for what one would see if there were comments but still):

Screen Shot 2022-10-18 at 4 09 57 PM

Environment info

  • WordPress 6.1 RC 2
  • TT3
  • No GB
  • Chome

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

@annezazu annezazu added [Type] Bug An existing feature does not function as intended [Block] Comments Affects the Comments Block - formerly known as Comments Query Loop [Feature] Focus Mode Zoomed in focus mode for editing things like template parts labels Oct 18, 2022
@annezazu
Copy link
Contributor Author

cc @Poliuk for awareness.

@carolinan
Copy link
Contributor

carolinan commented Oct 19, 2022

I can reproduce this.
Small note: In TT3, the "comments block" in this template is a template part, which is why it has the Edit option.

@michalczaplinski michalczaplinski self-assigned this Oct 19, 2022
@michalczaplinski
Copy link
Contributor

I just took a look at this and it's not specific to the Comments block. I can reproduce the problem when trying to edit the Footer template as well:

template.edit.bug.mp4

The problem seems to be this CSS rule:

css.classes.template.bug.mp4

@michalczaplinski
Copy link
Contributor

I will try to debug this further

@michalczaplinski
Copy link
Contributor

There are two additional considerations here:

  1. Removing the overflow on the <div class="edit-site-visual-editor is-focus-mode"> element is probably not the UX that we want. I think that the inner container is the one that should be scrolling but I'm not 100% sure.

  2. I think it's very confusing that there is a "Comments" template part as well as a "Comments" block:

    Screenshot 2022-10-19 at 14 26 06

    I would have been quite puzzled if @carolinan hadn't commented that this is actually a template part.

@michalczaplinski michalczaplinski changed the title Focus mode: Unable to scroll with comments block Focus mode: Unable to scroll when editing a template Oct 19, 2022
@carolinan
Copy link
Contributor

Pinging @mikachan in case there is time to rename the comments template part in TT3 to reduce confusion.

@annezazu annezazu moved this from Triage to Todo in WordPress 6.1 Editor Tasks Oct 19, 2022
@annezazu
Copy link
Contributor Author

Renaming this back to template part rather than template! Yes, I did see this was a template part but foolishly thought it was isolated to the Comments block implementation for some reason. Thanks for testing more to find out the deeper problem.

@annezazu annezazu changed the title Focus mode: Unable to scroll when editing a template Focus mode: Unable to scroll when editing a longer template part Oct 19, 2022
@michalczaplinski
Copy link
Contributor

I see out that the overflow: hidden was added in #43332 by @ciampo so we should not remove it. Perhaps he has an idea on how to handle this better?

I've tried fiddling with overflow and height of <iframe> of the template editor but to no avail so far.

@ciampo
Copy link
Contributor

ciampo commented Oct 20, 2022

I see out that the overflow: hidden was added in #43332 by @ciampo so we should not remove it. Perhaps he has an idea on how to handle this better?

I haven't really worked on the site editor myself, I opened that PR while working on polishing the Popover component. All I know is that overflow:hidden rule was necessary to prevent the scrolling bug highlighted in #43332.

Perhaps you may remove the overflow: hidden rule only when editing templates?

In general, regardless of the fix, let's make sure we test it extensively — these visual / layout issues are often not caught by e2e test.

@michalczaplinski michalczaplinski removed the [Block] Comments Affects the Comments Block - formerly known as Comments Query Loop label Oct 20, 2022
@michalczaplinski
Copy link
Contributor

I've added a tentative fix in #45176

Which CSS Wizard could I ping to review this to make sure it's a correct fix? 😃

@michalczaplinski
Copy link
Contributor

This should be fixed for good in #45189 now!

@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Focus Mode Zoomed in focus mode for editing things like template parts [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

6 participants