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:[IOPID-2162] Remove CieID FF #6653

Merged
merged 19 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
da95095
chore: remove CieID local and remote FF references
ChrisMattew Jan 29, 2025
32231bb
refactor: remove login buttons inversion logic
ChrisMattew Jan 29, 2025
3b77922
chore: remove lodash merge from 0 index migration
ChrisMattew Jan 29, 2025
228997c
Merge remote-tracking branch 'origin/master' into IOPID-2162-remove-c…
ChrisMattew Jan 29, 2025
170f00d
chore(LandingScreen): update snapshots
ChrisMattew Jan 29, 2025
20c7597
Merge branch 'master' into IOPID-2162-remove-cieid-ff
ChrisMattew Jan 30, 2025
20ecadb
Merge branch 'master' into IOPID-2162-remove-cieid-ff
ChrisMattew Jan 30, 2025
1bb5765
Merge branch 'master' into IOPID-2162-remove-cieid-ff
ChrisMattew Jan 30, 2025
8b2bbc3
Merge branch 'master' into IOPID-2162-remove-cieid-ff
ChrisMattew Jan 31, 2025
7568531
Merge branch 'master' into IOPID-2162-remove-cieid-ff
ChrisMattew Jan 31, 2025
2376faf
Merge branch 'master' into IOPID-2162-remove-cieid-ff
ChrisMattew Jan 31, 2025
d2f2dbd
Merge remote-tracking branch 'origin/master' into IOPID-2162-remove-c…
ChrisMattew Jan 31, 2025
38a1901
Merge branch 'master' into IOPID-2162-remove-cieid-ff
ChrisMattew Jan 31, 2025
edb7545
Merge branch 'master' into IOPID-2162-remove-cieid-ff
shadowsheep1 Feb 3, 2025
e0d8e21
Merge branch 'master' into IOPID-2162-remove-cieid-ff
ChrisMattew Feb 3, 2025
a165cec
Merge branch 'master' into IOPID-2162-remove-cieid-ff
ChrisMattew Feb 3, 2025
e51ddd2
Merge branch 'master' into IOPID-2162-remove-cieid-ff
ChrisMattew Feb 3, 2025
9724a67
Merge branch 'master' into IOPID-2162-remove-cieid-ff
ChrisMattew Feb 4, 2025
ac038f1
Merge branch 'master' into IOPID-2162-remove-cieid-ff
ChrisMattew Feb 4, 2025
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: 0 additions & 3 deletions locales/en/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,6 @@ profile:
idpay:
idpayTest: IDPay
idpayTestAlert: This change requires app reboot
cieID:
cieIdTest:
title: CieID
designSystemEnvironment: Experimental Design System
newScanSection: New 'Scan' feature
sessionRefresh: Activate Session Refresh
Expand Down
3 changes: 0 additions & 3 deletions locales/it/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,6 @@ profile:
idpay:
idpayTest: IDPay
idpayTestAlert: La modifica richiede il riavvio dell'app
cieID:
cieIdTest:
title: CieID
trial:
titleSection: Partecipa alla sperimentazione
designSystemEnvironment: Design System sperimentale
Expand Down
96 changes: 0 additions & 96 deletions ts/components/cie/CieNotSupported.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions ts/features/cieLogin/store/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ export const cieLoginDisableUat = createStandardAction(
"CIE_LOGIN_DISABLE_UAT"
)();

export const cieIDFeatureSetEnabled = createStandardAction(
"PREFERENCES_CIE_ID_FEATURE_SET_ENABLED"
)<{ isCieIDFeatureEnabled: boolean }>();

export const cieIDDisableTourGuide = createStandardAction(
"CIE_ID_DISABLE_TOUR_GUIDE"
)();
Expand All @@ -21,6 +17,5 @@ export const cieIDSetSelectedSecurityLevel = createStandardAction(
export type CieLoginConfigActions =
| ActionType<typeof cieLoginDisableUat>
| ActionType<typeof cieLoginEnableUat>
| ActionType<typeof cieIDFeatureSetEnabled>
| ActionType<typeof cieIDDisableTourGuide>
| ActionType<typeof cieIDSetSelectedSecurityLevel>;
25 changes: 12 additions & 13 deletions ts/features/cieLogin/store/reducers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import {
PersistedState,
persistReducer
} from "redux-persist";
import { merge } from "lodash";
import { omit } from "lodash";
import {
cieIDDisableTourGuide,
cieIDFeatureSetEnabled,
cieIDSetSelectedSecurityLevel,
cieLoginDisableUat,
cieLoginEnableUat
Expand All @@ -21,14 +20,12 @@ import { SpidLevel } from "../../utils";

export type CieLoginState = {
useUat: boolean;
isCieIDFeatureEnabled: boolean;
isCieIDTourGuideEnabled: boolean;
cieIDSelectedSecurityLevel?: SpidLevel;
};

export const cieLoginInitialState = {
useUat: false,
isCieIDFeatureEnabled: false,
isCieIDTourGuideEnabled: true
};

Expand All @@ -47,11 +44,6 @@ const cieLoginReducer = (
...state,
useUat: false
};
case getType(cieIDFeatureSetEnabled):
return {
...state,
...action.payload
};
case getType(cieIDDisableTourGuide):
return {
...state,
Expand All @@ -67,19 +59,26 @@ const cieLoginReducer = (
}
};

const CURRENT_REDUX_CIE_LOGIN_STORE_VERSION = 0;
const CURRENT_REDUX_CIE_LOGIN_STORE_VERSION = 1;

const migrations: MigrationManifest = {
"0": (state: PersistedState) =>
merge(state, "features.loginFeatures.cieLogin.isCieIDTourGuideEnabled")
"0": (state: PersistedState) => ({
...state,
isCieIDTourGuideEnabled: true
}),
/**
* @param state The slice state
* Removes `isCieIDFeatureEnabled` from the persist rehydration actions
*/
"1": (state: PersistedState) => omit(state, "isCieIDFeatureEnabled")
};

const persistConfig: PersistConfig = {
key: "cieLogin",
storage: AsyncStorage,
migrate: createMigrate(migrations, { debug: isDevEnv }),
version: CURRENT_REDUX_CIE_LOGIN_STORE_VERSION,
whitelist: ["isCieIDFeatureEnabled", "isCieIDTourGuideEnabled"]
whitelist: ["isCieIDTourGuideEnabled"]
};

export const cieLoginPersistor = persistReducer<CieLoginState, Action>(
Expand Down
26 changes: 1 addition & 25 deletions ts/features/cieLogin/store/selectors/index.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,10 @@
import { createSelector } from "reselect";
import { GlobalState } from "../../../../store/reducers/types";
import { remoteConfigSelector } from "../../../../store/reducers/backendStatus/remoteConfig";
import { isPropertyWithMinAppVersionEnabled } from "../../../../store/reducers/featureFlagWithMinAppVersionStatus";

export const isCieLoginUatEnabledSelector = (state: GlobalState) =>
state.features.loginFeatures.cieLogin.useUat;

const isCieIdMinAppVersionEnabledSelector = createSelector(
remoteConfigSelector,
remoteConfig =>
isPropertyWithMinAppVersionEnabled({
remoteConfig,
mainLocalFlag: true,
configPropertyName: "cie_id"
})
);

export const isCieIDLocalFeatureEnabledSelector = (state: GlobalState) =>
state.features.loginFeatures.cieLogin.isCieIDFeatureEnabled;

export const isCieIDFFEnabledSelector = (state: GlobalState) =>
isCieIDLocalFeatureEnabledSelector(state) ||
isCieIdMinAppVersionEnabledSelector(state);

/**
* Both `isCieIDTourGuideEnabled` and `isCieIDFFEnabledSelector` return value must be `true`
*/
export const isCieIDTourGuideEnabledSelector = (state: GlobalState) =>
state.features.loginFeatures.cieLogin.isCieIDTourGuideEnabled &&
isCieIDFFEnabledSelector(state);
state.features.loginFeatures.cieLogin.isCieIDTourGuideEnabled;

export const cieIDSelectedSecurityLevelSelector = (state: GlobalState) =>
state.features.loginFeatures.cieLogin.cieIDSelectedSecurityLevel;
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ exports[`featuresPersistor should match snapshot 1`] = `
},
"loginFeatures": {
"cieLogin": {
"isCieIDFeatureEnabled": false,
"isCieIDTourGuideEnabled": true,
"useUat": false,
},
Expand Down
6 changes: 0 additions & 6 deletions ts/navigation/AuthenticationNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import CieExpiredOrInvalidScreen from "../screens/authentication/cie/CieExpiredO
import CiePinScreen from "../screens/authentication/cie/CiePinScreen";
import CieWrongCiePinScreen from "../screens/authentication/cie/CieWrongCiePinScreen";
import { AuthSessionPage } from "../screens/authentication/idpAuthSessionHandler";
import CieNotSupported from "../components/cie/CieNotSupported";
import RootedDeviceModal from "../screens/modal/RootedDeviceModal";
import { isGestureEnabled } from "../utils/navigation";
import CieUnexpectedErrorScreen from "../screens/authentication/cie/CieUnexpectedErrorScreen";
Expand Down Expand Up @@ -201,11 +200,6 @@ const AuthenticationStackNavigator = () => (
headerShown: true
}}
>
<Stack.Screen
name={ROUTES.CIE_NOT_SUPPORTED}
component={CieNotSupported}
/>

<Stack.Screen
options={{ headerShown: true }}
name={ROUTES.CIE_ACTIVATE_NFC_SCREEN}
Expand Down
1 change: 0 additions & 1 deletion ts/navigation/params/AuthenticationParamsList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export type AuthenticationParamsList = {
[ROUTES.AUTHENTICATION_IDP_LOGIN]: undefined;
[ROUTES.AUTHENTICATION_AUTH_SESSION]: undefined;
[ROUTES.AUTHENTICATION_IDP_TEST]: undefined;
[ROUTES.CIE_NOT_SUPPORTED]: undefined;
[ROUTES.CIE_ACTIVATE_NFC_SCREEN]: CieCardReaderScreenNavigationParams;
[ROUTES.AUTH_ERROR_SCREEN]: AuthErrorScreenProps;
[ROUTES.UNLOCK_ACCESS_SCREEN]: UnlockAccessProps;
Expand Down
1 change: 0 additions & 1 deletion ts/navigation/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const ROUTES = {
AUTHENTICATION_IDP_LOGIN: "AUTHENTICATION_IDP_LOGIN",
AUTHENTICATION_AUTH_SESSION: "AUTHENTICATION_AUTH_SESSION",
AUTHENTICATION_IDP_TEST: "AUTHENTICATION_IDP_TEST",
CIE_NOT_SUPPORTED: "CIE_NOT_SUPPORTED",
CIE_NOT_INSTALLED: "CIE_NOT_INSTALLED",
CIE_ACTIVATE_NFC_SCREEN: "CIE_ACTIVATE_NFC_SCREEN",
AUTH_ERROR_SCREEN: "AUTH_ERROR_SCREEN",
Expand Down
Loading
Loading