-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Navigator: Remove overflow styles from NavigatorScreen #44973
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
The sticky behavior seems to work well when testing on a small window size with the preference mode ( I don't see a different when compared to the trunk).
Excuse my tardiness on this. I'm not seeing a good reason to remove these rules. While I wouldn't say they are crucial, they are meant to safeguard and facilitate third-party use of the component. Their introduction stemmed from this concern of unreachable content from #35317 (comment)
Removing these rules did break the part of the With regards to the clipping issue:
The way to avoid that is putting the padding inside the screen (Example) That would have been the easy fix for clipped focus indicators in #44770. (I say would have because it no longer seems to be relevant as I cannot see that So I'm voting to revert this but only if the components folks @mirka and @ciampo still think the rules are worthwhile. |
The navigator usage moved to this PR #45100 |
Thanks for the link to that PR. I've left some feedback on it #45100 (comment) that might help clarify why it makes sense to always keep the padding on the inside of the component. It's also worth noting that even with these rules removed that PR still exhibits the clipped focus indicators because While I agree with the idea of the component having minimal opinions on design I think these rules follow from the big opinion it does have—that the screens animate horizontally. Now after all that I've realized there is one way we could remove all overflow rules from these components. That would be to leave it up to implementors to wrap them within a container that has |
I can confirm that I can spot this regression too.
Allowing overflow IMO is not really an opinionated design choice, but we may indeed argue if we should expect the consumer of More in general, I just wanted to point out that this PR originated from my request to split |
I'm happy to revert this PR if you all think it's the way to go.
I'm very uneasy with this kind of comment. I really don't agree that 4 hours is "rushing" for a small PR like this. Sure regressions can happen and reverting is very easy, we just need to be responsible for follow-ups but I'm very uneasy with gate keeping. |
First of all, I'm sorry if my comment made you feel uneasy — it was definitely not my intention. From my point of view, it's really not about the size of the PR, but more about allowing folks directly involved (@stokesman and myself) to chime in with their opinion and review the PR. 4 hours isn't a long time, considering that we may have to take care of other high-priority tasks first, be based in another timezone (like Mitchell is) or simply we could have an unexpected matter to attend. Ultimately I believe that my previous comment was trying to avoid gate-keeping in the first place, by expressing the need for more discussion before merging.
If the purpose of the PR was to prevent clipping on the focus indicators, I still believe that the problem is not addressed. As @stokesman points out, the main cause for this is probably gutenberg/packages/components/src/navigator/navigator-provider/component.tsx Lines 86 to 87 in 6bc1ec5
Those styles would be more problematic to remove, since they prevent scrollbars from showing during a transition (see #34904 (review)). The simpler way to avoid clipping, as Mitchell points out, is to add padding to the contents of Regarding the
What do folks think? |
Extracted from #44770
What?
This PR reverts a change introduced in #35518 This code has been introduced to make sure sticky positioning work inside the navigation screens. In my testing (fortunately, we have a storybook story to confirm the behavior), the intended sticky behavior is still working and the "overflow" rule was causing issues for "focus styles" of buttons that may appear at the edge of screens. They would appear cut.
Testing Instructions
1- Confirm the sticky behavior still works in the "preferences modal" on mobile