Skip to content
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-357] Upgrade @gorhom/bottom-sheet library #6062

Open
wants to merge 47 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
dd11650
[IOAPPX-357] Upgrades bottom-sheets library
CrisTofani Jul 29, 2024
9e6b0f1
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Jul 29, 2024
adaf0f6
removes patch
CrisTofani Jul 29, 2024
815a7c3
Merge branch 'IOAPPX-357-upgrade-bs-lib' of github.com:pagopa/io-app …
CrisTofani Jul 29, 2024
56d03d2
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Jul 29, 2024
c67b3d4
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
dmnplb Jul 30, 2024
a8d75a5
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Aug 1, 2024
c941b96
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Aug 2, 2024
163e02c
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Aug 2, 2024
1b2f5f4
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Aug 2, 2024
90ffe9b
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Aug 5, 2024
4e1c3c5
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
dmnplb Aug 6, 2024
6b63e18
Update `jest` snapshots
dmnplb Aug 6, 2024
a7ad727
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Aug 7, 2024
96e589b
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Aug 29, 2024
e9f68b4
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Aug 29, 2024
9daa036
Merge branch 'master', remote-tracking branch 'origin/HEAD' into IOAP…
CrisTofani Oct 17, 2024
083a792
Upgrade bottom-sheet lib to v5
CrisTofani Oct 17, 2024
edaca13
minor fixes
CrisTofani Oct 17, 2024
ae14238
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Oct 22, 2024
bc2117e
fixes tests
CrisTofani Oct 22, 2024
f04fea9
fix: [IOBP-900] Remove parenthesis from tax code in payment screen (…
LeleDallas Oct 22, 2024
2e4a696
feat: [IOBP-834] Add pull to refresh into transactions list screen (#…
Hantex9 Oct 22, 2024
5af3ad0
fix: [IOBP-901] Missing header in payment methods (#6318)
LeleDallas Oct 22, 2024
5c6bf7c
feat: [IOBP-930] Remove payments redirect banner from wallet (#6316)
LeleDallas Oct 22, 2024
ccea0f2
fix: [PE-725] CGN merchant categories list details transition header …
LeleDallas Oct 23, 2024
43dfca2
refactor: bottom sheet
LazyAfternoons Oct 23, 2024
6c8e555
removes autoresizable modal and refactoring
CrisTofani Oct 23, 2024
f0c84c0
chore: unwanted change
LazyAfternoons Oct 23, 2024
a4d1d65
removes legacy bottom sheet
CrisTofani Oct 24, 2024
cd042cd
Merge branch 'IOAPPX-357-upgrade-bs-lib' of github.com:pagopa/io-app …
CrisTofani Oct 24, 2024
34f9c41
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Oct 24, 2024
b51b9c5
blocks overscroll on bs scrollview
CrisTofani Oct 24, 2024
41c4ac6
updates snaps
CrisTofani Oct 24, 2024
57f6ea7
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Nov 6, 2024
b31cbe6
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Nov 7, 2024
773a597
fixes
CrisTofani Nov 7, 2024
437c5c6
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Nov 8, 2024
3715738
Merge remote-tracking branch 'origin/master' into IOAPPX-357-upgrade-…
CrisTofani Nov 21, 2024
b55d313
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Nov 21, 2024
7cecc26
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Nov 21, 2024
bc51349
Merge branch 'master' into IOAPPX-357-upgrade-bs-lib
CrisTofani Nov 22, 2024
d6c2cf9
Merge remote-tracking branch 'origin/master' into IOAPPX-357-upgrade-…
CrisTofani Nov 25, 2024
caba7c5
Merge remote-tracking branch 'origin/master' into IOAPPX-357-upgrade-…
CrisTofani Dec 5, 2024
533d478
fixes snaps
CrisTofani Dec 5, 2024
31ffc89
Merge remote-tracking branch 'origin/master' into IOAPPX-357-upgrade-…
CrisTofani Dec 16, 2024
48ad5cd
Merge remote-tracking branch 'origin/master' into IOAPPX-357-upgrade-…
CrisTofani Dec 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
]
},
"dependencies": {
"@gorhom/bottom-sheet": "^4.1.5",
"@babel/plugin-transform-regenerator": "^7.18.6",
"@gorhom/bottom-sheet": "^5.0.4",
"@pagopa/io-app-design-system": "4.3.0",
"@pagopa/io-pagopa-commons": "^3.1.0",
"@pagopa/io-react-native-cieid": "^0.3.5",
Expand Down
10 changes: 0 additions & 10 deletions patches/patches.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ Created on **16/03/2024**
#### Reason:
- Make PDF annotations on iOS read-only to align with Android behaviour.

### react-native-vision-camera+2.15.4
Created on **24/07/2023**
FIXME: remove this patch after this [PR](https://github.com/mrousavy/react-native-vision-camera/pull/1666) has been merged and a new vision camera version has been released.

Updated on **01/10/2023**
FIXME: Fixed in the v2 branch [here](https://github.com/mrousavy/react-native-vision-camera/issues/1840#issuecomment-1741734963). Remove this patch when `v2.16.2` has been released.

#### Reason:
- This patch going to remove all codes related to `colorSpace` to fix an issue on iOS 17.0.2 that cause the crash on camera load

### react-native-device-info+8.3.3
Created on **15/12/2021**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import I18n from "../../../i18n";
import { BulletList } from "../../BulletList";
import { useIOBottomSheetAutoresizableModal } from "../../../utils/hooks/bottomSheet";
import { useIOBottomSheetModal } from "../../../utils/hooks/bottomSheet";

const BottomSheetContent = memo(() => {
const { bottom } = useSafeAreaInsets();
Expand Down Expand Up @@ -33,7 +33,7 @@ const BottomSheetContent = memo(() => {
});

export default () =>
useIOBottomSheetAutoresizableModal({
useIOBottomSheetModal({
title: I18n.t("onboarding.pin.policy.title"),
component: <BottomSheetContent />
});
4 changes: 2 additions & 2 deletions ts/features/barcode/hooks/useIOBarcodeFileReader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
IOStackNavigationProp
} from "../../../navigation/params/AppParamsList";
import ROUTES from "../../../navigation/routes";
import { useIOBottomSheetAutoresizableModal } from "../../../utils/hooks/bottomSheet";
import { useIOBottomSheetModal } from "../../../utils/hooks/bottomSheet";
import { requestMediaPermission } from "../../../utils/permission";
import {
BarcodeAnalyticsFlow,
Expand Down Expand Up @@ -273,7 +273,7 @@ const useIOBarcodeFileReader = ({
</View>
);

const filePickerModal = useIOBottomSheetAutoresizableModal({
const filePickerModal = useIOBottomSheetModal({
component: filePickerModalComponent,
title: "",
onDismiss: () => setFilePickerVisible(false)
Expand Down
4 changes: 2 additions & 2 deletions ts/features/barcode/screens/BarcodeScanScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
isIdPayEnabledSelector
} from "../../../store/reducers/backendStatus/remoteConfig";
import { emptyContextualHelp } from "../../../utils/emptyContextualHelp";
import { useIOBottomSheetAutoresizableModal } from "../../../utils/hooks/bottomSheet";
import { useIOBottomSheetModal } from "../../../utils/hooks/bottomSheet";
import { IdPayPaymentRoutes } from "../../idpay/payment/navigation/routes";
import { PaymentsCheckoutRoutes } from "../../payments/checkout/navigation/routes";
import * as analytics from "../analytics";
Expand Down Expand Up @@ -206,7 +206,7 @@ const BarcodeScanScreen = () => {
</View>
);

const manualInputModal = useIOBottomSheetAutoresizableModal({
const manualInputModal = useIOBottomSheetModal({
component: manualInputModalComponent,
title: ""
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from "react";
import { ButtonOutline, VSpacer, IOToast } from "@pagopa/io-app-design-system";
import LegacyMarkdown from "../../../../../../components/ui/Markdown/LegacyMarkdown";
import I18n from "../../../../../../i18n";
import { useIOBottomSheetAutoresizableModal } from "../../../../../../utils/hooks/bottomSheet";
import { useIOBottomSheetModal } from "../../../../../../utils/hooks/bottomSheet";
import { openWebUrl } from "../../../../../../utils/url";
import { EYCA_WEBSITE_BASE_URL } from "../../../utils/constants";

Expand Down Expand Up @@ -39,7 +39,7 @@ const EycaInformationComponent: React.FunctionComponent = () => {
};

export const useEycaInformationBottomSheet = () =>
useIOBottomSheetAutoresizableModal({
useIOBottomSheetModal({
component: <EycaInformationComponent />,
title: I18n.t("bonus.cgn.detail.status.eycaBottomSheetTitle")
});
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import I18n from "../../../../../i18n";
import { IOStackNavigationProp } from "../../../../../navigation/params/AppParamsList";
import { useIODispatch, useIOSelector } from "../../../../../store/hooks";
import { isDesignSystemEnabledSelector } from "../../../../../store/reducers/persistedPreferences";
import { useIOBottomSheetAutoresizableModal } from "../../../../../utils/hooks/bottomSheet";
import { useIOBottomSheetModal } from "../../../../../utils/hooks/bottomSheet";
import { CgnDetailsParamsList } from "../../navigation/params";
import CGN_ROUTES from "../../navigation/routes";
import { cgnCategories } from "../../store/actions/categories";
Expand All @@ -40,8 +40,7 @@ export const CgnMerchantCategoriesListScreen = () => {
IOStackNavigationProp<CgnDetailsParamsList, "CGN_MERCHANTS_CATEGORIES">
>();

const { present, bottomSheet } = useIOBottomSheetAutoresizableModal({
fullScreen: true,
const { present, bottomSheet } = useIOBottomSheetModal({
title: I18n.t("bonus.cgn.merchantsList.categoriesList.bottomSheet.title"),
component: (
<View style={{ paddingBottom: insets.bottom }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -784,9 +784,9 @@ exports[`CiePinWizard Should match the snapshot 1`] = `
</View>
</View>
<RCTScrollView
overScrollMode="never"
style={
{
"flex": 1,
"paddingHorizontal": 24,
}
}
Expand Down Expand Up @@ -1123,6 +1123,13 @@ exports[`CiePinWizard Should match the snapshot 1`] = `
</Text>
</View>
</View>
<View
style={
{
"height": undefined,
}
}
/>
</View>
</RCTScrollView>
</View>
Expand Down
100 changes: 21 additions & 79 deletions ts/features/design-system/core/DSBottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ import {
} from "@pagopa/io-app-design-system";
import * as React from "react";
import { SafeAreaView, View } from "react-native";
import {
useIOBottomSheetAutoresizableModal,
useIOBottomSheetModal,
useLegacyIOBottomSheetModal
} from "../../../utils/hooks/bottomSheet";
import { useIOBottomSheetModal } from "../../../utils/hooks/bottomSheet";
import { DesignSystemScreen } from "../components/DesignSystemScreen";
import DESIGN_SYSTEM_ROUTES from "../navigation/routes";

Expand All @@ -29,8 +25,6 @@ export const DSBottomSheet = () => {
dismissAutoresizableBottomSheetWithFooter();
dismissVeryLongAutoresizableBottomSheetWithFooter();
dismissVeryLongAutoresizableBottomSheetWithFooterFullScreen();
dismissLegacyBottomSheet();
dismissLegacyBottomSheetWithFooter();
};

const defaultFooter = (
Expand All @@ -42,7 +36,6 @@ export const DSBottomSheet = () => {
label={"Dismiss bottom sheet"}
onPress={handlePressDismiss}
/>
<VSpacer size={16} />
</ContentWrapper>
);

Expand Down Expand Up @@ -94,7 +87,7 @@ export const DSBottomSheet = () => {
present: presentAutoresizableBottomSheet,
bottomSheet: autoResizableBottomSheet,
dismiss: dismissAutoresizableBottomSheet
} = useIOBottomSheetAutoresizableModal({
} = useIOBottomSheetModal({
title: "Autoresizable Bottom Sheet",
component: <BottomSheetLongContentBody />
});
Expand All @@ -104,14 +97,11 @@ export const DSBottomSheet = () => {
present: presentAutoresizableBottomSheetWithFooter,
bottomSheet: autoResizableBottomSheetWithFooter,
dismiss: dismissAutoresizableBottomSheetWithFooter
} = useIOBottomSheetAutoresizableModal(
{
title: "Autoresizable Bottom Sheet",
component: <BottomSheetLongContentBody />,
footer: defaultFooter
},
150
);
} = useIOBottomSheetModal({
title: "Autoresizable Bottom Sheet",
component: <BottomSheetLongContentBody />,
footer: defaultFooter
});

// Static bottom sheet hook
const {
Expand Down Expand Up @@ -141,53 +131,25 @@ export const DSBottomSheet = () => {
present: presentVeryLongAutoresizableBottomSheetWithFooter,
bottomSheet: veryLongAutoResizableBottomSheetWithFooter,
dismiss: dismissVeryLongAutoresizableBottomSheetWithFooter
} = useIOBottomSheetAutoresizableModal(
{
title: "Autoresizable Bottom Sheet",
component: <BottomSheetVeryLongContentBody />,
footer: defaultFooter
},
80
);
} = useIOBottomSheetModal({
title: "Autoresizable Bottom Sheet",
component: <BottomSheetVeryLongContentBody />,
footer: defaultFooter
});

const {
present: presentVeryLongAutoresizableBottomSheetWithFooterFullScreen,
bottomSheet: veryLongAutoResizableBottomSheetWithFooterFullScreen,
dismiss: dismissVeryLongAutoresizableBottomSheetWithFooterFullScreen
} = useIOBottomSheetAutoresizableModal(
{
title: "Autoresizable Bottom Sheet, Full Screen",
component: (
<SafeAreaView>
<BottomSheetVeryLongContentBody />
</SafeAreaView>
),
footer: defaultFooter,
fullScreen: true
},
80
);

const {
present: presentLegacyBottomSheet,
bottomSheet: legacyBottomSheet,
dismiss: dismissLegacyBottomSheet
} = useLegacyIOBottomSheetModal(
<BottomSheetContentBody />,
"Legacy Bottom Sheet",
250
);

const {
present: presentLegacyBottomSheetWithFooter,
bottomSheet: legacyBottomSheetWithFooter,
dismiss: dismissLegacyBottomSheetWithFooter
} = useLegacyIOBottomSheetModal(
<BottomSheetContentBody />,
"Legacy Bottom Sheet with footer",
400,
defaultFooter
);
} = useIOBottomSheetModal({
title: "Autoresizable Bottom Sheet, Full Screen",
component: (
<SafeAreaView>
<BottomSheetVeryLongContentBody />
</SafeAreaView>
),
footer: defaultFooter
});

const sectionTitleMargin = 16;
const blockMargin = 48;
Expand Down Expand Up @@ -245,32 +207,12 @@ export const DSBottomSheet = () => {
/>
</View>
</VStack>

<VStack space={sectionTitleMargin}>
<H4 color={theme["textHeading-default"]}>Legacy</H4>

<View>
<ListItemNav
value="Legacy bottom sheet"
accessibilityLabel="Legacy bottom sheet"
onPress={presentLegacyBottomSheet}
/>
<Divider />
<ListItemNav
value="Legacy bottom sheet with footer"
accessibilityLabel="Legacy bottom sheet with footer"
onPress={presentLegacyBottomSheetWithFooter}
/>
</View>
</VStack>
{staticBottomSheet}
{staticBottomSheetWithFooter}
{autoResizableBottomSheet}
{autoResizableBottomSheetWithFooter}
{veryLongAutoResizableBottomSheetWithFooter}
{veryLongAutoResizableBottomSheetWithFooterFullScreen}
{legacyBottomSheet}
{legacyBottomSheetWithFooter}
</VStack>
</DesignSystemScreen>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { View } from "react-native";
import { FeatureInfo, H4, VSpacer } from "@pagopa/io-app-design-system";
import {
IOBottomSheetModal,
useIOBottomSheetAutoresizableModal
useIOBottomSheetModal
} from "../../../../utils/hooks/bottomSheet";
import I18n from "../../../../i18n";

Expand Down Expand Up @@ -32,7 +32,7 @@ const useIdPayInfoCieBottomSheet = (): IOBottomSheetModal => {
</View>
);

const modal = useIOBottomSheetAutoresizableModal({
const modal = useIOBottomSheetModal({
component: getModalContent(),
title: <H4>{I18n.t("idpay.initiative.cie.bottomSheet.title")}</H4>
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { IOStyles } from "../../../../components/core/variables/IOStyles";
import BaseScreenComponent from "../../../../components/screens/BaseScreenComponent";
import I18n from "../../../../i18n";
import { emptyContextualHelp } from "../../../../utils/emptyContextualHelp";
import { useIOBottomSheetAutoresizableModal } from "../../../../utils/hooks/bottomSheet";
import { useIOBottomSheetModal } from "../../../../utils/hooks/bottomSheet";
import { IdPayConfigurationMachineContext } from "../machine/provider";

export const IbanConfigurationLanding = () => {
Expand All @@ -22,28 +22,25 @@ export const IbanConfigurationLanding = () => {

const customGoBack = () => machine.send({ type: "back" });

const { bottomSheet, dismiss, present } = useIOBottomSheetAutoresizableModal(
{
title: I18n.t("idpay.configuration.iban.landing.modal.title"),
component: (
<Body>{I18n.t("idpay.configuration.iban.landing.modal.content")}</Body>
),
footer: (
<ContentWrapper>
<ButtonSolid
label={I18n.t("idpay.configuration.iban.landing.modal.button")}
accessibilityLabel={I18n.t(
"idpay.configuration.iban.landing.modal.button"
)}
onPress={() => dismiss()}
fullWidth={true}
/>
<VSpacer size={32} />
</ContentWrapper>
)
},
130
);
const { bottomSheet, dismiss, present } = useIOBottomSheetModal({
title: I18n.t("idpay.configuration.iban.landing.modal.title"),
component: (
<Body>{I18n.t("idpay.configuration.iban.landing.modal.content")}</Body>
),
footer: (
<ContentWrapper>
<ButtonSolid
label={I18n.t("idpay.configuration.iban.landing.modal.button")}
accessibilityLabel={I18n.t(
"idpay.configuration.iban.landing.modal.button"
)}
onPress={() => dismiss()}
fullWidth={true}
/>
<VSpacer size={32} />
</ContentWrapper>
)
});

return (
<BaseScreenComponent
Expand Down
Loading
Loading