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

Edit Post: Fix sidebar scroll overflow. #18810

Closed
wants to merge 3 commits into from

Conversation

epiqueras
Copy link
Contributor

Description

A combination of #17926 and #18044 broke the block inspector controls sidebar scrolling behavior. The sidebar content covered the header when scrolling and on mobile it did not scroll at all.

This PR fixes the issues.

How to test this?

Check that scrolling the sidebar works as expected on all screen sizes and that the header sticks to the top like it should.

Types of Changes

Bug Fix: Fix sidebar scroll overflow issues.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR. .

@epiqueras epiqueras added [Type] Bug An existing feature does not function as intended [Package] Edit Post /packages/edit-post labels Nov 28, 2019
@epiqueras epiqueras added this to the Future milestone Nov 28, 2019
@epiqueras epiqueras self-assigned this Nov 28, 2019
@@ -54,6 +54,7 @@
bottom: 0;
left: 0;
background: $white;
overflow: auto;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhh, now I get it now!

While this seems to fix the issue if you test on the browser, there's a weird issue in Safari iOS (specially old versions) where the only scrollable element should be the html element otherwise the sticky behavior doesn't work properly.

I think the fix should be to make sure the html height increases with the sidebar allowing it to scroll. This also might make the z-index fix for the sidebar header unecessary.

Anyway this is a complex topic that only @jasmussen understands properly :P so I'd prefer to wait for his feedback. He also has this PR open that I think is related #18686

@epiqueras
Copy link
Contributor Author

cc @jasmussen

@jasmussen
Copy link
Contributor

How embarrassing that I missed the ping the first time, my apologies, and thank you for the re-sping. Always feel free to send me a reminder on stuff like this, it's much appreciated.

I took a look now, and I think we need a good solid rebase before we can make a final decision, because since this PR, #18686 has been merged which forces the toolbar to the top on mobile.

Some quick tests, though. Master on mobile:

master mobile

Master on desktop:

master sidebar scroll

Master on ios:

ios master

After:

after

after mobile

As far as I can see, the problem this PR intended to solve is no longer an issue, but I may be missing some nuance.

I recall Riad and I having some confusion about the decision to always show the tabs sticky fixed at the top of the sidebar, this PR does appear to make that more consistent, which if it has value could be the purpose of the PR. But we can probably revisit after the rebase.

@epiqueras epiqueras force-pushed the fix/sidebar-scroll-overflow branch from a2232d2 to d009bb1 Compare January 21, 2020 11:58
@epiqueras
Copy link
Contributor Author

No worries.

Yeah, it looks like most of the issues were fixed. I do think there is some value in the sticky header consistency. This PR still fixes that after the rebase, but there might be a better way of doing it now.

@jasmussen
Copy link
Contributor

I have no strong opinion one way or the other whether the header should be fixed. Code seems alright to me.

In #18667 a new UI is being explored, but I suspect the tabs might benefit similar to how these might. Have you tested this in Edge or Windows? It's okay to disable the sticky for those browsers, it just can't be unusable.

@epiqueras
Copy link
Contributor Author

I have no strong opinion one way or the other whether the header should be fixed. Code seems alright to me.

Don't you find it beneficial to be able to switch between tabs without having to scroll back up?

@jasmussen
Copy link
Contributor

Don't you find it beneficial to be able to switch between tabs without having to scroll back up?

It never bothered me, but I also wouldn't mind it being reapplied! 👍 👍 from me.

@epiqueras
Copy link
Contributor Author

@mapk @youknowriad @aduth Thoughts?

1 similar comment
@epiqueras
Copy link
Contributor Author

@mapk @youknowriad @aduth Thoughts?

@jasmussen
Copy link
Contributor

Throw in a fix for the recent Firefox issue and I'll approve this one 😅

@epiqueras
Copy link
Contributor Author

What is the issue?

@jasmussen
Copy link
Contributor

This one: #20206

@epiqueras
Copy link
Contributor Author

That seems unrelated.

@epiqueras
Copy link
Contributor Author

Looks like this was fixed elsewhere.

@epiqueras epiqueras closed this Jun 5, 2020
@youknowriad youknowriad deleted the fix/sidebar-scroll-overflow branch June 5, 2020 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Edit Post /packages/edit-post [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants