Skip to content

Commit

Permalink
Merge branch 'master' into IOBP-1163-fix-header-screen-reader
Browse files Browse the repository at this point in the history
  • Loading branch information
Hantex9 authored Feb 13, 2025
2 parents a789bf3 + 6e60dc2 commit 70f9dd1
Show file tree
Hide file tree
Showing 22 changed files with 117 additions and 43 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

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.83.0-rc.1](https://github.com/pagopa/io-app/compare/2.83.0-rc.0...2.83.0-rc.1) (2025-02-12)


### Features

* **IT Wallet:** [[SIW-1962](https://pagopa.atlassian.net/browse/SIW-1962)] Remote presentation handle wallet instance presence ([#6694](https://github.com/pagopa/io-app/issues/6694)) ([20d6906](https://github.com/pagopa/io-app/commit/20d6906331909b8ee703d0cc0d9193d92db97d2d))

## [2.83.0-rc.0](https://github.com/pagopa/io-app/compare/2.82.0-rc.7...2.83.0-rc.0) (2025-02-11)


Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ android {
applicationId "it.pagopa.io.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 100154924
versionName "2.83.0.0"
versionCode 100154925
versionName "2.83.0.1"
multiDexEnabled true
// The resConfigs attribute will remove all not required localized resources while building the application,
// including the localized resources from libraries.
Expand Down
6 changes: 3 additions & 3 deletions ios/ItaliaApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@
CODE_SIGN_ENTITLEMENTS = ItaliaApp/ItaliaApp.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = M2X5YQ4BJ7;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -839,7 +839,7 @@
CODE_SIGN_ENTITLEMENTS = ItaliaApp/ItaliaApp.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = M2X5YQ4BJ7;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -1081,7 +1081,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = M2X5YQ4BJ7;
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>0</string>
<string>1</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>0</string>
<string>1</string>
</dict>
</plist>
3 changes: 2 additions & 1 deletion locales/de/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3207,7 +3207,8 @@ transaction:
debtor: "Schuldner"
iuv: "IUV"
subject: "Zahlungsgrund"
noticeCode: "Kodex der Zahlungsmitteilung"
noticeCode: "Kodex der Zahlungsmitteilung/IUV"
noticeCodeAccessible: Codice avviso/Identificativo Univoco Versamento
taxCode: "Steuernummer Körperschaft"
FIMS:
updateApp:
Expand Down
12 changes: 9 additions & 3 deletions locales/en/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3554,8 +3554,13 @@ features:
walletInactiveScreen:
title: Attiva Documenti su IO per continuare
subtitle: Per accedere con IT Wallet ai servizi online è necessario prima attivare la funzionalità Documenti su IO.
continue: Inizia
close: Non ora
primaryAction: Inizia
secondaryAction: Non ora
missingCredentialsScreen:
title: Mancano i dati contenuti in {{credentialName}}
subtitle: Aggiungi il documento al Portafoglio prima di continuare e poi riprova.
primaryAction: Aggiungi documento al Portafoglio
secondaryAction: Annulla
trustmark:
description: Mostra il QR Code per attestare l’autenticità del documento quando ti viene richiesto.
qrCode: QR code autenticità credenziale
Expand Down Expand Up @@ -4216,7 +4221,8 @@ transaction:
debtor: Debitore
iuv: IUV
subject: Oggetto del pagamento
noticeCode: Codice avviso
noticeCode: Codice avviso/IUV
noticeCodeAccessible: Codice avviso/Identificativo Univoco Versamento
taxCode: Codice Fiscale Ente
FIMS:
updateApp:
Expand Down
12 changes: 9 additions & 3 deletions locales/it/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3554,8 +3554,13 @@ features:
walletInactiveScreen:
title: Attiva Documenti su IO per continuare
subtitle: Per accedere con IT Wallet ai servizi online è necessario prima attivare la funzionalità Documenti su IO.
continue: Inizia
close: Non ora
primaryAction: Inizia
secondaryAction: Non ora
missingCredentialsScreen:
title: Mancano i dati contenuti in {{credentialName}}
subtitle: Aggiungi il documento al Portafoglio prima di continuare e poi riprova.
primaryAction: Aggiungi documento al Portafoglio
secondaryAction: Annulla
trustmark:
description: Mostra il QR Code per attestare l’autenticità del documento quando ti viene richiesto.
qrCode: QR code autenticità credenziale
Expand Down Expand Up @@ -4216,7 +4221,8 @@ transaction:
debtor: Debitore
iuv: IUV
subject: Oggetto del pagamento
noticeCode: Codice avviso
noticeCode: Codice avviso/IUV
noticeCodeAccessible: Codice avviso/Identificativo Univoco Versamento
taxCode: Codice Fiscale Ente
FIMS:
updateApp:
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.83.0-rc.0",
"version": "2.83.0-rc.1",
"private": true,
"scripts": {
"start": "react-native start",
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.83.0-rc.0
softwareVersion: 2.83.0-rc.1
developmentStatus: beta
softwareType: standalone/mobile
roadmap: "https://io.italia.it/"
Expand Down
4 changes: 2 additions & 2 deletions ts/components/screens/OperationResultScreenContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ type OperationResultScreenContentProps = WithTestID<{
subtitleProps?: Pick<BodyProps, "textBreakStrategy" | "lineBreakStrategyIOS">;
action?: Pick<
ButtonSolidProps,
"label" | "accessibilityLabel" | "onPress" | "testID"
"label" | "accessibilityLabel" | "onPress" | "testID" | "icon"
>;
secondaryAction?: Pick<
ButtonLinkProps,
"label" | "accessibilityLabel" | "onPress" | "testID"
"label" | "accessibilityLabel" | "onPress" | "testID" | "icon"
>;
isHeaderVisible?: boolean;
}>;
Expand Down
8 changes: 3 additions & 5 deletions ts/features/barcode/screens/BarcodeScanScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ import {
IOStackNavigationProp
} from "../../../navigation/params/AppParamsList";
import { useIOSelector } from "../../../store/hooks";
import {
barcodesScannerConfigSelector,
isIdPayEnabledSelector
} from "../../../store/reducers/backendStatus/remoteConfig";
import { barcodesScannerConfigSelector } from "../../../store/reducers/backendStatus/remoteConfig";
import { emptyContextualHelp } from "../../../utils/emptyContextualHelp";
import { useIOBottomSheetAutoresizableModal } from "../../../utils/hooks/bottomSheet";
import { IdPayPaymentRoutes } from "../../idpay/payment/navigation/routes";
Expand All @@ -46,11 +43,12 @@ import { usePagoPaPayment } from "../../payments/checkout/hooks/usePagoPaPayment
import { FCI_ROUTES } from "../../fci/navigation/routes";
import { paymentAnalyticsDataSelector } from "../../payments/history/store/selectors";
import { ITW_REMOTE_ROUTES } from "../../itwallet/presentation/remote/navigation/routes.ts";
import { isIdPayLocallyEnabledSelector } from "../../../store/reducers/persistedPreferences.ts";

const BarcodeScanScreen = () => {
const navigation = useNavigation<IOStackNavigationProp<AppParamsList>>();
const openDeepLink = useOpenDeepLink();
const isIdPayEnabled = useIOSelector(isIdPayEnabledSelector);
const isIdPayEnabled = useIOSelector(isIdPayLocallyEnabledSelector);
const paymentAnalyticsData = useIOSelector(paymentAnalyticsDataSelector);

const { startPaymentFlowWithRptId } = usePagoPaPayment();
Expand Down
26 changes: 21 additions & 5 deletions ts/features/itwallet/presentation/remote/machine/failure.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
import { RemoteEvents } from "./events.ts";

export enum RemoteFailureType {
UNEXPECTED = "UNEXPECTED",
WALLET_INACTIVE = "WALLET_INACTIVE"
WALLET_INACTIVE = "WALLET_INACTIVE",
MISSING_CREDENTIALS = "MISSING_CREDENTIALS",
UNEXPECTED = "UNEXPECTED"
}

export type RemoteFailure = {
type: RemoteFailureType;
reason: unknown;
/**
* Type that maps known reasons with the corresponding failure, in order to avoid unknowns as much as possible.
*/
export type ReasonTypeByFailure = {
[RemoteFailureType.WALLET_INACTIVE]: string;
[RemoteFailureType.MISSING_CREDENTIALS]: {
missingCredentials: Array<string>;
};
[RemoteFailureType.UNEXPECTED]: unknown;
};

type TypedRemoteFailures = {
[K in RemoteFailureType]: { type: K; reason: ReasonTypeByFailure[K] };
};

/*
* Union type of failures with the reason properly typed.
*/
export type RemoteFailure = TypedRemoteFailures[keyof TypedRemoteFailures];

/**
* Maps an event dispatched by the remote presentation machine to a failure object.
* If the event contains an error, it is mapped to an unexpected failure.
Expand Down
6 changes: 5 additions & 1 deletion ts/features/itwallet/presentation/remote/machine/guards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ export const createRemoteGuardsImplementation = (
) => ({
isWalletActive: () =>
itwLifecycleIsValidSelector(store.getState()) &&
isItwEnabledSelector(store.getState())
isItwEnabledSelector(store.getState()),

areRequiredCredentialsAvailable: () =>
// TODO: implementation depends on the remote presentation request
true
});
3 changes: 2 additions & 1 deletion ts/features/itwallet/presentation/remote/machine/machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export const itwRemoteMachine = setup({
},
actors: {},
guards: {
isWalletActive: notImplemented
isWalletActive: notImplemented,
areRequiredCredentialsAvailable: notImplemented
}
}).createMachine({
id: "itwRemoteMachine",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import { RemoteFailure, RemoteFailureType } from "../machine/failure.ts";
import { useAvoidHardwareBackButton } from "../../../../../utils/useAvoidHardwareBackButton.ts";
import { useDebugInfo } from "../../../../../hooks/useDebugInfo.ts";
import I18n from "../../../../../i18n.ts";
import { getCredentialNameFromType } from "../../../common/utils/itwCredentialUtils.ts";
import { useIONavigation } from "../../../../../navigation/params/AppParamsList.ts";
import { ITW_ROUTES } from "../../../navigation/routes.ts";

export const ItwRemoteFailureScreen = () => {
const failureOption =
Expand All @@ -30,6 +33,7 @@ type ContentViewProps = { failure: RemoteFailure };

const ContentView = ({ failure }: ContentViewProps) => {
const machineRef = ItwRemoteMachineContext.useActorRef();
const navigation = useIONavigation();

useDebugInfo({
failure: serializeFailureReason(failure)
Expand Down Expand Up @@ -59,18 +63,46 @@ const ContentView = ({ failure }: ContentViewProps) => {
pictogram: "itWallet",
action: {
label: I18n.t(
"features.itWallet.presentation.remote.walletInactiveScreen.continue"
"features.itWallet.presentation.remote.walletInactiveScreen.primaryAction"
),
onPress: () =>
machineRef.send({ type: "go-to-wallet-activation" })
},
secondaryAction: {
label: I18n.t(
"features.itWallet.presentation.remote.walletInactiveScreen.close"
"features.itWallet.presentation.remote.walletInactiveScreen.secondaryAction"
),
onPress: () => machineRef.send({ type: "go-to-wallet" })
}
};
case RemoteFailureType.MISSING_CREDENTIALS: {
const [missingCredential] = failure.reason.missingCredentials; // Only consider one credential for now
return {
title: I18n.t(
"features.itWallet.presentation.remote.missingCredentialsScreen.title",
{ credentialName: getCredentialNameFromType(missingCredential) }
),
subtitle: I18n.t(
"features.itWallet.presentation.remote.missingCredentialsScreen.subtitle"
),
pictogram: "emptyWallet",
action: {
label: I18n.t(
"features.itWallet.presentation.remote.missingCredentialsScreen.primaryAction"
),
onPress: () =>
navigation.navigate(ITW_ROUTES.MAIN, {
screen: ITW_ROUTES.ONBOARDING
})
},
secondaryAction: {
label: I18n.t(
"features.itWallet.presentation.remote.missingCredentialsScreen.secondaryAction"
),
onPress: () => machineRef.send({ type: "go-to-wallet" })
}
};
}
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const WalletPaymentFailureDetail = ({ failure }: Props) => {
accessibilityLabel: I18n.t(
"wallet.payment.failure.PAYMENT_CANCELED.action"
),
icon: "categLearning",
onPress: handleDiscoverMore
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const ReceiptCartItemDetailsScreen = () => {
}
label={I18n.t("transaction.details.operation.noticeCode")}
accessibilityLabel={I18n.t(
"transaction.details.operation.noticeCode"
"transaction.details.operation.noticeCodeAccessible"
)}
value={cartItem.refNumberValue}
/>
Expand Down
6 changes: 3 additions & 3 deletions ts/screens/profile/DeveloperModeSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import {
} from "../../store/reducers/authentication";
import { isDebugModeEnabledSelector } from "../../store/reducers/debug";
import {
isIdPayTestEnabledSelector,
isIdPayLocallyEnabledSelector,
isIOMarkdownEnabledLocallySelector,
isPagoPATestEnabledSelector,
isPnTestEnabledSelector
Expand Down Expand Up @@ -349,7 +349,7 @@ const DesignSystemSection = () => {

const PlaygroundsSection = () => {
const navigation = useIONavigation();
const isIdPayTestEnabled = useIOSelector(isIdPayTestEnabledSelector);
const isIdPayTestEnabled = useIOSelector(isIdPayLocallyEnabledSelector);

const playgroundsNavListItems: ReadonlyArray<PlaygroundsNavListItem> = [
{
Expand Down Expand Up @@ -453,7 +453,7 @@ const DeveloperTestEnvironmentSection = ({
const dispatch = useIODispatch();
const isPagoPATestEnabled = useIOSelector(isPagoPATestEnabledSelector);
const isPnTestEnabled = useIOSelector(isPnTestEnabledSelector);
const isIdPayTestEnabled = useIOSelector(isIdPayTestEnabledSelector);
const isIdPayTestEnabled = useIOSelector(isIdPayLocallyEnabledSelector);

const onPagoPAEnvironmentToggle = (enabled: boolean) => {
if (enabled) {
Expand Down
8 changes: 5 additions & 3 deletions ts/screens/profile/SecurityScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ import ROUTES from "../../navigation/routes";
import { identificationRequest } from "../../store/actions/identification";
import { preferenceFingerprintIsEnabledSaveSuccess } from "../../store/actions/persistedPreferences";
import { useIODispatch, useIOSelector } from "../../store/hooks";
import { isIdPayEnabledSelector } from "../../store/reducers/backendStatus/remoteConfig";
import { isFingerprintEnabledSelector } from "../../store/reducers/persistedPreferences";
import {
isFingerprintEnabledSelector,
isIdPayLocallyEnabledSelector
} from "../../store/reducers/persistedPreferences";
import { getFlowType } from "../../utils/analytics";
import {
biometricAuthenticationRequest,
Expand Down Expand Up @@ -51,7 +53,7 @@ const SecurityScreen = (): ReactElement => {
const dispatch = useIODispatch();
const isFingerprintEnabled = useIOSelector(isFingerprintEnabledSelector);
const isIdPayCodeOnboarded = useIOSelector(isIdPayCodeOnboardedSelector);
const isIdPayEnabled = useIOSelector(isIdPayEnabledSelector);
const isIdPayEnabled = useIOSelector(isIdPayLocallyEnabledSelector);
const isFimsHistoryEnabled = useIOSelector(fimsIsHistoryEnabledSelector);
const navigation = useIONavigation();
const [isBiometricDataAvailable, setIsBiometricDataAvailable] =
Expand Down
4 changes: 2 additions & 2 deletions ts/store/reducers/backendStatus/remoteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { getAppVersion, isVersionSupported } from "../../../utils/appVersion";
import { backendStatusLoadSuccess } from "../../actions/backendStatus";
import { Action } from "../../actions/types";
import { isPropertyWithMinAppVersionEnabled } from "../featureFlagWithMinAppVersionStatus";
import { isIdPayTestEnabledSelector } from "../persistedPreferences";
import { isIdPayLocallyEnabledSelector } from "../persistedPreferences";
import { GlobalState } from "../types";

export type RemoteConfigState = O.Option<BackendStatus["config"]>;
Expand Down Expand Up @@ -279,7 +279,7 @@ export const isFciEnabledSelector = createSelector(

export const isIdPayEnabledSelector = createSelector(
remoteConfigSelector,
isIdPayTestEnabledSelector,
isIdPayLocallyEnabledSelector,
(remoteConfig, isIdPayTestEnabled): boolean =>
isIdPayTestEnabled ||
pipe(
Expand Down
Loading

0 comments on commit 70f9dd1

Please sign in to comment.