-
Notifications
You must be signed in to change notification settings - Fork 107
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
chore(Cross): [IOAPPX-307] Add useScreenEndMargin
hook
#5808
Conversation
useScreenEndMargin
hookuseScreenEndMargin
hook
Affected stories
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5808 +/- ##
==========================================
+ Coverage 48.42% 50.04% +1.61%
==========================================
Files 1488 1646 +158
Lines 31617 32611 +994
Branches 7669 7925 +256
==========================================
+ Hits 15311 16320 +1009
+ Misses 16238 16233 -5
+ Partials 68 58 -10
... and 634 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
## Short description This PR removes the `VDivider` and `EndOfPage` components. The former because it wasn't used. The latter because it's replaced by the `useScreenEndMargin` hook or space already managed by `FooterActions` or `IOScrollView`. ## List of changes proposed in this pull request - Remove mentioned components - Update example app and Storybook docs accordingly ## Related PRs Here are the PRs for the components listed above: - pagopa/io-app#5808 - pagopa/io-app#5787 - pagopa/io-app#5704
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
Short description
This PR adds the new
useScreenEndMargin
, a specific hook to use when you have to develop a new screen and you want to get a safe numeric value to set aspaddingBottom
for theScrollView
. This hook automatically takes into account each device configuration (devices with safe area boundaries and devices without)This should also help to prevent the inclusion of
SafeAreaView
(or similar) which results in a white block at the corresponding bottom safe area (see image below):Note
To learn more about the technical details, take a look at the hook file and its comments
Important
If you already use
FooterActions
orIOScrollView
you don't need this hook because the end margin is already taken into accountList of changes proposed in this pull request
useScreenEndMargin
hookuseMemo
inIOScrollView
andFooterActions
How to test