-
Notifications
You must be signed in to change notification settings - Fork 106
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-300] Add FooterActions
that replaces FooterWithButtons
#5787
Conversation
FooterActions
that replaces FooterWithButtons
FooterActions
that replaces FooterWithButtons
Affected stories
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5787 +/- ##
==========================================
+ Coverage 48.42% 49.40% +0.98%
==========================================
Files 1488 1627 +139
Lines 31617 32427 +810
Branches 7669 7795 +126
==========================================
+ Hits 15311 16022 +711
- Misses 16238 16351 +113
+ Partials 68 54 -14
... and 545 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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! Works great on both iOS and Android devices
## 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
…5811) ## Short description This PR adds the new `useFooterActionsMeasurements` hook to avoid code repetition when using the `FooterActions` component, introduced by the following PR: - #5787 ## List of changes proposed in this pull request - Add the new `useFooterActionsMeasurements` hook - Update code in `DSFooterActions` and `TransactionSummaryScreen` to delete repeated code ## How to test N/A
Description
This PR adds the new
FooterActions
component which completely replaces the legacyFooterWithButtons
. The new component is designed to work flawlessly in different scenarios:fixed
prop set tofalse
)Important
The component also returns two values:
actionBlockHeight
(the height of the block containing actions) andsafeBottomAreaHeight
(the height of the entire block, including the bottom content margin). The latter must be applied to the ScrollView asbottomPadding
value to ensure that the content is not hidden underneath it. Based on the button configuration, this value is dynamically adjusted.Last but not least, the component also accepts two different
animatedStyles
(main component and relative background) if you need to set custom transitions using thereanimated
library (advanced use). If you want to see an example, check out the Sticky behaviourNote
After an initial testing period, the component will be removed from this codebase and included in the
io-app-design-system
package.List of changes proposed in this pull request
FooterActions
componentDebug
section (DS)debugMode
that shows opaque red background and total height of the componentIOScrollView
screens fromScreens
toDebug
(DS)ui
components folderIOScrollView
componentPreview
footer-actions-default.mp4
footer-actions-not-fixed.mp4
footer-actions-sticky.mp4
How to test