-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix/100vh #134
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…so fixes issue with list header flying off on scroll
…S; was addressed by adding RootLayout to tailwind path
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
cc @trushmi @Gome510 @truham @mvyenielo in case you are actively reviewing FE nowadays |
This was referenced May 28, 2024
BeeSeeWhy
approved these changes
May 29, 2024
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.
looks good
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes the issue with the bottom of the page being covered by browser UI in eg mobile Safari.
The bug is that
100vh
doesn't play well with dynamic browser UI popping. This is especially apparent on mobile Safari, when the controls appear at the bottom and obscure parts of the page.The fix is to use
100dvh
instead and fall back to100vh
*, which can be seen in the array value of each custom class named[min]-h-*svh
. These ustom classes are introduced viaplugin()
in the Tailwind config (instead of directly in thetheme.extend
, which throws build-time errors when we attempt to use an array of values).This PR also:
npm run dev
in development mode (for easier debugging on actual devices if on same network)RootLayout.tsx
folder to tailwind config for proper processing (and fixes minor issue with text not appearing for desktop breakpoint).css
files asTailwind CSS
in VSCode for this project for proper language supportBefore:
After:
(see Preview for live version, linked below as "Visit Preview", to check for fixes/regressions)
Closes #128
*after discussing w/@francisli, it sounds like
svh
was broken in mobile Safari up until the iOS 17.4 release on March 7, 2024; this means that this fix will reach most users, but we should be aware of whom it won't reach:If we need to also support older the users above, we can refer to the JS library mentioned in #128; its usage is demonstrated in another SF Civic Tech project here: sfbrigade/bats-server@2983c10 (we can investigate how to use it as a JS polyfill)