Skip to content

Commit

Permalink
Merge branch 'master' into IOAPPX-422-IOMarkdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Vangaorth authored Dec 9, 2024
2 parents c61b510 + 26d92d0 commit 7a5385b
Show file tree
Hide file tree
Showing 33 changed files with 635 additions and 159 deletions.
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,43 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.79.0-rc.4](https://github.com/pagopa/io-app/compare/2.79.0-rc.3...2.79.0-rc.4) (2024-12-06)


### Features

* **IT Wallet:** [[SIW-1852](https://pagopa.atlassian.net/browse/SIW-1852)] Hide discovery banner after close ([#6499](https://github.com/pagopa/io-app/issues/6499)) ([6d87026](https://github.com/pagopa/io-app/commit/6d870260f3cdf9ba3a3098f760b572486613d126))


### Bug Fixes

* [[IOPID-2543](https://pagopa.atlassian.net/browse/IOPID-2543)] Add logic to merge data during zendesk polling ([#6515](https://github.com/pagopa/io-app/issues/6515)) ([7e60a3c](https://github.com/pagopa/io-app/commit/7e60a3c6ab92665cc64837ddcdd178d19fd051fd))
* assistance flow actionsheet contains extra space on header ([#6513](https://github.com/pagopa/io-app/issues/6513)) ([3591b9a](https://github.com/pagopa/io-app/commit/3591b9ab0a31959e9dfd7733b04c35c4f89f342a))

## [2.79.0-rc.3](https://github.com/pagopa/io-app/compare/2.79.0-rc.2...2.79.0-rc.3) (2024-12-05)


### Features

* [[IOBP-1047](https://pagopa.atlassian.net/browse/IOBP-1047)] Add store review when a payment is completed ([#6496](https://github.com/pagopa/io-app/issues/6496)) ([a8e32df](https://github.com/pagopa/io-app/commit/a8e32df7c81690d3af396c5923d55b330704c373))


### Bug Fixes

* Status banner contains extra space on header ([#6510](https://github.com/pagopa/io-app/issues/6510)) ([bd558bd](https://github.com/pagopa/io-app/commit/bd558bdbab8ac525146e4c424f5f75376abffb6e))


### Chores

* **Cross:** [[IOAPPX-347](https://pagopa.atlassian.net/browse/IOAPPX-347)] Remove react-native-text-input-mask build phase script on iOS ([#6310](https://github.com/pagopa/io-app/issues/6310)) ([f5cf7ce](https://github.com/pagopa/io-app/commit/f5cf7ce35c936649da893514fc8420f64ecf2d70))
* **Cross:** [[IOAPPX-435](https://pagopa.atlassian.net/browse/IOAPPX-435)] Improve overall UI typography + Update `io-app-design-system` to `4.0.1` ([#6422](https://github.com/pagopa/io-app/issues/6422)) ([b9d3233](https://github.com/pagopa/io-app/commit/b9d3233500766efa207716a2e5d3bb279612b84f))
* **IT Wallet:** [[SIW-1807](https://pagopa.atlassian.net/browse/SIW-1807)] Change privacy in ITWallet Discovery ([#6506](https://github.com/pagopa/io-app/issues/6506)) ([14d6543](https://github.com/pagopa/io-app/commit/14d654319b96ff5fb901e30da0325acfd770c400))
* **IT Wallet:** [[SIW-1878](https://pagopa.atlassian.net/browse/SIW-1878)] Loader before SPID Login Webview ([#6493](https://github.com/pagopa/io-app/issues/6493)) ([4e19eaa](https://github.com/pagopa/io-app/commit/4e19eaaa9a17d64d124b46c5d360ca978af5d1bb))
* [[IOBP-1020](https://pagopa.atlassian.net/browse/IOBP-1020)] Using optimistic UI for remove payment method action ([#6446](https://github.com/pagopa/io-app/issues/6446)) ([274fa6f](https://github.com/pagopa/io-app/commit/274fa6f54608acb7207a51d37fd7f62aade12ddf))
* [[IOBP-1048](https://pagopa.atlassian.net/browse/IOBP-1048)] Delete transaction when interrupting a payment ([#6494](https://github.com/pagopa/io-app/issues/6494)) ([a94ca59](https://github.com/pagopa/io-app/commit/a94ca5950eb0450baec881da2de15261f59f2055))
* [[IOCOM-1949](https://pagopa.atlassian.net/browse/IOCOM-1949)] FIMS `iossoapi` protocol ([#6505](https://github.com/pagopa/io-app/issues/6505)) ([c963455](https://github.com/pagopa/io-app/commit/c9634553f96fdd6648b8678553931058fb9fedb6))
* [[IOPID-2405](https://pagopa.atlassian.net/browse/IOPID-2405)] Delete isNewPaymentSectionEnabledSelector and isSettingsVisibleAndHideProfileSelector ([#6498](https://github.com/pagopa/io-app/issues/6498)) ([b420196](https://github.com/pagopa/io-app/commit/b420196f936929fbd2bfc18015f62256ae680a9d))

## [2.79.0-rc.2](https://github.com/pagopa/io-app/compare/2.79.0-rc.1...2.79.0-rc.2) (2024-12-04)


Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
</p>

<p align="center">
<a href="https://github.com/pagopa/io-app/actions/workflows/test-e2e.yml">
<img src="https://github.com/pagopa/io-app/actions/workflows/test-e2e.yml/badge.svg?branch=master" />
<a href="https://github.com/pagopa/io-app/actions/workflows/release-nightly.yml">
<img src="https://github.com/pagopa/io-app/actions/workflows/release-nightly.yml/badge.svg?branch=master" />
</a>
<!-- <a href="https://github.com/pagopa/io-app/actions/workflows/test-e2e.yml">
<img src="https://github.com/pagopa/io-app/actions/workflows/test-e2e.yml/badge.svg?branch=master" />
</a> -->
<a href="https://codecov.io/gh/pagopa/io-app">
<img src="https://codecov.io/gh/pagopa/io-app/branch/master/graph/badge.svg" />
</a>
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ android {
applicationId "it.pagopa.io.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 100154885
versionName "2.79.0.2"
versionCode 100154887
versionName "2.79.0.4"
multiDexEnabled true
// The resConfigs attribute will remove all not required localized resources while building the application,
// including the localized resources from libraries.
Expand Down
4 changes: 2 additions & 2 deletions ios/ItaliaApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@
CODE_SIGN_ENTITLEMENTS = ItaliaApp/ItaliaApp.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 4;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = M2X5YQ4BJ7;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -827,7 +827,7 @@
CODE_SIGN_ENTITLEMENTS = ItaliaApp/ItaliaApp.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 4;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = M2X5YQ4BJ7;
ENABLE_BITCODE = NO;
Expand Down
2 changes: 1 addition & 1 deletion ios/ItaliaApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>2</string>
<string>4</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/ItaliaAppTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2</string>
<string>4</string>
</dict>
</plist>
9 changes: 9 additions & 0 deletions locales/en/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1427,6 +1427,15 @@ wallet:
title: Non abbiamo trovato alcun BANCOMAT Pay attivo
subtitle: "Contatta la tua Banca per attivare il servizio."
primaryAction: Chiudi
PSP_ERROR_ONBOARDING:
title: L’aggiunta del metodo non è andata a buon fine
subtitle: "Riprova più tardi. Se il problema persiste, ti invitiamo a verificare con la tua banca."
primaryAction: Chiudi
BE_KO:
title: "Stiamo riscontrando alcuni problemi con l'aggiunta del metodo"
subtitle: "Riprova più tardi."
primaryAction: Chiudi
secondaryAction: Contatta l'assistenza
alert:
supportedCardPageLinkError: An error occurred while opening the supported cards page.
msgErrorUpdateApp: "An error occurred while opening the app store"
Expand Down
9 changes: 9 additions & 0 deletions locales/it/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1427,6 +1427,15 @@ wallet:
title: Non abbiamo trovato alcun BANCOMAT Pay attivo
subtitle: "Contatta la tua Banca per attivare il servizio."
primaryAction: Chiudi
PSP_ERROR_ONBOARDING:
title: L’aggiunta del metodo non è andata a buon fine
subtitle: "Riprova più tardi. Se il problema persiste, ti invitiamo a verificare con la tua banca."
primaryAction: Chiudi
BE_KO:
title: "Stiamo riscontrando alcuni problemi con l'aggiunta del metodo"
subtitle: "Riprova più tardi."
primaryAction: Chiudi
secondaryAction: Contatta l'assistenza
alert:
supportedCardPageLinkError: Si è verificato un errore durante l'apertura della pagina di riferimento per le carte supportate.
msgErrorUpdateApp: "Si è verificato un errore durante l'apertura dello store delle app"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "italia-app",
"version": "2.79.0-rc.2",
"version": "2.79.0-rc.4",
"io_backend_api": "https://raw.githubusercontent.com/pagopa/io-backend/v16.4.0-RELEASE/api_backend.yaml",
"io_session_manager_api": "https://raw.githubusercontent.com/pagopa/io-auth-n-identity-domain/io-session-manager@1.0.0/apps/io-session-manager/api/internal.yaml",
"io_session_manager_public_api": "https://raw.githubusercontent.com/pagopa/io-auth-n-identity-domain/io-session-manager@1.0.0/apps/io-session-manager/api/public.yaml",
Expand Down
2 changes: 1 addition & 1 deletion publiccode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ releaseDate: "2024-11-21"
url: "https://github.com/pagopa/io-app"
applicationSuite: IO
landingURL: "https://io.italia.it/"
softwareVersion: 2.79.0-rc.2
softwareVersion: 2.79.0-rc.4
developmentStatus: beta
softwareType: standalone/mobile
roadmap: "https://io.italia.it/"
Expand Down
23 changes: 21 additions & 2 deletions ts/components/ui/IOScrollView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import Animated, {
} from "react-native-reanimated";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { WithTestID } from "../../types/WithTestID";
import { useStatusAlertProps } from "../../hooks/useStatusAlertProps";

export type IOScrollViewActions =
| {
Expand Down Expand Up @@ -160,6 +161,7 @@ export const IOScrollView = ({
contentContainerStyle,
testID
}: IOScrollView) => {
const alertProps = useStatusAlertProps();
const theme = useIOTheme();

/* Navigation */
Expand Down Expand Up @@ -243,6 +245,13 @@ export const IOScrollView = ({
)
}));

const ignoreSafeAreaMargin = React.useMemo(() => {
if (alertProps !== undefined) {
return true;
}
return headerConfig?.ignoreSafeAreaMargin;
}, [headerConfig?.ignoreSafeAreaMargin, alertProps]);

/* Set custom header with `react-navigation` library using
`useLayoutEffect` hook */

Expand All @@ -255,12 +264,22 @@ export const IOScrollView = ({
if (headerConfig) {
navigation.setOptions({
header: () => (
<HeaderSecondLevel {...headerConfig} scrollValues={scrollValues} />
<HeaderSecondLevel
{...headerConfig}
ignoreSafeAreaMargin={ignoreSafeAreaMargin}
scrollValues={scrollValues}
/>
),
headerTransparent: headerConfig.transparent
});
}
}, [headerConfig, navigation, scrollPositionAbsolute, snapOffset]);
}, [
headerConfig,
navigation,
scrollPositionAbsolute,
snapOffset,
ignoreSafeAreaMargin
]);

const RefreshControlComponent = refreshControlProps ? (
<RefreshControl {...refreshControlProps} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import {
trackITWalletBannerVisualized
} from "../../../analytics";
import { ITW_ROUTES } from "../../../navigation/routes";
import { useIODispatch } from "../../../../../store/hooks";
import { itwCloseDiscoveryBanner } from "../../store/actions/preferences";

/**
* to use in flows where we want to handle the banner's visibility logic externally
Expand All @@ -31,6 +33,7 @@ export const ItwDiscoveryBanner = ({
handleOnClose
}: ItwDiscoveryBannerProps) => {
const bannerRef = React.createRef<View>();
const dispatch = useIODispatch();

const navigation = useIONavigation();
const route = useRoute();
Expand All @@ -56,6 +59,7 @@ export const ItwDiscoveryBanner = ({
const handleClose = () => {
trackItWalletBannerClosure(trackBannerProperties);
handleOnClose?.();
dispatch(itwCloseDiscoveryBanner());
};

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,52 +1,32 @@
import React, { ReactElement } from "react";
import { View } from "react-native";
import React from "react";
import { StyleSheet, View } from "react-native";
import { useIOSelector } from "../../../../../store/hooks";
import { isItwDiscoveryBannerRenderableSelector } from "../../store/selectors";
import {
ItwDiscoveryBanner,
ItwDiscoveryBannerProps
} from "./ItwDiscoveryBanner";

type Props = Omit<ItwDiscoveryBannerProps, "handleOnClose"> & {
fallbackComponent?: ReactElement;
};
import { ItwDiscoveryBanner } from "./ItwDiscoveryBanner";

/**
* to use in flows where either
* - we need a fallback component
* - we do not want to handle the banner's visibility logic externally
* (see MultiBanner feature for the landing screen)
* to use in flows where we do not want to handle the banner's visibility logic externally
* (see MultiBanner feature for the landing screen)
*/
export const ItwDiscoveryBannerStandalone = (props: Props) => {
const [isVisible, setVisible] = React.useState(true);

export const ItwDiscoveryBannerStandalone = () => {
const isBannerRenderable = useIOSelector(
isItwDiscoveryBannerRenderableSelector
);

const shouldBeHidden = React.useMemo(
() =>
// Banner should be hidden if:
!isVisible || // The user closed it by pressing the `x` button
!isBannerRenderable, // the various validity checks fail
[isBannerRenderable, isVisible]
);

if (shouldBeHidden) {
const { fallbackComponent } = props;
if (fallbackComponent) {
return fallbackComponent;
}
if (!isBannerRenderable) {
return null;
}

return (
<View style={{ marginTop: 16, marginBottom: 8 }}>
<ItwDiscoveryBanner
ignoreMargins={true}
handleOnClose={() => setVisible(false)}
{...props}
/>
<View style={styles.wrapper}>
<ItwDiscoveryBanner ignoreMargins={true} closable={false} />
</View>
);
};

const styles = StyleSheet.create({
wrapper: {
marginTop: 16,
marginBottom: 8
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ type RenderOptions = {
isItwEnabled?: boolean;
};

jest.mock("../../../../../../config", () => ({
itwEnabled: true
}));

describe("ItwDiscoveryBanner", () => {
const globalState = appReducer(undefined, applicationChangeState("active"));
const component = renderScreenWithNavigationStoreContext<GlobalState>(
Expand Down
8 changes: 7 additions & 1 deletion ts/features/itwallet/common/store/actions/preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ export const itwCloseFeedbackBanner = createStandardAction(
"ITW_CLOSE_FEEDBACK_BANNER"
)();

export type ItwPreferencesActions = ActionType<typeof itwCloseFeedbackBanner>;
export const itwCloseDiscoveryBanner = createStandardAction(
"ITW_CLOSE_DISCOVERY_BANNER"
)();

export type ItwPreferencesActions =
| ActionType<typeof itwCloseFeedbackBanner>
| ActionType<typeof itwCloseDiscoveryBanner>;
14 changes: 13 additions & 1 deletion ts/features/itwallet/common/store/reducers/preferences.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { addMonths } from "date-fns";
import { getType } from "typesafe-actions";
import { Action } from "../../../../../store/actions/types";
import { itwCloseFeedbackBanner } from "../actions/preferences";
import {
itwCloseDiscoveryBanner,
itwCloseFeedbackBanner
} from "../actions/preferences";

export type ItwPreferencesState = {
hideFeedbackBannerUntilDate?: string;
hideDiscoveryBannerUntilDate?: string;
};

const INITIAL_STATE: ItwPreferencesState = {};
Expand All @@ -16,10 +20,18 @@ const reducer = (
switch (action.type) {
case getType(itwCloseFeedbackBanner): {
return {
...state,
hideFeedbackBannerUntilDate: addMonths(new Date(), 1).toISOString()
};
}

case getType(itwCloseDiscoveryBanner): {
return {
...state,
hideDiscoveryBannerUntilDate: addMonths(new Date(), 6).toISOString()
};
}

default:
return state;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { addDays, addMonths } from "date-fns";
import _ from "lodash";
import { applicationChangeState } from "../../../../../../store/actions/application";
import { appReducer } from "../../../../../../store/reducers";
import { itwIsFeedbackBannerHiddenSelector } from "../preferences";
import {
itwIsDiscoveryBannerHiddenSelector,
itwIsFeedbackBannerHiddenSelector
} from "../preferences";

describe("itwIsFeedbackBannerHiddenSelector", () => {
it.each([
Expand All @@ -24,3 +27,23 @@ describe("itwIsFeedbackBannerHiddenSelector", () => {
).toBe(expected);
});
});

describe("itwIsDiscoveryBannerHiddenSelector", () => {
it.each([
[false, undefined],
[false, "definitely not a date"],
[false, new Date().toISOString()],
[false, addDays(new Date(), -2).toISOString()],
[true, addMonths(new Date(), 2).toISOString()]
])("should return %p if banner is hidden until %p", (expected, value) => {
const globalState = appReducer(undefined, applicationChangeState("active"));

expect(
itwIsDiscoveryBannerHiddenSelector(
_.set(globalState, "features.itWallet.preferences", {
hideDiscoveryBannerUntilDate: value
})
)
).toBe(expected);
});
});
Loading

0 comments on commit 7a5385b

Please sign in to comment.