Closed fwextensions closed 2 years ago
This CSS works when the window is narrow and the UI is the full width of the viewport. But it still needs some tweaking when there is padding on either side, due to the position: fixed
being relative to the viewport.
Okay, the CSS should now work in all cases. @francisli can you review?
Issues with iOS mobile Safari related to this: https://lukechannings.com/blog/2021-06-09-does-safari-15-fix-the-vh-bug/
Yes, it's basically impossible to reliably stick something to the bottom on mobile, due to the auto-hiding top/bottom bars. There are new CSS units that are coming someday that should improve the situation...
Anyway, I don't think this modal bottom design is the way to go anyway, so it'll hopefully be replaced.
Adding a class to the HTML element, outside of the React tree, doesn't feel great, but it's the only way to stop the body from scrolling while the overlay is open. I think a redesign of the incoming ringdown UI won't require this modal takeover, so this is an okay solution for now.
Before
The incoming ringdown UI is stuck to the bottom of the list, which can be off-screen when there are enough ringdowns.
After
The UI is stuck to the bottom of the viewport, not the body content.
The overlay will scroll if needed: