From 7bb1ba1c8d97c62a4b2b756f53ec8846dca926ce Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Tue, 19 Nov 2024 15:35:39 +0100 Subject: [PATCH 01/46] Remove `Chip` typographic style, replace it with `LabelMini` --- .../BonusCard/__tests__/BonusCard.test.tsx | 10 +++++----- .../bonus/cgn/components/CgnCardStatus.tsx | 16 ++++++++++------ ts/features/design-system/core/DSTypography.tsx | 14 -------------- .../screens/IdPayInitiativeDetailsScreen.tsx | 8 ++++---- .../common/components/PaymentCardSmall.tsx | 7 ++++--- 5 files changed, 23 insertions(+), 32 deletions(-) diff --git a/ts/components/BonusCard/__tests__/BonusCard.test.tsx b/ts/components/BonusCard/__tests__/BonusCard.test.tsx index e424c5c7eb6..1b0010f27aa 100644 --- a/ts/components/BonusCard/__tests__/BonusCard.test.tsx +++ b/ts/components/BonusCard/__tests__/BonusCard.test.tsx @@ -1,15 +1,15 @@ +import { LabelMini } from "@pagopa/io-app-design-system"; import { render } from "@testing-library/react-native"; import React from "react"; import { Provider } from "react-redux"; import configureMockStore from "redux-mock-store"; -import { Chip } from "@pagopa/io-app-design-system"; +import I18n from "../../../i18n"; import { applicationChangeState } from "../../../store/actions/application"; import { appReducer } from "../../../store/reducers"; import { GlobalState } from "../../../store/reducers/types"; +import { format } from "../../../utils/dates"; import { BonusCard } from "../BonusCard"; import { BonusCardCounter } from "../BonusCardCounter"; -import I18n from "../../../i18n"; -import { format } from "../../../utils/dates"; jest.mock("react-native-safe-area-context", () => { const useSafeAreaInsets = () => ({ top: 0 }); @@ -60,11 +60,11 @@ describe("Test BonusCard", () => { name: T_NAME, organizationName: T_ORG_NAME, status: ( - + {I18n.t("bonusCard.validUntil", { endDate: format(T_END_DATE, "DD/MM/YY") })} - + ), counters: [T_COUNTER_WITH_PROGRESS, T_COUNTER] }); diff --git a/ts/features/bonus/cgn/components/CgnCardStatus.tsx b/ts/features/bonus/cgn/components/CgnCardStatus.tsx index 9cbfe743cad..cff1a453752 100644 --- a/ts/features/bonus/cgn/components/CgnCardStatus.tsx +++ b/ts/features/bonus/cgn/components/CgnCardStatus.tsx @@ -1,11 +1,11 @@ +import { LabelMini, Tag } from "@pagopa/io-app-design-system"; import React from "react"; -import { Tag, Chip } from "@pagopa/io-app-design-system"; +import { Card } from "../../../../../definitions/cgn/Card"; import { CardActivated } from "../../../../../definitions/cgn/CardActivated"; -import I18n from "../../../../i18n"; -import { CardRevoked } from "../../../../../definitions/cgn/CardRevoked"; import { CardExpired } from "../../../../../definitions/cgn/CardExpired"; +import { CardRevoked } from "../../../../../definitions/cgn/CardRevoked"; +import I18n from "../../../../i18n"; import { formatDateAsShortFormat } from "../../../../utils/dates"; -import { Card } from "../../../../../definitions/cgn/Card"; export function CgnCardStatus({ card }: { card: Card }) { return ( @@ -25,11 +25,15 @@ export function CgnCardStatus({ card }: { card: Card }) { /> )} {CardActivated.is(card) && ( - + {I18n.t("bonus.cgn.detail.status.date.valid_until", { date: formatDateAsShortFormat(card.expiration_date) })} - + )} ); diff --git a/ts/features/design-system/core/DSTypography.tsx b/ts/features/design-system/core/DSTypography.tsx index d514e68b8db..a9827537013 100644 --- a/ts/features/design-system/core/DSTypography.tsx +++ b/ts/features/design-system/core/DSTypography.tsx @@ -3,7 +3,6 @@ import { BodyMonospace, ButtonText, Caption, - Chip, Divider, H1, H2, @@ -45,7 +44,6 @@ export const DSTypography = () => ( - @@ -175,18 +173,6 @@ const CaptionRow = () => { ); }; -const ChipRow = () => { - const theme = useIOTheme(); - - return ( - - Chip - Chip - Chip - - ); -}; - const BodyRow = () => ( Body diff --git a/ts/features/idpay/details/screens/IdPayInitiativeDetailsScreen.tsx b/ts/features/idpay/details/screens/IdPayInitiativeDetailsScreen.tsx index 2f9a8729d96..600926af957 100644 --- a/ts/features/idpay/details/screens/IdPayInitiativeDetailsScreen.tsx +++ b/ts/features/idpay/details/screens/IdPayInitiativeDetailsScreen.tsx @@ -1,9 +1,9 @@ import { Body, ButtonSolid, - Chip, ContentWrapper, H6, + LabelMini, Pictogram, Tag, VSpacer @@ -36,6 +36,7 @@ import { format } from "../../../../utils/dates"; import { formatNumberCentsToAmount } from "../../../../utils/stringBuilder"; import { IdPayCodeCieBanner } from "../../code/components/IdPayCodeCieBanner"; import { IdPayConfigurationRoutes } from "../../configuration/navigation/routes"; +import { ConfigurationMode } from "../../configuration/types"; import { IdPayInitiativeLastUpdateCounter } from "../components/IdPayInitiativeLastUpdateCounter"; import { InitiativeDiscountSettingsComponent } from "../components/InitiativeDiscountSettingsComponent"; import { InitiativeRefundSettingsComponent } from "../components/InitiativeRefundSettingsComponent"; @@ -51,7 +52,6 @@ import { initiativeNeedsConfigurationSelector } from "../store"; import { idpayInitiativeGet, idpayTimelinePageGet } from "../store/actions"; -import { ConfigurationMode } from "../../configuration/types"; export type IdPayInitiativeDetailsScreenParams = { initiativeId: string; @@ -361,11 +361,11 @@ export function IdPayCardStatus({ switch (getInitiativeStatus()) { case "ACTIVE": return ( - + {I18n.t("bonusCard.validUntil", { endDate: format(initiative.endDate, "DD/MM/YY") })} - + ); case "EXPIRING": return ( diff --git a/ts/features/payments/common/components/PaymentCardSmall.tsx b/ts/features/payments/common/components/PaymentCardSmall.tsx index 575936823c5..341927901c6 100644 --- a/ts/features/payments/common/components/PaymentCardSmall.tsx +++ b/ts/features/payments/common/components/PaymentCardSmall.tsx @@ -1,8 +1,8 @@ import { - Chip, IOColors, IOStyles, Icon, + LabelMini, VSpacer } from "@pagopa/io-app-design-system"; import * as React from "react"; @@ -81,13 +81,14 @@ const PaymentCardSmall = ({ )} - {labelText} - + ); From f78464fe211d1e3a79720aadad95caafe85d974d Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Tue, 19 Nov 2024 15:37:02 +0100 Subject: [PATCH 02/46] Replace `Label` with `Body` (with appropriate weight value) --- ts/components/IOMarkdown/renderRules.tsx | 10 +++++-- ts/components/SectionStatus/StatusContent.tsx | 17 +++++------ ts/components/ui/BannerErrorState.tsx | 6 ++-- .../components/BonusInformationComponent.tsx | 27 +++++++++-------- .../design-system/core/DSTypography.tsx | 23 --------------- .../screens/EuCovidCertRevokedScreen.tsx | 16 +++++----- .../fci/components/InfoScreenComponent.tsx | 14 +++++---- ts/features/fci/components/LinkedText.tsx | 7 +++-- .../fci/components/SignatureFieldItem.tsx | 6 ++-- .../screens/valid/FciDataSharingScreen.tsx | 28 +++++++++--------- .../components/FimsPrivacyInfo.tsx | 10 +++---- .../components/FimsSuccessBody.tsx | 15 ++++------ .../code/screens/IdPayCodeDisplayScreen.tsx | 7 ++--- .../code/screens/IdPayCodeRenewScreen.tsx | 5 ++-- .../components/BeneficiaryDetailsContent.tsx | 10 +++---- .../components/InitiativeRulesInfoBox.tsx | 4 +-- .../screens/BoolValuePrerequisitesScreen.tsx | 11 ++++--- .../screens/MultiValuePrerequisitesScreen.tsx | 5 ++-- .../idpay/wallet/components/IdPayCard.tsx | 10 ++++--- .../common/components/ItwMarkdown.tsx | 6 ++-- .../screens/cie/ItwCiePinScreen.tsx | 19 ++++++------ .../components/Home/DS/MessageListItem.tsx | 5 ++-- .../MessageDetail/OrganizationHeader.tsx | 12 ++++---- .../screens/WalletPaymentConfirmScreen.tsx | 6 ++-- .../authentication/cie/CiePinScreen.tsx | 17 ++++++----- .../profile/DownloadProfileDataScreen.tsx | 9 ++++-- .../ShareDataFeatureInfos.tsx | 29 ++++++++----------- .../components/ShareDataComponent/index.tsx | 9 ++++-- .../playgrounds/IdPayOnboardingPlayground.tsx | 4 +-- 29 files changed, 168 insertions(+), 179 deletions(-) diff --git a/ts/components/IOMarkdown/renderRules.tsx b/ts/components/IOMarkdown/renderRules.tsx index e41da7dcacc..1ef0f2998ed 100644 --- a/ts/components/IOMarkdown/renderRules.tsx +++ b/ts/components/IOMarkdown/renderRules.tsx @@ -13,7 +13,6 @@ import { IOPictogramsBleed, IOStyles, IOToast, - Label, Nullable, VSpacer } from "@pagopa/io-app-design-system"; @@ -186,9 +185,14 @@ export const DEFAULT_RULES: IOMarkdownRenderRules = { }; return ( - + ); }, /** diff --git a/ts/components/SectionStatus/StatusContent.tsx b/ts/components/SectionStatus/StatusContent.tsx index fabf129a958..1b3eae28f85 100644 --- a/ts/components/SectionStatus/StatusContent.tsx +++ b/ts/components/SectionStatus/StatusContent.tsx @@ -1,14 +1,14 @@ -import React, { ComponentProps, forwardRef } from "react"; -import { AccessibilityRole, StyleSheet, View } from "react-native"; import { + Body, IOColors, IOFontSize, IOIcons, - Icon, - Label + Icon } from "@pagopa/io-app-design-system"; -import { WithTestID } from "../../types/WithTestID"; +import React, { ComponentProps, forwardRef } from "react"; +import { AccessibilityRole, StyleSheet, View } from "react-native"; import { LevelEnum } from "../../../definitions/content/SectionStatus"; +import { WithTestID } from "../../types/WithTestID"; const iconSize = 24; @@ -35,7 +35,7 @@ type Props = WithTestID<{ backgroundColor: IOColors; iconName: IOIcons; fontSize?: IOFontSize; - foregroundColor: ComponentProps["color"]; + foregroundColor: ComponentProps["color"]; labelPaddingVertical?: number; }>; @@ -79,16 +79,15 @@ const StatusContent = forwardRef>( - + ) ); diff --git a/ts/components/ui/BannerErrorState.tsx b/ts/components/ui/BannerErrorState.tsx index 47a715b9c18..a403603dc43 100644 --- a/ts/components/ui/BannerErrorState.tsx +++ b/ts/components/ui/BannerErrorState.tsx @@ -1,4 +1,5 @@ import { + Body, ButtonLink, Icon, IOBannerBigSpacing, @@ -8,7 +9,6 @@ import { IOScaleValues, IOSpringValues, IOStyles, - Label, VSpacer, WithTestID } from "@pagopa/io-app-design-system"; @@ -135,9 +135,7 @@ export const BannerErrorState = ({ )} {label && ( <> - + {label} {actionText && } )} diff --git a/ts/features/bonus/common/components/BonusInformationComponent.tsx b/ts/features/bonus/common/components/BonusInformationComponent.tsx index 8502729db12..db42d0d16bb 100644 --- a/ts/features/bonus/common/components/BonusInformationComponent.tsx +++ b/ts/features/bonus/common/components/BonusInformationComponent.tsx @@ -1,9 +1,3 @@ -import * as AR from "fp-ts/lib/Array"; -import { constNull, pipe } from "fp-ts/lib/function"; -import * as O from "fp-ts/lib/Option"; -import * as React from "react"; -import { ComponentProps } from "react"; -import { Image } from "react-native"; import { Body, ButtonSolidProps, @@ -13,11 +7,15 @@ import { IOSpacer, IOSpacingScale, IOVisualCostants, - Label, VSpacer, buttonSolidHeight } from "@pagopa/io-app-design-system"; -import { useSafeAreaInsets } from "react-native-safe-area-context"; +import * as AR from "fp-ts/lib/Array"; +import { constNull, pipe } from "fp-ts/lib/function"; +import * as O from "fp-ts/lib/Option"; +import * as React from "react"; +import { ComponentProps } from "react"; +import { Image } from "react-native"; import Animated, { Easing, useAnimatedScrollHandler, @@ -25,16 +23,17 @@ import Animated, { useSharedValue, withTiming } from "react-native-reanimated"; +import { useSafeAreaInsets } from "react-native-safe-area-context"; import { BonusAvailable } from "../../../../../definitions/content/BonusAvailable"; import { BonusAvailableContent } from "../../../../../definitions/content/BonusAvailableContent"; +import { IOScrollViewWithLargeHeader } from "../../../../components/ui/IOScrollViewWithLargeHeader"; import { LightModalContext } from "../../../../components/ui/LightModal"; +import { Markdown } from "../../../../components/ui/Markdown/Markdown"; +import { useHeaderSecondLevel } from "../../../../hooks/useHeaderSecondLevel"; import I18n from "../../../../i18n"; import customVariables from "../../../../theme/variables"; -import { getRemoteLocale } from "../../../messages/utils/messages"; import { maybeNotNullyString } from "../../../../utils/strings"; -import { Markdown } from "../../../../components/ui/Markdown/Markdown"; -import { IOScrollViewWithLargeHeader } from "../../../../components/ui/IOScrollViewWithLargeHeader"; -import { useHeaderSecondLevel } from "../../../../hooks/useHeaderSecondLevel"; +import { getRemoteLocale } from "../../../messages/utils/messages"; import TosBonusComponent from "./TosBonusComponent"; type OwnProps = { @@ -93,14 +92,14 @@ const getTosFooter = ( {I18n.t("bonus.bonusVacanze.advice")} - + ), // if tos and regulation url is defined diff --git a/ts/features/design-system/core/DSTypography.tsx b/ts/features/design-system/core/DSTypography.tsx index a9827537013..79ce3a4f4b9 100644 --- a/ts/features/design-system/core/DSTypography.tsx +++ b/ts/features/design-system/core/DSTypography.tsx @@ -13,7 +13,6 @@ import { HStack, Hero, IOColors, - Label, LabelMini, LabelSmall, MdH1, @@ -48,7 +47,6 @@ export const DSTypography = () => ( - @@ -288,27 +286,6 @@ export const LabelMiniRow = () => { ); }; -export const LabelRow = () => { - const theme = useIOTheme(); - - return ( - - - - - - - - - ); -}; - export const MdH1Row = () => ( {getTitle("Markdown H1")} diff --git a/ts/features/euCovidCert/screens/EuCovidCertRevokedScreen.tsx b/ts/features/euCovidCert/screens/EuCovidCertRevokedScreen.tsx index ff6c1a93657..35ee2034159 100644 --- a/ts/features/euCovidCert/screens/EuCovidCertRevokedScreen.tsx +++ b/ts/features/euCovidCert/screens/EuCovidCertRevokedScreen.tsx @@ -1,22 +1,22 @@ -import * as pot from "@pagopa/ts-commons/lib/pot"; import { + Body, Divider, H3, - Label, Pictogram, VSpacer } from "@pagopa/io-app-design-system"; +import * as pot from "@pagopa/ts-commons/lib/pot"; import * as React from "react"; import { StyleSheet, View } from "react-native"; import I18n from "../../../i18n"; +import { useIOSelector } from "../../../store/hooks"; +import { localeDateFormat } from "../../../utils/locale"; +import { getPaginatedMessageById } from "../../messages/store/reducers/paginatedById"; import { EuCovidCertHeader } from "../components/EuCovidCertHeader"; import { EuCovidCertLearnMoreLink } from "../components/EuCovidCertLearnMoreLink"; +import { EUCovidContext } from "../components/EUCovidContext"; import { MarkdownHandleCustomLink } from "../components/MarkdownHandleCustomLink"; import { WithEUCovidCertificateHeaderData } from "../types/EUCovidCertificate"; -import { useIOSelector } from "../../../store/hooks"; -import { EUCovidContext } from "../components/EUCovidContext"; -import { getPaginatedMessageById } from "../../messages/store/reducers/paginatedById"; -import { localeDateFormat } from "../../../utils/locale"; import { BaseEuCovidCertificateLayout } from "./BaseEuCovidCertificateLayout"; const styles = StyleSheet.create({ @@ -44,12 +44,12 @@ const EuCovidCertRevokedContentComponent = (props: Props) => { <> {createdAtOrUndefined && ( - + )} diff --git a/ts/features/fci/components/InfoScreenComponent.tsx b/ts/features/fci/components/InfoScreenComponent.tsx index 3de7fb637de..1ef5c015964 100644 --- a/ts/features/fci/components/InfoScreenComponent.tsx +++ b/ts/features/fci/components/InfoScreenComponent.tsx @@ -1,8 +1,8 @@ -import * as React from "react"; -import { Linking, StyleSheet, Text, View } from "react-native"; +import { Body, H2, VSpacer } from "@pagopa/io-app-design-system"; import { EmailString } from "@pagopa/ts-commons/lib/strings"; -import { Body, H2, Label, VSpacer } from "@pagopa/io-app-design-system"; import { useFocusEffect } from "@react-navigation/native"; +import * as React from "react"; +import { Linking, StyleSheet, Text, View } from "react-native"; import themeVariables from "../../../theme/variables"; import { setAccessibilityFocus } from "../../../utils/accessibility"; @@ -35,9 +35,13 @@ const renderNode = (body: string | React.ReactNode, email?: EmailString) => { {email && <> } {email && ( - + )} ); diff --git a/ts/features/fci/components/LinkedText.tsx b/ts/features/fci/components/LinkedText.tsx index 5eaad1b03e1..596f74fa992 100644 --- a/ts/features/fci/components/LinkedText.tsx +++ b/ts/features/fci/components/LinkedText.tsx @@ -1,4 +1,4 @@ -import { H4, H6, Label, WithTestID } from "@pagopa/io-app-design-system"; +import { Body, H4, H6, WithTestID } from "@pagopa/io-app-design-system"; import * as O from "fp-ts/lib/Option"; import * as React from "react"; @@ -63,7 +63,8 @@ const LinkedText = (props: Props) => { const textToBeLinked = splitted[1]; const url = splitted[2]; return ( - + ); }; diff --git a/ts/features/fci/components/SignatureFieldItem.tsx b/ts/features/fci/components/SignatureFieldItem.tsx index 6c12dcd1b15..9f55993e27a 100644 --- a/ts/features/fci/components/SignatureFieldItem.tsx +++ b/ts/features/fci/components/SignatureFieldItem.tsx @@ -1,6 +1,7 @@ import * as React from "react"; import { View, StyleSheet } from "react-native"; import { + Body, IOColors, IOStyles, Label, @@ -49,7 +50,8 @@ const SignatureFieldItem = (props: Props) => { accessibilityLabel={props.title} /> - + ); diff --git a/ts/features/fci/screens/valid/FciDataSharingScreen.tsx b/ts/features/fci/screens/valid/FciDataSharingScreen.tsx index f304e1a8fa7..783c50053ea 100644 --- a/ts/features/fci/screens/valid/FciDataSharingScreen.tsx +++ b/ts/features/fci/screens/valid/FciDataSharingScreen.tsx @@ -1,8 +1,3 @@ -import * as pot from "@pagopa/ts-commons/lib/pot"; -import { useRoute } from "@react-navigation/native"; -import * as React from "react"; -import { StyleSheet, View, ScrollView } from "react-native"; -import * as O from "fp-ts/lib/Option"; import { Body, ButtonSolidProps, @@ -12,11 +7,18 @@ import { HSpacer, IOStyles, IconButton, - Label, ListItemNav, VSpacer } from "@pagopa/io-app-design-system"; +import * as pot from "@pagopa/ts-commons/lib/pot"; +import { useRoute } from "@react-navigation/native"; +import * as O from "fp-ts/lib/Option"; +import * as React from "react"; +import { ScrollView, StyleSheet, View } from "react-native"; +import { useHeaderSecondLevel } from "../../../../hooks/useHeaderSecondLevel"; import I18n from "../../../../i18n"; +import { useIONavigation } from "../../../../navigation/params/AppParamsList"; +import ROUTES from "../../../../navigation/routes"; import { useIOSelector } from "../../../../store/hooks"; import { profileEmailSelector, @@ -24,16 +26,13 @@ import { profileNameSelector, profileSelector } from "../../../../store/reducers/profile"; +import { formatFiscalCodeBirthdayAsShortFormat } from "../../../../utils/dates"; import { emptyContextualHelp } from "../../../../utils/emptyContextualHelp"; import { capitalize } from "../../../../utils/strings"; -import { useFciAbortSignatureFlow } from "../../hooks/useFciAbortSignatureFlow"; -import ROUTES from "../../../../navigation/routes"; import { trackFciUserDataConfirmed, trackFciUserExit } from "../../analytics"; -import { formatFiscalCodeBirthdayAsShortFormat } from "../../../../utils/dates"; -import { fciEnvironmentSelector } from "../../store/reducers/fciEnvironment"; -import { useIONavigation } from "../../../../navigation/params/AppParamsList"; -import { useHeaderSecondLevel } from "../../../../hooks/useHeaderSecondLevel"; +import { useFciAbortSignatureFlow } from "../../hooks/useFciAbortSignatureFlow"; import { FCI_ROUTES } from "../../navigation/routes"; +import { fciEnvironmentSelector } from "../../store/reducers/fciEnvironment"; const styles = StyleSheet.create({ alertTextContainer: { @@ -105,7 +104,8 @@ const FciDataSharingScreen = (): React.ReactElement => {
{I18n.t("features.fci.shareDataScreen.alertText")} - +
diff --git a/ts/features/fims/singleSignOn/components/FimsPrivacyInfo.tsx b/ts/features/fims/singleSignOn/components/FimsPrivacyInfo.tsx index a4be01dc420..301746b2fab 100644 --- a/ts/features/fims/singleSignOn/components/FimsPrivacyInfo.tsx +++ b/ts/features/fims/singleSignOn/components/FimsPrivacyInfo.tsx @@ -1,4 +1,4 @@ -import { Label } from "@pagopa/io-app-design-system"; +import { Body } from "@pagopa/io-app-design-system"; import * as React from "react"; import { LoadingSkeleton } from "../../../../components/ui/Markdown/LoadingSkeleton"; import I18n from "../../../../i18n"; @@ -6,12 +6,12 @@ import { openWebUrl } from "../../../../utils/url"; export const FimsPrivacyInfo = ({ privacyUrl }: PrivacyInfoProps) => privacyUrl !== undefined ? ( - + + ) : ( ); diff --git a/ts/features/fims/singleSignOn/components/FimsSuccessBody.tsx b/ts/features/fims/singleSignOn/components/FimsSuccessBody.tsx index 99ce219bcb3..c3e82e8cc19 100644 --- a/ts/features/fims/singleSignOn/components/FimsSuccessBody.tsx +++ b/ts/features/fims/singleSignOn/components/FimsSuccessBody.tsx @@ -10,7 +10,6 @@ import { Icon, IOColors, IOStyles, - Label, ListItemHeader, VSpacer } from "@pagopa/io-app-design-system"; @@ -20,6 +19,7 @@ import * as O from "fp-ts/Option"; import * as React from "react"; import { StyleSheet, View } from "react-native"; import { ServiceId } from "../../../../../definitions/backend/ServiceId"; +import { Consent } from "../../../../../definitions/fims_sso/Consent"; import { FooterActions } from "../../../../components/ui/FooterActions"; import { LoadingSkeleton } from "../../../../components/ui/Markdown/LoadingSkeleton"; import I18n from "../../../../i18n"; @@ -27,13 +27,12 @@ import { useIODispatch, useIOStore } from "../../../../store/hooks"; import { useIOBottomSheetModal } from "../../../../utils/hooks/bottomSheet"; import { openWebUrl } from "../../../../utils/url"; import { logoForService } from "../../../services/home/utils"; -import { useAutoFetchingServiceByIdPot } from "../../common/hooks"; -import { fimsGetRedirectUrlAndOpenIABAction } from "../store/actions"; import { computeAndTrackDataShare, computeAndTrackDataShareAccepted } from "../../common/analytics"; -import { Consent } from "../../../../../definitions/fims_sso/Consent"; +import { useAutoFetchingServiceByIdPot } from "../../common/hooks"; +import { fimsGetRedirectUrlAndOpenIABAction } from "../store/actions"; import { FimsClaimsList } from "./FimsClaims"; import { FimsSSOFullScreenError } from "./FimsFullScreenErrors"; import { FimsPrivacyInfo } from "./FimsPrivacyInfo"; @@ -178,11 +177,9 @@ const generateBottomSheetProps = ( title: I18n.t("FIMS.consentsScreen.bottomSheet.title"), component: ( <> - + {I18n.t("FIMS.consentsScreen.bottomSheet.body")} - + ), snapPoint: [340] diff --git a/ts/features/idpay/code/screens/IdPayCodeDisplayScreen.tsx b/ts/features/idpay/code/screens/IdPayCodeDisplayScreen.tsx index b84779d97db..ff8c9383ab1 100644 --- a/ts/features/idpay/code/screens/IdPayCodeDisplayScreen.tsx +++ b/ts/features/idpay/code/screens/IdPayCodeDisplayScreen.tsx @@ -7,7 +7,6 @@ import { H3, IOColors, IOStyles, - Label, VSpacer } from "@pagopa/io-app-design-system"; import { RouteProp, useNavigation, useRoute } from "@react-navigation/native"; @@ -21,6 +20,7 @@ import { AppParamsList, IOStackNavigationProp } from "../../../../navigation/params/AppParamsList"; +import useContentWithFF from "../../../../screens/profile/useContentWithFF"; import { useIOSelector } from "../../../../store/hooks"; import { emptyContextualHelp } from "../../../../utils/emptyContextualHelp"; import { useIdPayInfoCieBottomSheet } from "../components/IdPayInfoCieBottomSheet"; @@ -31,7 +31,6 @@ import { isIdPayCodeFailureSelector, isIdPayCodeLoadingSelector } from "../store/selectors"; -import useContentWithFF from "../../../../screens/profile/useContentWithFF"; type IdPayCodeDisplayRouteParams = { isOnboarding?: boolean; @@ -92,9 +91,9 @@ const IdPayCodeDisplayScreen = () => { {I18n.t("idpay.code.onboarding.bodyBold")} - + diff --git a/ts/features/idpay/code/screens/IdPayCodeRenewScreen.tsx b/ts/features/idpay/code/screens/IdPayCodeRenewScreen.tsx index edeb4794277..3be24d5b275 100644 --- a/ts/features/idpay/code/screens/IdPayCodeRenewScreen.tsx +++ b/ts/features/idpay/code/screens/IdPayCodeRenewScreen.tsx @@ -2,7 +2,6 @@ import { Body, H2, IOStyles, - Label, ListItemAction, VSpacer } from "@pagopa/io-app-design-system"; @@ -68,9 +67,9 @@ export const IdPayCodeRenewScreen = () => {

{I18n.t("idpay.code.renew.screen.header")}

{I18n.t("idpay.code.renew.screen.body")} - + { /> - + - + diff --git a/ts/features/idpay/details/components/InitiativeRulesInfoBox.tsx b/ts/features/idpay/details/components/InitiativeRulesInfoBox.tsx index 2b5eb2cba61..3e5988392ea 100644 --- a/ts/features/idpay/details/components/InitiativeRulesInfoBox.tsx +++ b/ts/features/idpay/details/components/InitiativeRulesInfoBox.tsx @@ -60,9 +60,9 @@ const InitiativeRulesInfoBox = (props: Props) => { - + diff --git a/ts/features/idpay/onboarding/screens/BoolValuePrerequisitesScreen.tsx b/ts/features/idpay/onboarding/screens/BoolValuePrerequisitesScreen.tsx index 9004111688a..80a51189161 100644 --- a/ts/features/idpay/onboarding/screens/BoolValuePrerequisitesScreen.tsx +++ b/ts/features/idpay/onboarding/screens/BoolValuePrerequisitesScreen.tsx @@ -2,7 +2,6 @@ import { Body, FooterWithButtons, H2, - Label, VSpacer } from "@pagopa/io-app-design-system"; import React from "react"; @@ -17,13 +16,13 @@ import I18n from "../../../../i18n"; import { dpr28Dec2000Url } from "../../../../urls"; import { emptyContextualHelp } from "../../../../utils/emptyContextualHelp"; import { openWebUrl } from "../../../../utils/url"; +import { isLoadingSelector } from "../../common/machine/selectors"; import { IdPayOnboardingMachineContext } from "../machine/provider"; import { areAllSelfDeclarationsToggledSelector, boolRequiredCriteriaSelector, selectSelfDeclarationBoolAnswers } from "../machine/selectors"; -import { isLoadingSelector } from "../../common/machine/selectors"; const InitiativeSelfDeclarationsScreen = () => { const { useActorRef, useSelector } = IdPayOnboardingMachineContext; @@ -64,9 +63,13 @@ const InitiativeSelfDeclarationsScreen = () => {

{I18n.t("idpay.onboarding.boolPrerequisites.header")}

{I18n.t("idpay.onboarding.boolPrerequisites.body")} - + {selfCriteriaBool.map((criteria, index) => ( diff --git a/ts/features/idpay/onboarding/screens/MultiValuePrerequisitesScreen.tsx b/ts/features/idpay/onboarding/screens/MultiValuePrerequisitesScreen.tsx index 15625551be8..3c3019ea0b7 100644 --- a/ts/features/idpay/onboarding/screens/MultiValuePrerequisitesScreen.tsx +++ b/ts/features/idpay/onboarding/screens/MultiValuePrerequisitesScreen.tsx @@ -7,7 +7,6 @@ import { IOColors, IOStyles, Icon, - Label, PressableListItemBase, VSpacer } from "@pagopa/io-app-design-system"; @@ -101,9 +100,9 @@ const MultiValuePrerequisiteItemScreenContent = ({ {/* TODO: Add a proper `onPress` function to the following link. It was a `` without anything else before */} {/* eslint-disable-next-line @typescript-eslint/no-empty-function */} - +
{selfDeclaration.description}
diff --git a/ts/features/idpay/wallet/components/IdPayCard.tsx b/ts/features/idpay/wallet/components/IdPayCard.tsx index 4c4e7c85db8..1a23c68fc70 100644 --- a/ts/features/idpay/wallet/components/IdPayCard.tsx +++ b/ts/features/idpay/wallet/components/IdPayCard.tsx @@ -1,4 +1,4 @@ -import { Avatar, H3, H6, Label, VSpacer } from "@pagopa/io-app-design-system"; +import { Avatar, Body, H3, H6, VSpacer } from "@pagopa/io-app-design-system"; import { format } from "date-fns"; import React from "react"; import { ImageURISource, StyleSheet, View } from "react-native"; @@ -37,16 +37,18 @@ export const IdPayCard = (props: IdPayCardProps) => (
- + + Disponibile +

{formatNumberCentsToAmount(props.amount, true, "right")}

- + ); diff --git a/ts/features/itwallet/common/components/ItwMarkdown.tsx b/ts/features/itwallet/common/components/ItwMarkdown.tsx index 02050f2665c..96367082a22 100644 --- a/ts/features/itwallet/common/components/ItwMarkdown.tsx +++ b/ts/features/itwallet/common/components/ItwMarkdown.tsx @@ -14,7 +14,6 @@ import { H6, h6FontSize, IOToast, - Label, VSpacer } from "@pagopa/io-app-design-system"; import _ from "lodash"; @@ -79,7 +78,8 @@ const getRules = (onLinkOpen?: ItwMarkdownProps["onLinkOpen"]) => ({ ), link: (node: ASTNode, children: Array) => ( - + ) }); diff --git a/ts/features/itwallet/identification/screens/cie/ItwCiePinScreen.tsx b/ts/features/itwallet/identification/screens/cie/ItwCiePinScreen.tsx index 02cfb5da64c..966261e849e 100644 --- a/ts/features/itwallet/identification/screens/cie/ItwCiePinScreen.tsx +++ b/ts/features/itwallet/identification/screens/cie/ItwCiePinScreen.tsx @@ -1,11 +1,12 @@ import { + Body, ContentWrapper, H2, IOStyles, - Label, OTPInput, VSpacer } from "@pagopa/io-app-design-system"; +import * as pot from "@pagopa/ts-commons/lib/pot"; import { Millisecond } from "@pagopa/ts-commons/lib/units"; import { useHeaderHeight } from "@react-navigation/elements"; import { useFocusEffect, useIsFocused } from "@react-navigation/native"; @@ -18,7 +19,6 @@ import { View } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; -import * as pot from "@pagopa/ts-commons/lib/pot"; import { ContextualHelpPropsMarkdown } from "../../../../../components/screens/BaseScreenComponent"; import LegacyMarkdown from "../../../../../components/ui/Markdown/LegacyMarkdown"; import { pinPukHelpUrl } from "../../../../../config"; @@ -30,14 +30,14 @@ import { setAccessibilityFocus } from "../../../../../utils/accessibility"; import { useIOBottomSheetAutoresizableModal } from "../../../../../utils/hooks/bottomSheet"; import { withTrailingPoliceCarLightEmojii } from "../../../../../utils/strings"; import { openWebUrl } from "../../../../../utils/url"; -import { itwNfcIsEnabled } from "../../store/actions"; -import { itwIsNfcEnabledSelector } from "../../store/selectors"; -import { ItwEidIssuanceMachineContext } from "../../../machine/provider"; import { trackItWalletCiePinEnter, trackItWalletCiePinForgotten, trackItWalletCiePinInfo } from "../../../analytics"; +import { ItwEidIssuanceMachineContext } from "../../../machine/provider"; +import { itwNfcIsEnabled } from "../../store/actions"; +import { itwIsNfcEnabledSelector } from "../../store/selectors"; const CIE_PIN_LENGTH = 8; @@ -56,9 +56,9 @@ const ForgottenPin = () => ( {I18n.t("bottomSheets.ciePin.content")} - + ); @@ -132,7 +132,8 @@ export const ItwCiePinScreen = () => {

{I18n.t("authentication.cie.pin.pinCardTitle")}

- + - - + {`${serviceName} · `} + {messageTitle} {!isRead && ( diff --git a/ts/features/messages/components/MessageDetail/OrganizationHeader.tsx b/ts/features/messages/components/MessageDetail/OrganizationHeader.tsx index 47cf0372a5a..4b36bc52732 100644 --- a/ts/features/messages/components/MessageDetail/OrganizationHeader.tsx +++ b/ts/features/messages/components/MessageDetail/OrganizationHeader.tsx @@ -1,17 +1,17 @@ -import React, { useCallback } from "react"; -import { ImageURISource, StyleSheet, View } from "react-native"; import { Avatar, + Body, IOSpacingScale, IOStyles, - Label, LabelSmall, useIOTheme } from "@pagopa/io-app-design-system"; +import React, { useCallback } from "react"; +import { ImageURISource, StyleSheet, View } from "react-native"; import { ServiceId } from "../../../../../definitions/backend/ServiceId"; import { useIONavigation } from "../../../../navigation/params/AppParamsList"; -import { SERVICES_ROUTES } from "../../../services/common/navigation/routes"; import { useIOSelector } from "../../../../store/hooks"; +import { SERVICES_ROUTES } from "../../../services/common/navigation/routes"; import { messagePaymentDataSelector } from "../../store/reducers/detailsById"; import { UIMessageId } from "../../types"; import { DoubleAvatar } from "../Home/DS/DoubleAvatar"; @@ -64,7 +64,9 @@ export const OrganizationHeader = ({ return ( - + + {organizationName} + { {I18n.t("payment.confirm.termsAndConditions")}{" "} - + ); diff --git a/ts/screens/authentication/cie/CiePinScreen.tsx b/ts/screens/authentication/cie/CiePinScreen.tsx index 48be76d1a7b..b6a69a58373 100644 --- a/ts/screens/authentication/cie/CiePinScreen.tsx +++ b/ts/screens/authentication/cie/CiePinScreen.tsx @@ -1,12 +1,13 @@ import { Banner, + Body, ContentWrapper, H2, IOStyles, - Label, OTPInput, VSpacer } from "@pagopa/io-app-design-system"; +import * as pot from "@pagopa/ts-commons/lib/pot"; import { Millisecond } from "@pagopa/ts-commons/lib/units"; import { useHeaderHeight } from "@react-navigation/elements"; import { @@ -29,7 +30,6 @@ import { View } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; -import * as pot from "@pagopa/ts-commons/lib/pot"; import { IdpData } from "../../../../definitions/content/IdpData"; import { CieEntityIds, @@ -53,18 +53,18 @@ import ROUTES from "../../../navigation/routes"; import { loginSuccess } from "../../../store/actions/authentication"; import { nfcIsEnabled } from "../../../store/actions/cie"; import { useIODispatch, useIOSelector } from "../../../store/hooks"; +import { isNfcEnabledSelector } from "../../../store/reducers/cie"; import { SessionToken } from "../../../types/SessionToken"; import { setAccessibilityFocus } from "../../../utils/accessibility"; import { useIOBottomSheetAutoresizableModal } from "../../../utils/hooks/bottomSheet"; import { useOnFirstRender } from "../../../utils/hooks/useOnFirstRender"; +import { getIdpLoginUri } from "../../../utils/login"; import { withTrailingPoliceCarLightEmojii } from "../../../utils/strings"; import { openWebUrl } from "../../../utils/url"; import { trackLoginCiePinInfo, trackLoginCiePinScreen } from "../analytics/cieAnalytics"; -import { isNfcEnabledSelector } from "../../../store/reducers/cie"; -import { getIdpLoginUri } from "../../../utils/login"; const CIE_PIN_LENGTH = 8; @@ -115,9 +115,9 @@ const CiePinScreen = () => { {I18n.t("bottomSheets.ciePin.content")} - + ), @@ -218,7 +218,8 @@ const CiePinScreen = () => {

{I18n.t("authentication.cie.pin.pinCardTitle")}

- + { {I18n.t("profile.main.privacy.exportData.detail.paragraph3.part1")} - +
diff --git a/ts/screens/profile/components/ShareDataComponent/ShareDataFeatureInfos.tsx b/ts/screens/profile/components/ShareDataComponent/ShareDataFeatureInfos.tsx index 65587fd2526..ecc8653cba6 100644 --- a/ts/screens/profile/components/ShareDataComponent/ShareDataFeatureInfos.tsx +++ b/ts/screens/profile/components/ShareDataComponent/ShareDataFeatureInfos.tsx @@ -1,20 +1,15 @@ -import { - Label, - Body, - FeatureInfo, - VSpacer -} from "@pagopa/io-app-design-system"; +import { Body, FeatureInfo, VSpacer } from "@pagopa/io-app-design-system"; +import { Millisecond } from "@pagopa/ts-commons/lib/units"; import React, { useCallback, useMemo, useRef } from "react"; import { View } from "react-native"; -import { Millisecond } from "@pagopa/ts-commons/lib/units"; import { useSafeAreaInsets } from "react-native-safe-area-context"; -import I18n from "../../../../i18n"; import LegacyMarkdown from "../../../../components/ui/Markdown/LegacyMarkdown"; +import I18n from "../../../../i18n"; +import { ioSuppliersUrl } from "../../../../urls"; +import { setAccessibilityFocus } from "../../../../utils/accessibility"; import { useIOBottomSheetAutoresizableModal } from "../../../../utils/hooks/bottomSheet"; import { openWebUrl } from "../../../../utils/url"; -import { ioSuppliersUrl } from "../../../../urls"; import { TrackingInfo } from "../../analytics/mixpanel/mixpanelAnalytics"; -import { setAccessibilityFocus } from "../../../../utils/accessibility"; export type FeatureProps = { trackAction: (info: TrackingInfo) => void; @@ -69,9 +64,9 @@ const AnalyticsFeatureInfo = ({ trackAction }: FeatureProps) => { () => ( {I18n.t("profile.main.privacy.shareData.screen.why.description.one")} - + {`${I18n.t( "profile.main.privacy.shareData.screen.why.description.three" )}`} @@ -114,11 +109,11 @@ const SecurityFeatureInfo = ({ trackAction }: FeatureProps) => { {I18n.t( "profile.main.privacy.shareData.screen.security.description.one" )} - + {I18n.t( "profile.main.privacy.shareData.screen.security.description.three" )} @@ -144,11 +139,11 @@ const GDPRFeatureInfo = ({ trackAction }: FeatureProps) => { body={ {I18n.t("profile.main.privacy.shareData.screen.gdpr.description.one")} - + } action={{ @@ -159,4 +154,4 @@ const GDPRFeatureInfo = ({ trackAction }: FeatureProps) => { ); }; -export { AnalyticsFeatureInfo, SecurityFeatureInfo, GDPRFeatureInfo }; +export { AnalyticsFeatureInfo, GDPRFeatureInfo, SecurityFeatureInfo }; diff --git a/ts/screens/profile/components/ShareDataComponent/index.tsx b/ts/screens/profile/components/ShareDataComponent/index.tsx index f67db8f953a..13203e296a5 100644 --- a/ts/screens/profile/components/ShareDataComponent/index.tsx +++ b/ts/screens/profile/components/ShareDataComponent/index.tsx @@ -41,11 +41,16 @@ export const ShareDataComponent = memo(({ trackAction }: FeatureProps) => { {I18n.t( "profile.main.privacy.shareData.screen.additionalInformation.description" )} - + ); diff --git a/ts/screens/profile/playgrounds/IdPayOnboardingPlayground.tsx b/ts/screens/profile/playgrounds/IdPayOnboardingPlayground.tsx index 50dfd2fe47d..16304702c64 100644 --- a/ts/screens/profile/playgrounds/IdPayOnboardingPlayground.tsx +++ b/ts/screens/profile/playgrounds/IdPayOnboardingPlayground.tsx @@ -176,9 +176,9 @@ const TestServiceItem = (props: TestServiceItemProps) => { alignItems: "center" }} > - +
{serviceId}
From 06516fd1df274454e58194925f03f016d7672b26 Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Tue, 19 Nov 2024 15:49:49 +0100 Subject: [PATCH 03/46] Update `jest` snapshots --- .../SectionStatusContent.test.tsx.snap | 1 + .../__snapshots__/IOMarkdown.test.tsx.snap | 1 + .../QtspClauseListItem.test.tsx.snap | 1 + .../SignatureFieldItem.test.tsx.snap | 1 + .../__snapshots__/IdPayCard.test.tsx.snap | 2 ++ .../__snapshots__/ItwMarkdown.test.tsx.snap | 2 ++ ...wCredentialPreviewClaimsList.test.tsx.snap | 1 + ...ItwPresentationClaimsSection.test.tsx.snap | 2 ++ .../WrappedMessageListItem.test.tsx.snap | 16 +++++++++++++ .../MessageDetailsHeader.test.tsx.snap | 1 + .../OrganizationHeader.test.tsx.snap | 1 + .../WalletPaymentOutcomeScreen.test.tsx.snap | 24 +++++++++++++++++++ .../PaymentCardSmall.test.tsx.snap | 4 ++-- .../MessageDetailsScreen.test.tsx.snap | 1 + 14 files changed, 56 insertions(+), 2 deletions(-) diff --git a/ts/components/SectionStatus/__tests__/__snapshots__/SectionStatusContent.test.tsx.snap b/ts/components/SectionStatus/__tests__/__snapshots__/SectionStatusContent.test.tsx.snap index 133af5f36d6..9bc78fd2c4b 100644 --- a/ts/components/SectionStatus/__tests__/__snapshots__/SectionStatusContent.test.tsx.snap +++ b/ts/components/SectionStatus/__tests__/__snapshots__/SectionStatusContent.test.tsx.snap @@ -136,6 +136,7 @@ exports[`StatusContent should match the snapshot 1`] = `
Date: Tue, 19 Nov 2024 15:58:11 +0100 Subject: [PATCH 04/46] Update the subtitle weight in the `ServicesHeader` component --- ts/features/services/common/components/ServicesHeader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/features/services/common/components/ServicesHeader.tsx b/ts/features/services/common/components/ServicesHeader.tsx index ba6e0bb24f8..1016f0c134c 100644 --- a/ts/features/services/common/components/ServicesHeader.tsx +++ b/ts/features/services/common/components/ServicesHeader.tsx @@ -48,7 +48,7 @@ export const ServicesHeader = ({

{title}

- + {subTitle}
From 036548f737f5260ae2e2ced723ddfa4e6aebd2d2 Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Tue, 19 Nov 2024 16:02:10 +0100 Subject: [PATCH 05/46] =?UTF-8?q?Fix=C2=A0`tsc`=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ts/features/fci/components/SignatureFieldItem.tsx | 5 ++--- .../idpay/details/components/InitiativeRulesInfoBox.tsx | 1 - ts/screens/profile/components/ShareDataComponent/index.tsx | 6 +++--- .../profile/playgrounds/IdPayOnboardingPlayground.tsx | 1 - 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ts/features/fci/components/SignatureFieldItem.tsx b/ts/features/fci/components/SignatureFieldItem.tsx index 9f55993e27a..cfb421f08b1 100644 --- a/ts/features/fci/components/SignatureFieldItem.tsx +++ b/ts/features/fci/components/SignatureFieldItem.tsx @@ -1,12 +1,11 @@ -import * as React from "react"; -import { View, StyleSheet } from "react-native"; import { Body, IOColors, IOStyles, - Label, ListItemCheckbox } from "@pagopa/io-app-design-system"; +import * as React from "react"; +import { StyleSheet, View } from "react-native"; import I18n from "../../../i18n"; type Props = { diff --git a/ts/features/idpay/details/components/InitiativeRulesInfoBox.tsx b/ts/features/idpay/details/components/InitiativeRulesInfoBox.tsx index 3e5988392ea..4b01d37103a 100644 --- a/ts/features/idpay/details/components/InitiativeRulesInfoBox.tsx +++ b/ts/features/idpay/details/components/InitiativeRulesInfoBox.tsx @@ -6,7 +6,6 @@ import { HSpacer, IOColors, Icon, - Label, VSpacer } from "@pagopa/io-app-design-system"; import React from "react"; diff --git a/ts/screens/profile/components/ShareDataComponent/index.tsx b/ts/screens/profile/components/ShareDataComponent/index.tsx index 13203e296a5..7eac0ba175a 100644 --- a/ts/screens/profile/components/ShareDataComponent/index.tsx +++ b/ts/screens/profile/components/ShareDataComponent/index.tsx @@ -1,10 +1,10 @@ -import { Body, Label, VSpacer } from "@pagopa/io-app-design-system"; +import { Body, VSpacer } from "@pagopa/io-app-design-system"; import React, { memo } from "react"; +import { tosConfigSelector } from "../../../../features/tos/store/selectors"; import I18n from "../../../../i18n"; +import { useIOSelector } from "../../../../store/hooks"; import { openWebUrl } from "../../../../utils/url"; import { TrackingInfo } from "../../analytics/mixpanel/mixpanelAnalytics"; -import { useIOSelector } from "../../../../store/hooks"; -import { tosConfigSelector } from "../../../../features/tos/store/selectors"; import { AnalyticsFeatureInfo, FeatureProps, diff --git a/ts/screens/profile/playgrounds/IdPayOnboardingPlayground.tsx b/ts/screens/profile/playgrounds/IdPayOnboardingPlayground.tsx index 16304702c64..6f5244e7e02 100644 --- a/ts/screens/profile/playgrounds/IdPayOnboardingPlayground.tsx +++ b/ts/screens/profile/playgrounds/IdPayOnboardingPlayground.tsx @@ -3,7 +3,6 @@ import { BodyMonospace, H4, IOColors, - Label, LabelSmall, PressableListItemBase, VSpacer From 16fd16f159f5372828f44b45ae496ca951a5a192 Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Tue, 19 Nov 2024 16:12:01 +0100 Subject: [PATCH 06/46] Decrease size of content in the `MessageListItem` --- .../components/Home/DS/MessageListItem.tsx | 9 +- .../WrappedMessageListItem.test.tsx.snap | 160 +++++++++--------- 2 files changed, 84 insertions(+), 85 deletions(-) diff --git a/ts/features/messages/components/Home/DS/MessageListItem.tsx b/ts/features/messages/components/Home/DS/MessageListItem.tsx index f3d61bff19a..f12d50cbc94 100644 --- a/ts/features/messages/components/Home/DS/MessageListItem.tsx +++ b/ts/features/messages/components/Home/DS/MessageListItem.tsx @@ -1,7 +1,6 @@ import { AnimatedMessageCheckbox, Avatar, - Body, H6, HSpacer, IOColors, @@ -143,10 +142,10 @@ export const MessageListItem = ({ - - {`${serviceName} · `} - {messageTitle} - + + {`${serviceName} · `} + {messageTitle} + {!isRead && ( diff --git a/ts/features/messages/components/Home/__tests__/__snapshots__/WrappedMessageListItem.test.tsx.snap b/ts/features/messages/components/Home/__tests__/__snapshots__/WrappedMessageListItem.test.tsx.snap index e9dfd827986..93a5e7c2aec 100644 --- a/ts/features/messages/components/Home/__tests__/__snapshots__/WrappedMessageListItem.test.tsx.snap +++ b/ts/features/messages/components/Home/__tests__/__snapshots__/WrappedMessageListItem.test.tsx.snap @@ -651,7 +651,7 @@ exports[`WrappedMessageListItem should match snapshot, from SEND, read message 1 > Date: Tue, 19 Nov 2024 16:44:06 +0100 Subject: [PATCH 07/46] Update `jest` snapshot --- .../__tests__/__snapshots__/ServicesHeaderSection.test.tsx.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/features/services/common/components/__tests__/__snapshots__/ServicesHeaderSection.test.tsx.snap b/ts/features/services/common/components/__tests__/__snapshots__/ServicesHeaderSection.test.tsx.snap index f0a259671a2..179a255a3bd 100644 --- a/ts/features/services/common/components/__tests__/__snapshots__/ServicesHeaderSection.test.tsx.snap +++ b/ts/features/services/common/components/__tests__/__snapshots__/ServicesHeaderSection.test.tsx.snap @@ -300,7 +300,7 @@ exports[`ServicesHeaderSection component should match the snapshot for service h "fontFamily": "Titillium Sans Pro", "fontSize": 14, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "400", "lineHeight": 21, }, ] From 3b9669ed57ea228b50225bccff650c5acf508ba9 Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Tue, 19 Nov 2024 16:49:59 +0100 Subject: [PATCH 08/46] Replace `Bold` with `Semibold` in the `IOMarkdown` --- ts/components/IOMarkdown/renderRules.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/components/IOMarkdown/renderRules.tsx b/ts/components/IOMarkdown/renderRules.tsx index 1ef0f2998ed..090db9e1c8a 100644 --- a/ts/components/IOMarkdown/renderRules.tsx +++ b/ts/components/IOMarkdown/renderRules.tsx @@ -159,7 +159,7 @@ export const DEFAULT_RULES: IOMarkdownRenderRules = { */ Strong(strong: TxtStrongNode, render: Renderer) { return ( - + {strong.children.map(render)} ); From 605083bf8312184d235e9e984f722de30658a92e Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Tue, 19 Nov 2024 17:01:51 +0100 Subject: [PATCH 09/46] Update `jest` snapshot --- .../__tests__/__snapshots__/ServicesHeader.test.tsx.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/features/services/common/components/__tests__/__snapshots__/ServicesHeader.test.tsx.snap b/ts/features/services/common/components/__tests__/__snapshots__/ServicesHeader.test.tsx.snap index 2caf65eb367..edf42ac3dc6 100644 --- a/ts/features/services/common/components/__tests__/__snapshots__/ServicesHeader.test.tsx.snap +++ b/ts/features/services/common/components/__tests__/__snapshots__/ServicesHeader.test.tsx.snap @@ -111,7 +111,7 @@ exports[`ServicesHeader component should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 14, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "400", "lineHeight": 21, }, ] From 24cab210239a2f82ca28250ed19ef073dc58a22c Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Tue, 19 Nov 2024 17:37:07 +0100 Subject: [PATCH 10/46] Update `jest` snapshots --- .../__snapshots__/IOMarkdown.test.tsx.snap | 2 +- .../WalletPaymentOutcomeScreen.test.tsx.snap | 144 +++++++++--------- 2 files changed, 73 insertions(+), 73 deletions(-) diff --git a/ts/components/__tests__/__snapshots__/IOMarkdown.test.tsx.snap b/ts/components/__tests__/__snapshots__/IOMarkdown.test.tsx.snap index 47efbf9aa4b..09fa05dd049 100644 --- a/ts/components/__tests__/__snapshots__/IOMarkdown.test.tsx.snap +++ b/ts/components/__tests__/__snapshots__/IOMarkdown.test.tsx.snap @@ -78,7 +78,7 @@ exports[`IOMarkdown Should match snapshot 1`] = ` diff --git a/ts/features/payments/checkout/screens/___tests___/__snapshots__/WalletPaymentOutcomeScreen.test.tsx.snap b/ts/features/payments/checkout/screens/___tests___/__snapshots__/WalletPaymentOutcomeScreen.test.tsx.snap index adbacb9b952..c2d0d89808d 100644 --- a/ts/features/payments/checkout/screens/___tests___/__snapshots__/WalletPaymentOutcomeScreen.test.tsx.snap +++ b/ts/features/payments/checkout/screens/___tests___/__snapshots__/WalletPaymentOutcomeScreen.test.tsx.snap @@ -1829,7 +1829,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -1892,7 +1892,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -1931,7 +1931,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -3978,7 +3978,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -4041,7 +4041,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -4080,7 +4080,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -6108,7 +6108,7 @@ Controlla di aver seguito correttamente le istruzioni della tua banca. @@ -6171,7 +6171,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -6210,7 +6210,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -8223,7 +8223,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -8286,7 +8286,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -8325,7 +8325,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -10352,7 +10352,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -10415,7 +10415,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -10454,7 +10454,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -12552,7 +12552,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -12615,7 +12615,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -12654,7 +12654,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -14724,7 +14724,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -14787,7 +14787,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -14826,7 +14826,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -16839,7 +16839,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -16902,7 +16902,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -16941,7 +16941,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -18904,7 +18904,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -18967,7 +18967,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -19006,7 +19006,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -21053,7 +21053,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -21116,7 +21116,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -21155,7 +21155,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -23182,7 +23182,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -23245,7 +23245,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -23284,7 +23284,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -25331,7 +25331,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -25394,7 +25394,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -25433,7 +25433,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -27531,7 +27531,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -27594,7 +27594,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -27633,7 +27633,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -29680,7 +29680,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -29743,7 +29743,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -29782,7 +29782,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -31829,7 +31829,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -31892,7 +31892,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -31931,7 +31931,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -33986,7 +33986,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -34049,7 +34049,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -34088,7 +34088,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -36115,7 +36115,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -36178,7 +36178,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -36217,7 +36217,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -38317,7 +38317,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -38380,7 +38380,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -38419,7 +38419,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -40446,7 +40446,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -40509,7 +40509,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -40548,7 +40548,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -42696,7 +42696,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -42759,7 +42759,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -42798,7 +42798,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -44984,7 +44984,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -45047,7 +45047,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -45086,7 +45086,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -47099,7 +47099,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -47162,7 +47162,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -47201,7 +47201,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -49256,7 +49256,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -49319,7 +49319,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -49358,7 +49358,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il @@ -51385,7 +51385,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -51448,7 +51448,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -51487,7 +51487,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il From 8d07888034dbe9a8e1381a3bcaa502db3d84213f Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Wed, 20 Nov 2024 14:20:43 +0100 Subject: [PATCH 11/46] Update `jest` snapshot --- .../__snapshots__/WalletPaymentOutcomeScreen.test.tsx.snap | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ts/features/payments/checkout/screens/___tests___/__snapshots__/WalletPaymentOutcomeScreen.test.tsx.snap b/ts/features/payments/checkout/screens/___tests___/__snapshots__/WalletPaymentOutcomeScreen.test.tsx.snap index 77279a6b3cf..378dfa60387 100644 --- a/ts/features/payments/checkout/screens/___tests___/__snapshots__/WalletPaymentOutcomeScreen.test.tsx.snap +++ b/ts/features/payments/checkout/screens/___tests___/__snapshots__/WalletPaymentOutcomeScreen.test.tsx.snap @@ -47248,7 +47248,7 @@ exports[`WalletPaymentOutcomeScreen for all outcomes should render the WalletPay @@ -47259,6 +47259,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -47349,7 +47350,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il From 16a8ae5a19bef406ca025da629399384ed61d49a Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Wed, 20 Nov 2024 17:33:38 +0100 Subject: [PATCH 12/46] Replace `LabelSmall` with `BodySmall` --- package.json | 2 +- ts/components/AppVersion.tsx | 6 +- ts/components/BonusCard/BonusCard.tsx | 6 +- ts/components/debug/DebugPrettyPrint.tsx | 29 ++++---- .../ui/IOScrollViewWithLargeHeader.tsx | 6 +- .../components/CameraPermissionView.tsx | 6 +- ts/features/bonus/cgn/components/CgnCard.tsx | 14 ++-- .../discount/CgnDiscountExpireProgressBar.tsx | 10 +-- ts/features/design-system/DesignSystem.tsx | 6 +- ts/features/design-system/core/DSColors.tsx | 6 +- .../core/DSDynamicBackground.tsx | 6 +- ts/features/design-system/core/DSLayout.tsx | 22 +++--- .../design-system/core/DSLegacyTextFields.tsx | 11 +-- .../design-system/core/DSNumberPad.tsx | 9 ++- .../design-system/core/DSSelection.tsx | 6 +- .../design-system/core/DSTypography.tsx | 70 +++++++++---------- .../fci/components/SignatureRequestItem.tsx | 6 +- .../components/FimsHistoryListItem.tsx | 10 +-- .../BarcodeExpirationProgressBar.tsx | 10 +-- .../screens/IdPayBarcodeResultScreen.tsx | 10 +-- .../screens/IbanOnboardingScreen.tsx | 6 +- .../InitiativeConfigurationIntroScreen.tsx | 6 +- .../components/BeneficiaryDetailsContent.tsx | 6 +- .../IdPayInitiativeLastUpdateCounter.tsx | 6 +- .../InitiativeTimelineComponent.tsx | 6 +- .../components/OnboardingPrivacyAdvice.tsx | 24 ++++--- .../components/IDPayCardPreviewComponent.tsx | 6 +- .../components/ItwRequiredClaimsList.tsx | 6 +- .../components/Home/DS/MessageListItem.tsx | 14 ++-- .../components/Home/PreconditionsFeedback.tsx | 6 +- .../MessageDetail/MessageDetailsHeader.tsx | 6 +- .../MessageDetail/OrganizationHeader.tsx | 8 +-- .../common/components/PaymentCard.tsx | 21 +++--- .../common/components/PaymentCardBig.tsx | 10 +-- .../components/NotificationPreviewSample.tsx | 4 +- .../components/ListItemSearchInstitution.tsx | 6 +- .../common/components/ServicesHeader.tsx | 6 +- ts/screens/modal/IdentificationLockModal.tsx | 10 +-- ts/screens/modal/RootedDeviceModal.tsx | 6 +- ts/screens/profile/FiscalCodeScreen.tsx | 6 +- .../services/ServicesContactComponent.tsx | 6 +- .../playgrounds/IdPayOnboardingPlayground.tsx | 5 +- .../playgrounds/MarkdownPlayground.tsx | 4 +- yarn.lock | 8 +-- 44 files changed, 225 insertions(+), 218 deletions(-) diff --git a/package.json b/package.json index 602bedc5240..2fb630ef56f 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "dependencies": { "@babel/plugin-transform-regenerator": "^7.18.6", "@gorhom/bottom-sheet": "^4.1.5", - "@pagopa/io-app-design-system": "3.1.0", + "@pagopa/io-app-design-system": "4.0.0", "@pagopa/io-pagopa-commons": "^3.1.0", "@pagopa/io-react-native-cieid": "^0.3.5", "@pagopa/io-react-native-crypto": "^0.3.0", diff --git a/ts/components/AppVersion.tsx b/ts/components/AppVersion.tsx index 12a191500a1..08e433c9d41 100644 --- a/ts/components/AppVersion.tsx +++ b/ts/components/AppVersion.tsx @@ -5,7 +5,7 @@ import { StyleSheet, View } from "react-native"; -import { LabelSmall } from "@pagopa/io-app-design-system"; +import { BodySmall } from "@pagopa/io-app-design-system"; import I18n from "../i18n"; import { WithTestID } from "../types/WithTestID"; import { getAppVersion } from "../utils/appVersion"; @@ -33,9 +33,9 @@ const AppVersion = ({ onPress, testID }: AppVersion) => { accessibilityLabel={appVersionText} > - + {appVersionText} - + ); diff --git a/ts/components/BonusCard/BonusCard.tsx b/ts/components/BonusCard/BonusCard.tsx index d9dca3816b6..22f73c3da71 100644 --- a/ts/components/BonusCard/BonusCard.tsx +++ b/ts/components/BonusCard/BonusCard.tsx @@ -3,7 +3,7 @@ import { H2, HSpacer, IOColors, - LabelSmall, + BodySmall, VSpacer } from "@pagopa/io-app-design-system"; import React from "react"; @@ -72,12 +72,12 @@ const BonusCardContent = (props: BonusCard) => { {name} - {organizationName} - + {status} diff --git a/ts/components/debug/DebugPrettyPrint.tsx b/ts/components/debug/DebugPrettyPrint.tsx index c370c8cd025..8c9ab56e8ba 100644 --- a/ts/components/debug/DebugPrettyPrint.tsx +++ b/ts/components/debug/DebugPrettyPrint.tsx @@ -3,12 +3,12 @@ WARNING: This component is not referenced anywhere, but is used for development purposes. Please, Don't REMOVE it, thank you! */ import { + BodySmall, HStack, IOColors, + IOText, IconButton, - LabelSmall, - useIOToast, - useTypographyFactory + useIOToast } from "@pagopa/io-app-design-system"; import React from "react"; import { StyleSheet, View } from "react-native"; @@ -53,9 +53,15 @@ export const DebugPrettyPrint = withDebugEnabled( return ( - + {JSON.stringify(truncateObjectStrings(data), null, 2)} - + ); }, [data, expandable, expanded]); @@ -82,9 +88,9 @@ export const DebugPrettyPrint = withDebugEnabled( return ( - + {title} - + - useTypographyFactory({ - ...props, - defaultWeight: "Medium", - defaultColor: "bluegrey", - font: "DMMono", - fontStyle: { fontSize: 12, lineHeight: 18 } - }); - const styles = StyleSheet.create({ container: { borderRadius: 4, diff --git a/ts/components/ui/IOScrollViewWithLargeHeader.tsx b/ts/components/ui/IOScrollViewWithLargeHeader.tsx index dd1ce6d2075..c2c3086a9fc 100644 --- a/ts/components/ui/IOScrollViewWithLargeHeader.tsx +++ b/ts/components/ui/IOScrollViewWithLargeHeader.tsx @@ -6,7 +6,7 @@ import { H2, HeaderSecondLevel, IOStyles, - LabelSmall, + BodySmall, VSpacer, useIOTheme } from "@pagopa/io-app-design-system"; @@ -117,9 +117,9 @@ export const IOScrollViewWithLargeHeader = forwardRef( onLayout={getTitleHeight} > {title.section && ( - + {title.section} - + )}

( {props.title}

- + {props.body} - + {
{I18n.t("bonus.cgn.name")}
{isExpired && expiredTag}
- + {I18n.t("bonus.cgn.departmentName")} - - + + {expireDate && I18n.t("bonusCard.validUntil", { endDate: format(expireDate, "MM/YY") })} - +
{!isExpired && cngLogoComponent} {withEycaLogo && eycaLogoComponent} diff --git a/ts/features/bonus/cgn/components/merchants/discount/CgnDiscountExpireProgressBar.tsx b/ts/features/bonus/cgn/components/merchants/discount/CgnDiscountExpireProgressBar.tsx index 1e5808d4126..4b76548d257 100644 --- a/ts/features/bonus/cgn/components/merchants/discount/CgnDiscountExpireProgressBar.tsx +++ b/ts/features/bonus/cgn/components/merchants/discount/CgnDiscountExpireProgressBar.tsx @@ -1,4 +1,4 @@ -import { LabelSmall, VSpacer } from "@pagopa/io-app-design-system"; +import { BodySmall, VSpacer } from "@pagopa/io-app-design-system"; import { format } from "date-fns"; import * as React from "react"; import { StyleSheet, View } from "react-native"; @@ -39,12 +39,12 @@ export const CgnDiscountExpireProgressBar = ({ - + {I18n.t("idpay.barCode.resultScreen.success.expiresIn")} - - + + {formattedSecondsToExpiration} - +
); diff --git a/ts/features/design-system/DesignSystem.tsx b/ts/features/design-system/DesignSystem.tsx index 2f34f777c18..55af8532d4a 100644 --- a/ts/features/design-system/DesignSystem.tsx +++ b/ts/features/design-system/DesignSystem.tsx @@ -2,7 +2,7 @@ import { Divider, H2, IOVisualCostants, - LabelSmall, + BodySmall, ListItemNav, VSpacer, VStack, @@ -111,9 +111,9 @@ export const DesignSystem = () => {

{title}

{description && ( - + {description} - + )}
); diff --git a/ts/features/design-system/core/DSColors.tsx b/ts/features/design-system/core/DSColors.tsx index e5901002e29..141b3ffb784 100644 --- a/ts/features/design-system/core/DSColors.tsx +++ b/ts/features/design-system/core/DSColors.tsx @@ -10,7 +10,7 @@ import { IOColorsTints, IOThemeDark, IOThemeLight, - LabelSmall, + BodySmall, VStack, hexToRgba, themeStatusColorsDarkMode, @@ -300,10 +300,10 @@ export const DSColors = () => {

Legacy palette (†2023)

- + Not moved to the “Legacy” category yet, because it's currently used everywhere - +
diff --git a/ts/features/design-system/core/DSDynamicBackground.tsx b/ts/features/design-system/core/DSDynamicBackground.tsx index 010d7d2cc8a..6584301922f 100644 --- a/ts/features/design-system/core/DSDynamicBackground.tsx +++ b/ts/features/design-system/core/DSDynamicBackground.tsx @@ -8,7 +8,7 @@ import { HStack, IOColors, IOVisualCostants, - LabelSmall, + BodySmall, RadioGroup, VStack, hexToRgba, @@ -163,13 +163,13 @@ export const DSDynamicBackground = () => { />

{entityData?.name}

- {entityData?.name} - +
diff --git a/ts/features/design-system/core/DSLayout.tsx b/ts/features/design-system/core/DSLayout.tsx index b6722f1b0c1..8ef0c147e53 100644 --- a/ts/features/design-system/core/DSLayout.tsx +++ b/ts/features/design-system/core/DSLayout.tsx @@ -8,7 +8,7 @@ import { IOAppMargin, IOColors, IOSpacer, - LabelSmall, + BodySmall, VStack, useIOTheme } from "@pagopa/io-app-design-system"; @@ -59,13 +59,13 @@ const Grid = () => { }} > Content example - {value} - +
@@ -204,10 +204,10 @@ const VStackBlocks = () => { backgroundColor: IOColors[theme["appBackground-tertiary"]] }} > - {`Block n.${i + 1}`} + >{`Block n.${i + 1}`} ))} { backgroundColor: IOColors[theme["appBackground-tertiary"]] }} > - + Different height - + ); @@ -243,9 +243,9 @@ const HStackBlocks = () => { backgroundColor: IOColors[theme["appBackground-tertiary"]] }} > - {`${ + {`${ i + 1 - }`} + }`} ))} { backgroundColor: IOColors[theme["appBackground-tertiary"]] }} > - + Growing block - + ); diff --git a/ts/features/design-system/core/DSLegacyTextFields.tsx b/ts/features/design-system/core/DSLegacyTextFields.tsx index 51ea4adac5f..41f60c1097a 100644 --- a/ts/features/design-system/core/DSLegacyTextFields.tsx +++ b/ts/features/design-system/core/DSLegacyTextFields.tsx @@ -1,9 +1,4 @@ -import { - H4, - IOColors, - LabelSmall, - VSpacer -} from "@pagopa/io-app-design-system"; +import { H4, IOColors, BodySmall, VSpacer } from "@pagopa/io-app-design-system"; import * as O from "fp-ts/lib/Option"; import { pipe } from "fp-ts/lib/function"; import React, { useState } from "react"; @@ -201,9 +196,9 @@ const LegacyTextFields = () => { accessibilityElementsHidden={true} importantForAccessibility="no-hide-descendants" > - + With two lines, this custom description breaks everything ¯\_(ツ)_/¯ - + diff --git a/ts/features/design-system/core/DSNumberPad.tsx b/ts/features/design-system/core/DSNumberPad.tsx index 3b67cc0aa38..7f9c551296e 100644 --- a/ts/features/design-system/core/DSNumberPad.tsx +++ b/ts/features/design-system/core/DSNumberPad.tsx @@ -7,7 +7,7 @@ import { NumberPad, VSpacer, hexToRgba, - LabelSmall, + BodySmall, IOVisualCostants, Pictogram, Body, @@ -96,9 +96,12 @@ export const DSNumberPad = () => { bottom: -32 }} > - + {value} - + > => [ { value: "Let's try with JSX description", description: ( - + Ti contatteranno solo i servizi che hanno qualcosa di importante da dirti.{" "} Potrai sempre disattivare le comunicazioni che non ti interessano. - + ), id: "example-jsx-element" }, diff --git a/ts/features/design-system/core/DSTypography.tsx b/ts/features/design-system/core/DSTypography.tsx index 79ce3a4f4b9..5563710fdc8 100644 --- a/ts/features/design-system/core/DSTypography.tsx +++ b/ts/features/design-system/core/DSTypography.tsx @@ -14,7 +14,7 @@ import { Hero, IOColors, LabelMini, - LabelSmall, + BodySmall, MdH1, MdH2, MdH3, @@ -45,7 +45,7 @@ export const DSTypography = () => ( - +
@@ -89,7 +89,7 @@ const H3Row = () => { const theme = useIOTheme(); return ( - +

Header H3

Header H3

{ >

Header H3

+

Header H3 Bold

); }; @@ -182,7 +183,6 @@ const BodyRow = () => ( eget pharetra mauris posuere semper. Body Semibold - Body Bold Body asLink @@ -190,53 +190,53 @@ const BodyRow = () => (
); -export const LabelSmallRow = () => { +export const BodySmallRow = () => { const theme = useIOTheme(); return ( <> - - Label small - Label small + + Body small + Body small - Label small + Body small - - Label small asLink - + + Body small asLink + - - Label small SB - - Label small SB - + + Body small SB + + Body small SB + - - Label small SB - + + Body small SB + - - Label small SB asLink - + + Body small SB asLink + - Label small Regular - - Label small Regular - + Body small Regular + + Body small Regular + - - Label small Regular - + + Body small Regular + - - Label small Regular asLink - + + Body small Regular asLink + ); @@ -247,7 +247,7 @@ export const LabelMiniRow = () => { return ( <> - + Label mini Label mini { - + Label mini Regular Label mini Regular diff --git a/ts/features/fci/components/SignatureRequestItem.tsx b/ts/features/fci/components/SignatureRequestItem.tsx index d0ecdc51e17..a894641e7b3 100644 --- a/ts/features/fci/components/SignatureRequestItem.tsx +++ b/ts/features/fci/components/SignatureRequestItem.tsx @@ -5,7 +5,7 @@ import { Divider, H6, HSpacer, - LabelSmall + BodySmall } from "@pagopa/io-app-design-system"; import { SignatureRequestListView } from "../../../../definitions/fci/SignatureRequestListView"; import { SignatureRequestStatusEnum } from "../../../../definitions/fci/SignatureRequestStatus"; @@ -66,13 +66,13 @@ const SignatureRequestItem = (props: Props) => { >
{item.dossier_title}
- + {I18n.t("features.fci.requests.itemSubtitle", { date: item.created_at.toLocaleDateString(), time: item.created_at.toLocaleTimeString(), id: item.id })} - +
{renderStatusLabel()} diff --git a/ts/features/fims/history/components/FimsHistoryListItem.tsx b/ts/features/fims/history/components/FimsHistoryListItem.tsx index e0f96d7fcdf..e098e64ec9e 100644 --- a/ts/features/fims/history/components/FimsHistoryListItem.tsx +++ b/ts/features/fims/history/components/FimsHistoryListItem.tsx @@ -5,7 +5,7 @@ import { Icon, IOListItemStyles, IOStyles, - LabelSmall, + BodySmall, useIOTheme, VSpacer } from "@pagopa/io-app-design-system"; @@ -52,9 +52,9 @@ const SuccessListItem = ({ serviceData, consent }: SuccessListItemProps) => {
{serviceData.organization_name}
- + {consent.redirect?.display_name} - + ); }; @@ -82,9 +82,9 @@ const FailureListItem = ({ item }: BaseHistoryListItemProps) => { - + {I18n.t("FIMS.history.errorStates.dataUnavailable")} - + diff --git a/ts/features/idpay/barcode/components/BarcodeExpirationProgressBar.tsx b/ts/features/idpay/barcode/components/BarcodeExpirationProgressBar.tsx index 97b8a4669af..f240d3391f9 100644 --- a/ts/features/idpay/barcode/components/BarcodeExpirationProgressBar.tsx +++ b/ts/features/idpay/barcode/components/BarcodeExpirationProgressBar.tsx @@ -1,4 +1,4 @@ -import { LabelSmall, VSpacer } from "@pagopa/io-app-design-system"; +import { BodySmall, VSpacer } from "@pagopa/io-app-design-system"; import { format } from "date-fns"; import * as React from "react"; import { StyleSheet, View } from "react-native"; @@ -42,12 +42,12 @@ export const IdPayBarcodeExpireProgressBar = ({ - + {I18n.t("idpay.barCode.resultScreen.success.expiresIn")} - - + + {formattedSecondsToExpiration} - + ); diff --git a/ts/features/idpay/barcode/screens/IdPayBarcodeResultScreen.tsx b/ts/features/idpay/barcode/screens/IdPayBarcodeResultScreen.tsx index aae2b61bf31..48e92f02046 100644 --- a/ts/features/idpay/barcode/screens/IdPayBarcodeResultScreen.tsx +++ b/ts/features/idpay/barcode/screens/IdPayBarcodeResultScreen.tsx @@ -7,7 +7,7 @@ import { IOColors, IOStyles, IOVisualCostants, - LabelSmall, + BodySmall, VSpacer } from "@pagopa/io-app-design-system"; import * as pot from "@pagopa/ts-commons/lib/pot"; @@ -146,12 +146,12 @@ const SuccessContent = ({ goBack, barcode }: SuccessContentProps) => { - + {I18n.t("idpay.barCode.resultScreen.success.validUpTo")} - - + + {formatNumberCurrencyCents(barcode.residualBudgetCents)} - + diff --git a/ts/features/idpay/configuration/screens/IbanOnboardingScreen.tsx b/ts/features/idpay/configuration/screens/IbanOnboardingScreen.tsx index 560b4811ea2..b7e93d9c554 100644 --- a/ts/features/idpay/configuration/screens/IbanOnboardingScreen.tsx +++ b/ts/features/idpay/configuration/screens/IbanOnboardingScreen.tsx @@ -4,7 +4,7 @@ import { H2, HSpacer, Icon, - LabelSmall, + BodySmall, VSpacer } from "@pagopa/io-app-design-system"; import * as O from "fp-ts/lib/Option"; @@ -90,11 +90,11 @@ export const IbanOnboardingScreen = () => { > - + {isSettingsVisibleAndHideProfile ? I18n.t("idpay.configuration.iban.onboarding.bottomLabel") : I18n.t("idpay.configuration.iban.onboarding.legacyBottomLabel")} - + { )}
{props.title}
- + {props.subTitle} - +
); diff --git a/ts/features/idpay/details/components/BeneficiaryDetailsContent.tsx b/ts/features/idpay/details/components/BeneficiaryDetailsContent.tsx index 4384e35f2e6..71349c27c27 100644 --- a/ts/features/idpay/details/components/BeneficiaryDetailsContent.tsx +++ b/ts/features/idpay/details/components/BeneficiaryDetailsContent.tsx @@ -1,4 +1,4 @@ -import { Body, LabelSmall, VSpacer } from "@pagopa/io-app-design-system"; +import { Body, BodySmall, VSpacer } from "@pagopa/io-app-design-system"; import { NonEmptyString } from "@pagopa/ts-commons/lib/strings"; import { useNavigation } from "@react-navigation/native"; import { sequenceS } from "fp-ts/lib/Apply"; @@ -235,9 +235,9 @@ const BeneficiaryDetailsContent = (props: BeneficiaryDetailsProps) => { ]} /> - + {lastUpdateString} - + { ); return ( - { "idpay.initiative.details.initiativeDetailsScreen.configured.lastUpdated" )} {lastUpdateString} - + ); }; diff --git a/ts/features/idpay/details/components/InitiativeTimelineComponent.tsx b/ts/features/idpay/details/components/InitiativeTimelineComponent.tsx index 31d8e070747..dfc3214da2a 100644 --- a/ts/features/idpay/details/components/InitiativeTimelineComponent.tsx +++ b/ts/features/idpay/details/components/InitiativeTimelineComponent.tsx @@ -2,7 +2,7 @@ import { Body, Divider, H6, - LabelSmall, + BodySmall, VSpacer } from "@pagopa/io-app-design-system"; import * as pot from "@pagopa/ts-commons/lib/pot"; @@ -108,7 +108,7 @@ const TimelineComponentSkeleton = ({ size = 3 }: Pick) => ( ); const EmptyTimelineComponent = () => ( - ( {I18n.t( "idpay.initiative.details.initiativeDetailsScreen.configured.yourOperationsSubtitle" )} - + ); const InitiativeTimelineComponentSkeleton = ({ diff --git a/ts/features/idpay/onboarding/components/OnboardingPrivacyAdvice.tsx b/ts/features/idpay/onboarding/components/OnboardingPrivacyAdvice.tsx index 3b70ff545f9..87cde38f709 100644 --- a/ts/features/idpay/onboarding/components/OnboardingPrivacyAdvice.tsx +++ b/ts/features/idpay/onboarding/components/OnboardingPrivacyAdvice.tsx @@ -1,4 +1,4 @@ -import { Body, IOToast, LabelSmall } from "@pagopa/io-app-design-system"; +import { Body, IOToast, BodySmall } from "@pagopa/io-app-design-system"; import * as React from "react"; import I18n from "../../../../i18n"; import { openWebUrl } from "../../../../utils/url"; @@ -19,26 +19,28 @@ const OnboardingPrivacyAdvice = (props: OnboardingPrivacyAdviceProps) => { return ( - + {I18n.t("idpay.onboarding.beforeContinue.text1")} - - + {I18n.t("idpay.onboarding.beforeContinue.tosLink")} - - + + {I18n.t("idpay.onboarding.beforeContinue.text2")} - - + {I18n.t("idpay.onboarding.beforeContinue.privacyLink")} - + ); }; diff --git a/ts/features/idpay/wallet/components/IDPayCardPreviewComponent.tsx b/ts/features/idpay/wallet/components/IDPayCardPreviewComponent.tsx index 7eba032cbe3..c76a67c0a87 100644 --- a/ts/features/idpay/wallet/components/IDPayCardPreviewComponent.tsx +++ b/ts/features/idpay/wallet/components/IDPayCardPreviewComponent.tsx @@ -2,7 +2,7 @@ import { H6, HSpacer, IOColors, - LabelSmall, + BodySmall, VSpacer, hexToRgba } from "@pagopa/io-app-design-system"; @@ -83,9 +83,9 @@ const IDPayCardPreviewComponent = (props: Props) => { {initiativeName} - + {availableAmount} - + {logoComponent} diff --git a/ts/features/itwallet/issuance/components/ItwRequiredClaimsList.tsx b/ts/features/itwallet/issuance/components/ItwRequiredClaimsList.tsx index 0c60e3b2c89..23f7319c5d9 100644 --- a/ts/features/itwallet/issuance/components/ItwRequiredClaimsList.tsx +++ b/ts/features/itwallet/issuance/components/ItwRequiredClaimsList.tsx @@ -3,7 +3,7 @@ import { H6, Icon, IOColors, - LabelSmall + BodySmall } from "@pagopa/io-app-design-system"; import * as E from "fp-ts/Either"; import * as RA from "fp-ts/lib/ReadonlyArray"; @@ -51,11 +51,11 @@ const ItwRequiredClaimsList = ({ items }: ItwRequiredClaimsListProps) => ( - + {I18n.t("features.itWallet.generic.dataSource.single", { credentialSource: source })} - + diff --git a/ts/features/messages/components/Home/DS/MessageListItem.tsx b/ts/features/messages/components/Home/DS/MessageListItem.tsx index f12d50cbc94..c181e76c007 100644 --- a/ts/features/messages/components/Home/DS/MessageListItem.tsx +++ b/ts/features/messages/components/Home/DS/MessageListItem.tsx @@ -6,7 +6,7 @@ import { IOColors, IOStyles, IOVisualCostants, - LabelSmall, + BodySmall, Tag, WithTestID } from "@pagopa/io-app-design-system"; @@ -133,19 +133,19 @@ export const MessageListItem = ({
{organizationName}
- {formattedDate} - + - - {`${serviceName} · `} - {messageTitle} - + + {`${serviceName} · `} + {messageTitle} + {!isRead && ( diff --git a/ts/features/messages/components/Home/PreconditionsFeedback.tsx b/ts/features/messages/components/Home/PreconditionsFeedback.tsx index 5ebc887acfe..7b7bdafdad9 100644 --- a/ts/features/messages/components/Home/PreconditionsFeedback.tsx +++ b/ts/features/messages/components/Home/PreconditionsFeedback.tsx @@ -1,7 +1,7 @@ import { H3, IOPictograms, - LabelSmall, + BodySmall, Pictogram, useIOTheme, VSpacer @@ -45,13 +45,13 @@ export const PreconditionsFeedback = ({ {subtitle && ( <> - {subtitle} - + )} diff --git a/ts/features/messages/components/MessageDetail/MessageDetailsHeader.tsx b/ts/features/messages/components/MessageDetail/MessageDetailsHeader.tsx index 5013a60efe8..5d6bb630f16 100644 --- a/ts/features/messages/components/MessageDetail/MessageDetailsHeader.tsx +++ b/ts/features/messages/components/MessageDetail/MessageDetailsHeader.tsx @@ -1,6 +1,6 @@ import React, { PropsWithChildren } from "react"; import { StyleSheet, View } from "react-native"; -import { Divider, H3, LabelSmall, VSpacer } from "@pagopa/io-app-design-system"; +import { Divider, H3, BodySmall, VSpacer } from "@pagopa/io-app-design-system"; import { pipe } from "fp-ts/lib/function"; import * as O from "fp-ts/lib/Option"; import * as pot from "@pagopa/ts-commons/lib/pot"; @@ -38,12 +38,12 @@ const MessageDetailsHeaderContent = ({ <>

{subject}

- + {localeDateFormat( createdAt, I18n.t("global.dateFormats.fullFormatShortMonthLiteralWithTime") )} - + ); diff --git a/ts/features/messages/components/MessageDetail/OrganizationHeader.tsx b/ts/features/messages/components/MessageDetail/OrganizationHeader.tsx index 4b36bc52732..44d59ab6921 100644 --- a/ts/features/messages/components/MessageDetail/OrganizationHeader.tsx +++ b/ts/features/messages/components/MessageDetail/OrganizationHeader.tsx @@ -3,7 +3,7 @@ import { Body, IOSpacingScale, IOStyles, - LabelSmall, + BodySmall, useIOTheme } from "@pagopa/io-app-design-system"; import React, { useCallback } from "react"; @@ -67,13 +67,13 @@ export const OrganizationHeader = ({ {organizationName} - {serviceName} - +
{paymentData ? ( diff --git a/ts/features/payments/common/components/PaymentCard.tsx b/ts/features/payments/common/components/PaymentCard.tsx index 5a5e0f416c2..0994f2a190f 100644 --- a/ts/features/payments/common/components/PaymentCard.tsx +++ b/ts/features/payments/common/components/PaymentCard.tsx @@ -1,7 +1,7 @@ import { H6, IOColors, - LabelSmall, + BodySmall, Tag, VSpacer, WithTestID @@ -45,42 +45,45 @@ const PaymentCard = (props: PaymentCardComponentProps) => { ); const holderNameText = props.holderName && ( - {props.holderName} - + ); const expireDateText = props.expireDate && ( - + {I18n.t("wallet.creditCard.validUntil", { expDate: format(props.expireDate, "MM/YY") })} - + ); const maskedEmailText = props.holderEmail && ( - {props.holderEmail} - + ); const maskedPhoneText = props.holderPhone && ( - {props.holderPhone} - + ); const renderBankLogo = () => { diff --git a/ts/features/payments/common/components/PaymentCardBig.tsx b/ts/features/payments/common/components/PaymentCardBig.tsx index c7eab3d4f63..fd1181d73d2 100644 --- a/ts/features/payments/common/components/PaymentCardBig.tsx +++ b/ts/features/payments/common/components/PaymentCardBig.tsx @@ -4,7 +4,7 @@ import { IOColors, IOLogoPaymentExtType, IOStyles, - LabelSmall, + BodySmall, LogoPaymentExt, VSpacer } from "@pagopa/io-app-design-system"; @@ -45,7 +45,7 @@ const BigPaymentCardBottomSection = (props: PaymentCardStandardProps) => { case "BANCOMATPAY": return ( - { weight="Regular" > {props.phoneNumber} - + { return ( <> - + {I18n.t("wallet.creditCard.validUntil", { expDate: format(expDate, "MM/YY") })} - + ); } diff --git a/ts/features/pushNotifications/components/NotificationPreviewSample.tsx b/ts/features/pushNotifications/components/NotificationPreviewSample.tsx index 0b03744c636..064b8bd3fc8 100644 --- a/ts/features/pushNotifications/components/NotificationPreviewSample.tsx +++ b/ts/features/pushNotifications/components/NotificationPreviewSample.tsx @@ -5,7 +5,7 @@ import { IOSpacingScale, IOStyles, Icon, - LabelSmall + BodySmall } from "@pagopa/io-app-design-system"; import React from "react"; import { StyleSheet, View } from "react-native"; @@ -78,7 +78,7 @@ export const NotificationPreviewSample = ({
{I18n.t(titleKey)}
- {I18n.t(messageKey)} + {I18n.t(messageKey)}
); diff --git a/ts/features/services/common/components/ListItemSearchInstitution.tsx b/ts/features/services/common/components/ListItemSearchInstitution.tsx index 927a48434cf..ca345a83641 100644 --- a/ts/features/services/common/components/ListItemSearchInstitution.tsx +++ b/ts/features/services/common/components/ListItemSearchInstitution.tsx @@ -20,7 +20,7 @@ import { IOSpringValues, IOStyles, Icon, - LabelSmall, + BodySmall, WithTestID, hexToRgba, useIOExperimentalDesign, @@ -71,9 +71,9 @@ export const ListItemSearchInstitution = memo( {description && ( <> {typeof description === "string" ? ( - + {description} - + ) : ( description )} diff --git a/ts/features/services/common/components/ServicesHeader.tsx b/ts/features/services/common/components/ServicesHeader.tsx index 1016f0c134c..b1ce01c5289 100644 --- a/ts/features/services/common/components/ServicesHeader.tsx +++ b/ts/features/services/common/components/ServicesHeader.tsx @@ -5,7 +5,7 @@ import { IOSpacingScale, IOStyles, IOVisualCostants, - LabelSmall, + BodySmall, useIOTheme, VSpacer } from "@pagopa/io-app-design-system"; @@ -48,9 +48,9 @@ export const ServicesHeader = ({

{title}

- + {subTitle} - +
); diff --git a/ts/screens/modal/IdentificationLockModal.tsx b/ts/screens/modal/IdentificationLockModal.tsx index c05fc31a4f1..fc22e8423a9 100644 --- a/ts/screens/modal/IdentificationLockModal.tsx +++ b/ts/screens/modal/IdentificationLockModal.tsx @@ -5,7 +5,7 @@ import { View, Modal, StyleSheet, SafeAreaView } from "react-native"; import { ContentWrapper, H4, - LabelSmall, + BodySmall, Pictogram, VSpacer } from "@pagopa/io-app-design-system"; @@ -56,10 +56,12 @@ const Countdown = (props: CountdownProps) => { - + {waitMessageText} - - {timerCount}s + + + {` ${timerCount}s`} + ); diff --git a/ts/screens/modal/RootedDeviceModal.tsx b/ts/screens/modal/RootedDeviceModal.tsx index d8254504903..7d625ce2783 100644 --- a/ts/screens/modal/RootedDeviceModal.tsx +++ b/ts/screens/modal/RootedDeviceModal.tsx @@ -3,7 +3,7 @@ import { ButtonOutline, ContentWrapper, H3, - LabelSmall, + BodySmall, Pictogram, VSpacer } from "@pagopa/io-app-design-system"; @@ -57,13 +57,13 @@ const RootedDeviceModal = () => { - {I18n.t("rooted.body")} - + diff --git a/ts/screens/profile/FiscalCodeScreen.tsx b/ts/screens/profile/FiscalCodeScreen.tsx index 200e3c01f58..603037802cd 100644 --- a/ts/screens/profile/FiscalCodeScreen.tsx +++ b/ts/screens/profile/FiscalCodeScreen.tsx @@ -5,7 +5,7 @@ import { VSpacer, ContentWrapper, H3, - LabelSmall + BodySmall } from "@pagopa/io-app-design-system"; import Barcode from "react-native-barcode-builder"; import { useFocusEffect } from "@react-navigation/native"; @@ -93,9 +93,9 @@ const FiscalCodeScreen = () => { style={styles.box} testID="barcode-box" > - + {nameSurname} - + { value: I18n.t("services.optIn.preferences.quickConfig.title"), id: ServicesPreferencesModeEnum.AUTO, description: ( - + {I18n.t("services.optIn.preferences.quickConfig.body.text1")}{" "} {I18n.t("services.optIn.preferences.quickConfig.body.text2")} - + ) }, { diff --git a/ts/screens/profile/playgrounds/IdPayOnboardingPlayground.tsx b/ts/screens/profile/playgrounds/IdPayOnboardingPlayground.tsx index 6f5244e7e02..b5c97421a27 100644 --- a/ts/screens/profile/playgrounds/IdPayOnboardingPlayground.tsx +++ b/ts/screens/profile/playgrounds/IdPayOnboardingPlayground.tsx @@ -3,7 +3,7 @@ import { BodyMonospace, H4, IOColors, - LabelSmall, + BodySmall, PressableListItemBase, VSpacer } from "@pagopa/io-app-design-system"; @@ -176,7 +176,8 @@ const TestServiceItem = (props: TestServiceItemProps) => { }} > - {label} {willFail ? "❌" : "✅"} + {label}{" "} + {willFail ? "❌" : "✅"} {serviceId} diff --git a/ts/screens/profile/playgrounds/MarkdownPlayground.tsx b/ts/screens/profile/playgrounds/MarkdownPlayground.tsx index 335dea36d93..6303db9ca70 100644 --- a/ts/screens/profile/playgrounds/MarkdownPlayground.tsx +++ b/ts/screens/profile/playgrounds/MarkdownPlayground.tsx @@ -5,7 +5,7 @@ import { IOColors, IOVisualCostants, IconButtonSolid, - LabelSmall, + BodySmall, VSpacer } from "@pagopa/io-app-design-system"; import { useLinkTo } from "@react-navigation/native"; @@ -179,7 +179,7 @@ const MarkdownPlayground = () => { - {isMarkdownSet && {ctaMessage}} + {isMarkdownSet && {ctaMessage}} {O.isSome(maybeCTA) && ( diff --git a/yarn.lock b/yarn.lock index ddd388224b7..23d4b6901d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2215,10 +2215,10 @@ dependencies: "@types/node" ">= 8" -"@pagopa/io-app-design-system@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@pagopa/io-app-design-system/-/io-app-design-system-3.1.0.tgz#6766851f53e11c06b0bcfee4786ed5dfbd79d950" - integrity sha512-bsncsKZ5Pm8P31E1IHObBzx9ptSAkODewnmtB/drVAwNwMnSjbUJ2/M2RKcAs0rl+Fq3nKnFzbh1giyZ1CgEOg== +"@pagopa/io-app-design-system@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@pagopa/io-app-design-system/-/io-app-design-system-4.0.0.tgz#cc7aea4423381484afc4705b58d6da7700b68e1b" + integrity sha512-Xyo/V0+rHxe34LYOPDSIhI4qrPwWa894dHRB1zz/t9EymgbGvuNAIyqEoPDkhqV11ndg4cMF7Ok8eAhXXH+YxQ== dependencies: "@testing-library/jest-native" "^5.4.2" "@types/react-test-renderer" "^18.0.0" From 939e578c0e1eb524401ffe5a61e83db4d4496d1f Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Wed, 20 Nov 2024 18:02:30 +0100 Subject: [PATCH 13/46] Fix `tsc` errors, except for `ClaimLabel` --- .../components/FimsSuccessBody.tsx | 4 +- .../code/screens/IdPayCodeDisplayScreen.tsx | 2 +- .../common/components/ItwMarkdown.tsx | 2 +- .../ItwSkeumorphicCard/ClaimLabel.tsx | 41 +++++++++---------- ...uanceCredentialAsyncContinuationScreen.tsx | 2 +- .../home/components/FeaturedServiceCard.tsx | 11 ++++- .../home/components/OrganizationNameLabel.tsx | 39 ------------------ .../profile/DownloadProfileDataScreen.tsx | 4 +- .../profile/RemoveAccountInfoScreen.tsx | 2 +- ts/screens/profile/TrialSystemPlayground.tsx | 2 +- ts/utils/identification/index.tsx | 6 +-- 11 files changed, 41 insertions(+), 74 deletions(-) delete mode 100644 ts/features/services/home/components/OrganizationNameLabel.tsx diff --git a/ts/features/fims/singleSignOn/components/FimsSuccessBody.tsx b/ts/features/fims/singleSignOn/components/FimsSuccessBody.tsx index c3e82e8cc19..51a4c2607fc 100644 --- a/ts/features/fims/singleSignOn/components/FimsSuccessBody.tsx +++ b/ts/features/fims/singleSignOn/components/FimsSuccessBody.tsx @@ -86,9 +86,9 @@ export const FimsFlowSuccessBody = ({ serviceData !== undefined ? ( {I18n.t("FIMS.consentsScreen.subtitle")} - {serviceData.organization_name} + {serviceData.organization_name} {I18n.t("FIMS.consentsScreen.subtitle2")} - {consents.redirect.display_name ?? ""}. + {consents.redirect.display_name ?? ""}. ) : ( diff --git a/ts/features/idpay/code/screens/IdPayCodeDisplayScreen.tsx b/ts/features/idpay/code/screens/IdPayCodeDisplayScreen.tsx index ff8c9383ab1..3f837cf6ad6 100644 --- a/ts/features/idpay/code/screens/IdPayCodeDisplayScreen.tsx +++ b/ts/features/idpay/code/screens/IdPayCodeDisplayScreen.tsx @@ -88,7 +88,7 @@ const IdPayCodeDisplayScreen = () => { {I18n.t("idpay.code.onboarding.body1")} - + {I18n.t("idpay.code.onboarding.bodyBold")} diff --git a/ts/features/itwallet/common/components/ItwMarkdown.tsx b/ts/features/itwallet/common/components/ItwMarkdown.tsx index 96367082a22..74ac212e99d 100644 --- a/ts/features/itwallet/common/components/ItwMarkdown.tsx +++ b/ts/features/itwallet/common/components/ItwMarkdown.tsx @@ -73,7 +73,7 @@ const getRules = (onLinkOpen?: ItwMarkdownProps["onLinkOpen"]) => ({ ), strong: (node: ASTNode, children: Array) => ( - + {children} ), diff --git a/ts/features/itwallet/common/components/ItwSkeumorphicCard/ClaimLabel.tsx b/ts/features/itwallet/common/components/ItwSkeumorphicCard/ClaimLabel.tsx index 0bba0582a05..bbf501e3b62 100644 --- a/ts/features/itwallet/common/components/ItwSkeumorphicCard/ClaimLabel.tsx +++ b/ts/features/itwallet/common/components/ItwSkeumorphicCard/ClaimLabel.tsx @@ -1,13 +1,7 @@ -import { - IOFontWeight, - useTypographyFactory -} from "@pagopa/io-app-design-system"; +import { IOFontWeight, IOText } from "@pagopa/io-app-design-system"; import React from "react"; import { TextStyle, useWindowDimensions } from "react-native"; -const defaultFontSize = 11; -const defaultFontWeight: IOFontWeight = "Semibold"; - export type ClaimLabelProps = { fontSize?: number; fontWeight?: IOFontWeight; @@ -20,8 +14,8 @@ export type ClaimLabelProps = { export const ClaimLabel: React.FunctionComponent< React.PropsWithChildren > = ({ - fontSize = defaultFontSize, - fontWeight = defaultFontWeight, + fontSize = 11, + fontWeight = "Semibold", textTransform = "none", ...props }) => { @@ -32,16 +26,21 @@ export const ClaimLabel: React.FunctionComponent< // and then we scale it to the current screen width const fontScale = width / 360; - return useTypographyFactory({ - ...props, - defaultWeight: fontWeight, - defaultColor: "black", - font: "TitilliumSansPro", - fontStyle: { fontSize: fontSize * fontScale, textTransform }, - lineBreakMode: "head", - numberOfLines: 1, - // This text should not be read by the voiceover. - // If you want to make it accessible use the parent components - accessible: false - }); + return ( + + {props.children} + + ); }; diff --git a/ts/features/itwallet/issuance/screens/ItwIssuanceCredentialAsyncContinuationScreen.tsx b/ts/features/itwallet/issuance/screens/ItwIssuanceCredentialAsyncContinuationScreen.tsx index 86fc7ea8364..9532895dd01 100644 --- a/ts/features/itwallet/issuance/screens/ItwIssuanceCredentialAsyncContinuationScreen.tsx +++ b/ts/features/itwallet/issuance/screens/ItwIssuanceCredentialAsyncContinuationScreen.tsx @@ -105,7 +105,7 @@ const InnerComponent = ({ credentialType }: { credentialType: string }) => { { text: I18n.t(`${ns}.body`) }, { text: I18n.t(`${ns}.bodyBold`), - weight: "Bold" + weight: "Semibold" } ]} pictogram="itWallet" diff --git a/ts/features/services/home/components/FeaturedServiceCard.tsx b/ts/features/services/home/components/FeaturedServiceCard.tsx index b66830e309b..1009d135bf8 100644 --- a/ts/features/services/home/components/FeaturedServiceCard.tsx +++ b/ts/features/services/home/components/FeaturedServiceCard.tsx @@ -1,6 +1,7 @@ import { Avatar, Badge, + BodySmall, H4, IOColors, IOSpacingScale, @@ -15,7 +16,6 @@ import I18n from "../../../../i18n"; import { WithTestID } from "../../../../types/WithTestID"; import { CardPressableBase } from "../../common/components/CardPressableBase"; import { logoForService } from "../utils"; -import OrganizationNameLabel from "./OrganizationNameLabel"; export type FeaturedServiceCardProps = WithTestID<{ id: string; @@ -96,7 +96,14 @@ const FeaturedServiceCard = ({ {organizationName && ( <> - {organizationName} + + {organizationName} + )} diff --git a/ts/features/services/home/components/OrganizationNameLabel.tsx b/ts/features/services/home/components/OrganizationNameLabel.tsx deleted file mode 100644 index 92888d9ce53..00000000000 --- a/ts/features/services/home/components/OrganizationNameLabel.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { - IOColors, - useIOExperimentalDesign, - useTypographyFactory, - type IOFontFamily, - type IOFontWeight -} from "@pagopa/io-app-design-system"; -import * as React from "react"; -import { Text } from "react-native"; - -type AllowedWeight = Extract; -type AllowedColors = Extract; - -const fontName: IOFontFamily = "Titillio"; -const legacyFontName: IOFontFamily = "TitilliumSansPro"; -const fontSize = 14; - -type OrganizationNameLabelProps = Omit< - React.ComponentPropsWithRef, - "style" ->; - -// Custom Typography component to show the name of Department on CGN card component -const OrganizationNameLabel: React.FunctionComponent< - OrganizationNameLabelProps -> = props => { - const { isExperimental } = useIOExperimentalDesign(); - return useTypographyFactory({ - ...props, - defaultWeight: "Regular", - defaultColor: "grey-650", - font: isExperimental ? fontName : legacyFontName, - fontStyle: { fontSize }, - lineBreakMode: "head", - numberOfLines: 1 - }); -}; - -export default OrganizationNameLabel; diff --git a/ts/screens/profile/DownloadProfileDataScreen.tsx b/ts/screens/profile/DownloadProfileDataScreen.tsx index ee697255445..74d4a562429 100644 --- a/ts/screens/profile/DownloadProfileDataScreen.tsx +++ b/ts/screens/profile/DownloadProfileDataScreen.tsx @@ -99,7 +99,7 @@ const DownloadProfileDataScreen = () => { ); const titleProps = useMemo>( - () => ({ weight: "Bold" }), + () => ({ weight: "Semibold" }), [] ); @@ -110,7 +110,7 @@ const DownloadProfileDataScreen = () => { }, { text: I18n.t("profile.main.privacy.exportData.detail.paragraph2.part2"), - weight: "Bold" + weight: "Semibold" }, { text: I18n.t("profile.main.privacy.exportData.detail.paragraph2.part3") diff --git a/ts/screens/profile/RemoveAccountInfoScreen.tsx b/ts/screens/profile/RemoveAccountInfoScreen.tsx index ae7640e2808..167ecf6f7f6 100644 --- a/ts/screens/profile/RemoveAccountInfoScreen.tsx +++ b/ts/screens/profile/RemoveAccountInfoScreen.tsx @@ -70,7 +70,7 @@ const RemoveAccountInfo = () => { "profile.main.privacy.removeAccount.info.body.p2.firstPart" )} - + {I18n.t("profile.main.privacy.removeAccount.info.body.p2.lastPart")} diff --git a/ts/screens/profile/TrialSystemPlayground.tsx b/ts/screens/profile/TrialSystemPlayground.tsx index f2858249f0f..18a6ede5201 100644 --- a/ts/screens/profile/TrialSystemPlayground.tsx +++ b/ts/screens/profile/TrialSystemPlayground.tsx @@ -62,7 +62,7 @@ const TrialSystemPlayground = () => { {"Stato attuale: "} - + {trialStatus ? trialStatus : "Non presente"} diff --git a/ts/utils/identification/index.tsx b/ts/utils/identification/index.tsx index 991663f5b90..d8c7b6d4489 100644 --- a/ts/utils/identification/index.tsx +++ b/ts/utils/identification/index.tsx @@ -96,7 +96,7 @@ export const IdentificationInstructionsComponent = (props: { {unlockCodePrefix} - + {` ${unlockCode}`} @@ -106,7 +106,7 @@ export const IdentificationInstructionsComponent = (props: { {fingerprintPrefix} - {` ${fingerprint}`} + {` ${fingerprint}`} ); @@ -114,7 +114,7 @@ export const IdentificationInstructionsComponent = (props: { {faceIdPrefix} - {` ${faceId}`} + {` ${faceId}`} ); From 6ea33299aa298688d377fc0e0a8a46f1681950cf Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Wed, 20 Nov 2024 18:19:55 +0100 Subject: [PATCH 14/46] Update `jest` snapshots --- .../LoadingSpinnerOverlay.test.tsx.snap | 2 +- ...OperationResultScreenContent.test.tsx.snap | 4 +- .../IOScrollViewCentredContent.test.tsx.snap | 60 +-- .../IOScrollViewWithListItems.test.tsx.snap | 6 +- .../CieIdErrorScreen.test.tsx.snap | 8 +- .../CieIdNotInstalled.test.tsx.snap | 4 +- .../CieIdNotInstalledScreen.test.tsx.snap | 4 +- .../__snapshots__/wizards.test.tsx.snap | 26 +- .../FimsUpdateAppAlert.test.tsx.snap | 4 +- .../__snapshots__/CardData.test.tsx.snap | 440 +++++------------- .../ItwFeedbackBanner.test.tsx.snap | 2 +- .../__snapshots__/ItwMarkdown.test.tsx.snap | 4 +- .../ItwDiscoveryBanner.test.tsx.snap | 4 +- ...ntialAsyncContinuationScreen.test.tsx.snap | 14 +- .../__snapshots__/EmptyList.test.tsx.snap | 4 +- .../PreconditionsFooter.test.tsx.snap | 8 +- .../SecuritySuggestions.test.tsx.snap | 34 +- .../WrappedMessageListItem.test.tsx.snap | 16 +- ...MessageDetailsAttachmentItem.test.tsx.snap | 4 + .../MessageDetailsFooter.test.tsx.snap | 24 +- .../MessageDetailsHeader.test.tsx.snap | 2 +- .../MessageDetailsPaymentButton.test.tsx.snap | 2 +- .../MessageDetailsReminder.test.tsx.snap | 4 +- ...essageDetailsReminderExpired.test.tsx.snap | 1 + ...ssageDetailsReminderExpiring.test.tsx.snap | 3 +- .../MessageDetailsStickyFooter.test.tsx.snap | 18 +- .../MessagePaymentItem.test.tsx.snap | 2 + .../OrganizationHeader.test.tsx.snap | 2 +- .../RemoteContentBanner.test.tsx.snap | 2 +- .../ShowMoreListItem.test.tsx.snap | 16 +- .../MessageAttachment.test.tsx.snap | 2 +- .../MessageRouterScreen.test.tsx.snap | 4 +- .../WalletEmptyScreenContent.test.tsx.snap | 2 +- .../WalletPaymentOutcomeScreen.test.tsx.snap | 162 +++---- .../F24ListBottomSheetLink.test.tsx.snap | 17 +- .../__snapshots__/F24Section.test.tsx.snap | 5 +- .../MessageBottomMenu.test.tsx.snap | 288 ++++++------ .../MessageCancelledContent.test.tsx.snap | 9 + .../MessageDetails.test.tsx.snap | 4 +- .../__snapshots__/MessageFooter.test.tsx.snap | 2 +- .../MessagePaymentBottomSheet.test.tsx.snap | 7 + .../MessagePayments.test.tsx.snap | 40 +- .../TimelineListItem.test.tsx.snap | 8 +- .../MessageDetailsScreen.test.tsx.snap | 8 +- .../PaidPaymentScreen.test.tsx.snap | 2 +- ...tificationsInfoScreenConsent.test.tsx.snap | 2 +- ...tificationsPreferencesScreen.test.tsx.snap | 8 +- ...otificationPermissionsScreen.test.tsx.snap | 4 +- .../__snapshots__/LandingScreen.test.tsx.snap | 32 +- .../ActivateNfcScreen.test.tsx.snap | 4 +- .../ProfileMainScreenTopBanner.test.tsx.snap | 5 +- .../SettingsDiscoveryBanner.test.tsx.snap | 2 +- 52 files changed, 611 insertions(+), 730 deletions(-) diff --git a/ts/components/__tests__/__snapshots__/LoadingSpinnerOverlay.test.tsx.snap b/ts/components/__tests__/__snapshots__/LoadingSpinnerOverlay.test.tsx.snap index 70fbcdae97c..83d7489a601 100644 --- a/ts/components/__tests__/__snapshots__/LoadingSpinnerOverlay.test.tsx.snap +++ b/ts/components/__tests__/__snapshots__/LoadingSpinnerOverlay.test.tsx.snap @@ -352,7 +352,7 @@ exports[`LoadingSpinnerOverlay Should match all-properties and loading snapshot "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, [ diff --git a/ts/components/screens/__tests__/__snapshots__/OperationResultScreenContent.test.tsx.snap b/ts/components/screens/__tests__/__snapshots__/OperationResultScreenContent.test.tsx.snap index 09cbda15099..50e4fa4d89a 100644 --- a/ts/components/screens/__tests__/__snapshots__/OperationResultScreenContent.test.tsx.snap +++ b/ts/components/screens/__tests__/__snapshots__/OperationResultScreenContent.test.tsx.snap @@ -541,7 +541,7 @@ exports[`OperationResultScreenContent should match the snapshot with default pro "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -657,7 +657,7 @@ exports[`OperationResultScreenContent should match the snapshot with default pro "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { diff --git a/ts/components/ui/__test__/__snapshots__/IOScrollViewCentredContent.test.tsx.snap b/ts/components/ui/__test__/__snapshots__/IOScrollViewCentredContent.test.tsx.snap index 833833d4ac2..b1c0d09c979 100644 --- a/ts/components/ui/__test__/__snapshots__/IOScrollViewCentredContent.test.tsx.snap +++ b/ts/components/ui/__test__/__snapshots__/IOScrollViewCentredContent.test.tsx.snap @@ -650,7 +650,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -897,7 +897,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -1576,7 +1576,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -1823,7 +1823,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -1930,7 +1930,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, [ @@ -2048,7 +2048,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -2727,7 +2727,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -2974,7 +2974,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -3088,7 +3088,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -3908,7 +3908,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -4728,7 +4728,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -4835,7 +4835,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, [ @@ -4953,7 +4953,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -5773,7 +5773,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -5887,7 +5887,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -6543,7 +6543,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -6790,7 +6790,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -7446,7 +7446,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -7693,7 +7693,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -7800,7 +7800,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, [ @@ -7918,7 +7918,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -8574,7 +8574,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -8821,7 +8821,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -8935,7 +8935,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -9732,7 +9732,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -10529,7 +10529,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -10636,7 +10636,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, [ @@ -10754,7 +10754,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -11551,7 +11551,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -11665,7 +11665,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { diff --git a/ts/components/ui/__test__/__snapshots__/IOScrollViewWithListItems.test.tsx.snap b/ts/components/ui/__test__/__snapshots__/IOScrollViewWithListItems.test.tsx.snap index 1f364b8db41..c81835b4e5d 100644 --- a/ts/components/ui/__test__/__snapshots__/IOScrollViewWithListItems.test.tsx.snap +++ b/ts/components/ui/__test__/__snapshots__/IOScrollViewWithListItems.test.tsx.snap @@ -864,7 +864,7 @@ exports[`IOScrollViewWithListItems Rendering renders correctly with default prop "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -1499,7 +1499,7 @@ exports[`IOScrollViewWithListItems Rendering renders correctly without optional "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -2440,7 +2440,7 @@ exports[`IOScrollViewWithListItems Rendering renders subtitle as array correctly "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { diff --git a/ts/features/cie/__tests__/__snapshots__/CieIdErrorScreen.test.tsx.snap b/ts/features/cie/__tests__/__snapshots__/CieIdErrorScreen.test.tsx.snap index f785d90417c..b563c986d11 100644 --- a/ts/features/cie/__tests__/__snapshots__/CieIdErrorScreen.test.tsx.snap +++ b/ts/features/cie/__tests__/__snapshots__/CieIdErrorScreen.test.tsx.snap @@ -349,7 +349,7 @@ exports[`CieIdErrorScreen where device doesn't support NFC Should match the snap "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -466,7 +466,7 @@ exports[`CieIdErrorScreen where device doesn't support NFC Should match the snap "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -837,7 +837,7 @@ Insert the CIE PIN and bring it close to the device to allow the data to be read "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -954,7 +954,7 @@ Insert the CIE PIN and bring it close to the device to allow the data to be read "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { diff --git a/ts/features/cie/__tests__/__snapshots__/CieIdNotInstalled.test.tsx.snap b/ts/features/cie/__tests__/__snapshots__/CieIdNotInstalled.test.tsx.snap index f2fca277062..11d9e6452aa 100644 --- a/ts/features/cie/__tests__/__snapshots__/CieIdNotInstalled.test.tsx.snap +++ b/ts/features/cie/__tests__/__snapshots__/CieIdNotInstalled.test.tsx.snap @@ -335,7 +335,7 @@ exports[`CieIdNotInstalled Should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -452,7 +452,7 @@ exports[`CieIdNotInstalled Should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { diff --git a/ts/features/cie/__tests__/__snapshots__/CieIdNotInstalledScreen.test.tsx.snap b/ts/features/cie/__tests__/__snapshots__/CieIdNotInstalledScreen.test.tsx.snap index 3e32724a974..97006294ce7 100644 --- a/ts/features/cie/__tests__/__snapshots__/CieIdNotInstalledScreen.test.tsx.snap +++ b/ts/features/cie/__tests__/__snapshots__/CieIdNotInstalledScreen.test.tsx.snap @@ -335,7 +335,7 @@ exports[`CieIdNotInstalledScreen Should match snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -452,7 +452,7 @@ exports[`CieIdNotInstalledScreen Should match snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { diff --git a/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap b/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap index 7582cb5e64e..9e06fc910cc 100644 --- a/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap +++ b/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap @@ -200,7 +200,7 @@ exports[`CieIdWizard Should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -447,7 +447,7 @@ exports[`CieIdWizard Should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -562,7 +562,7 @@ exports[`CieIdWizard Should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -781,7 +781,7 @@ exports[`CiePinWizard Should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -1125,7 +1125,7 @@ exports[`CiePinWizard Should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -1373,7 +1373,7 @@ exports[`CiePinWizard Should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -1488,7 +1488,7 @@ exports[`CiePinWizard Should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -1803,7 +1803,7 @@ exports[`IDActivationWizard Should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, ] @@ -2012,7 +2012,7 @@ exports[`IDActivationWizard Should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, ] @@ -2179,7 +2179,7 @@ exports[`IDActivationWizard Should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, ] @@ -2424,7 +2424,7 @@ exports[`IDActivationWizard Should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -2769,7 +2769,7 @@ exports[`SpidWizard Should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -2884,7 +2884,7 @@ exports[`SpidWizard Should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { diff --git a/ts/features/fims/common/components/__tests__/__snapshots__/FimsUpdateAppAlert.test.tsx.snap b/ts/features/fims/common/components/__tests__/__snapshots__/FimsUpdateAppAlert.test.tsx.snap index 32b94659288..24c191023cd 100644 --- a/ts/features/fims/common/components/__tests__/__snapshots__/FimsUpdateAppAlert.test.tsx.snap +++ b/ts/features/fims/common/components/__tests__/__snapshots__/FimsUpdateAppAlert.test.tsx.snap @@ -679,7 +679,7 @@ exports[`FimsUpdateAppAlert should match snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -796,7 +796,7 @@ exports[`FimsUpdateAppAlert should match snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { diff --git a/ts/features/itwallet/common/components/ItwSkeumorphicCard/__tests__/__snapshots__/CardData.test.tsx.snap b/ts/features/itwallet/common/components/ItwSkeumorphicCard/__tests__/__snapshots__/CardData.test.tsx.snap index 5dd40cf4d79..b20cb7feb72 100644 --- a/ts/features/itwallet/common/components/ItwSkeumorphicCard/__tests__/__snapshots__/CardData.test.tsx.snap +++ b/ts/features/itwallet/common/components/ItwSkeumorphicCard/__tests__/__snapshots__/CardData.test.tsx.snap @@ -112,35 +112,25 @@ exports[`CardData should match snapshot for DC front data 1`] = ` Marco @@ -162,35 +152,25 @@ exports[`CardData should match snapshot for DC front data 1`] = ` Rossi @@ -212,35 +192,25 @@ exports[`CardData should match snapshot for DC front data 1`] = ` 15/03/1990 @@ -262,35 +232,25 @@ exports[`CardData should match snapshot for DC front data 1`] = ` 10008581 @@ -312,35 +272,25 @@ exports[`CardData should match snapshot for DC front data 1`] = ` 23/03/2032 @@ -376,35 +326,25 @@ exports[`CardData should match snapshot for MDL back data 1`] = ` 23/01/35 @@ -426,35 +366,25 @@ exports[`CardData should match snapshot for MDL back data 1`] = ` 16/02/35 @@ -476,35 +406,25 @@ exports[`CardData should match snapshot for MDL back data 1`] = ` 23/01/35 @@ -526,35 +446,25 @@ exports[`CardData should match snapshot for MDL back data 1`] = ` 16/02/35 @@ -576,35 +486,25 @@ exports[`CardData should match snapshot for MDL back data 1`] = ` 78 @@ -626,35 +526,25 @@ exports[`CardData should match snapshot for MDL back data 1`] = ` 71 MS5118113X @@ -723,35 +613,25 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` ROSSI @@ -773,35 +653,25 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` MARCO @@ -823,35 +693,25 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` 22/09/92 @@ -873,35 +733,25 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` MILANO (MI) @@ -923,35 +773,25 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` 08/01/2025 @@ -973,35 +813,25 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` MC-RM @@ -1023,35 +853,25 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` 16/02/2035 @@ -1073,35 +893,25 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` RM8375131N @@ -1123,35 +933,25 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` AM B diff --git a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwFeedbackBanner.test.tsx.snap b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwFeedbackBanner.test.tsx.snap index d82d79a1eb9..8bc76caf473 100644 --- a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwFeedbackBanner.test.tsx.snap +++ b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwFeedbackBanner.test.tsx.snap @@ -561,7 +561,7 @@ exports[`ItwFeedbackBanner should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { diff --git a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwMarkdown.test.tsx.snap b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwMarkdown.test.tsx.snap index 56ed5a9b312..78eaf28d469 100644 --- a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwMarkdown.test.tsx.snap +++ b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwMarkdown.test.tsx.snap @@ -242,7 +242,7 @@ exports[`ItwMarkdown should match snapshot 1`] = ` style={ [ { - "fontSize": 18, + "fontSize": 16, }, {}, ] @@ -406,7 +406,7 @@ exports[`ItwMarkdown should match snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 24, }, ] diff --git a/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBanner.test.tsx.snap b/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBanner.test.tsx.snap index 2b1ebe3a62f..50734bd6b2a 100644 --- a/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBanner.test.tsx.snap +++ b/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBanner.test.tsx.snap @@ -562,7 +562,7 @@ exports[`ItwDiscoveryBanner should match snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -1349,7 +1349,7 @@ exports[`ItwDiscoveryBannerStandalone should match snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { diff --git a/ts/features/itwallet/issuance/screens/__tests__/__snapshots__/ItwIssuanceCredentialAsyncContinuationScreen.test.tsx.snap b/ts/features/itwallet/issuance/screens/__tests__/__snapshots__/ItwIssuanceCredentialAsyncContinuationScreen.test.tsx.snap index fc172889024..cb11b471869 100644 --- a/ts/features/itwallet/issuance/screens/__tests__/__snapshots__/ItwIssuanceCredentialAsyncContinuationScreen.test.tsx.snap +++ b/ts/features/itwallet/issuance/screens/__tests__/__snapshots__/ItwIssuanceCredentialAsyncContinuationScreen.test.tsx.snap @@ -659,7 +659,7 @@ exports[`ItwIssuanceCredentialAsyncContinuationScreen it should render the activ "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 24, }, ] @@ -782,7 +782,7 @@ exports[`ItwIssuanceCredentialAsyncContinuationScreen it should render the activ "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -898,7 +898,7 @@ exports[`ItwIssuanceCredentialAsyncContinuationScreen it should render the activ "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -1672,7 +1672,7 @@ exports[`ItwIssuanceCredentialAsyncContinuationScreen it should render the docum "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -1788,7 +1788,7 @@ exports[`ItwIssuanceCredentialAsyncContinuationScreen it should render the docum "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -2515,7 +2515,7 @@ exports[`ItwIssuanceCredentialAsyncContinuationScreen it should render the gener "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -3243,7 +3243,7 @@ exports[`ItwIssuanceCredentialAsyncContinuationScreen it should render the gener "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { diff --git a/ts/features/messages/components/Home/__tests__/__snapshots__/EmptyList.test.tsx.snap b/ts/features/messages/components/Home/__tests__/__snapshots__/EmptyList.test.tsx.snap index 5514818d00e..6191a6e7107 100644 --- a/ts/features/messages/components/Home/__tests__/__snapshots__/EmptyList.test.tsx.snap +++ b/ts/features/messages/components/Home/__tests__/__snapshots__/EmptyList.test.tsx.snap @@ -1229,7 +1229,7 @@ exports[`EmptyList should match snapshot, ARCHIVE category, pot.noneError 1`] = "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -6868,7 +6868,7 @@ exports[`EmptyList should match snapshot, INBOX category, pot.noneError 1`] = "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { diff --git a/ts/features/messages/components/Home/__tests__/__snapshots__/PreconditionsFooter.test.tsx.snap b/ts/features/messages/components/Home/__tests__/__snapshots__/PreconditionsFooter.test.tsx.snap index 82f4f44b271..2657e692c5e 100644 --- a/ts/features/messages/components/Home/__tests__/__snapshots__/PreconditionsFooter.test.tsx.snap +++ b/ts/features/messages/components/Home/__tests__/__snapshots__/PreconditionsFooter.test.tsx.snap @@ -476,7 +476,7 @@ exports[`PreconditionsFooter should match snapshot for 'content' footer category "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -591,7 +591,7 @@ exports[`PreconditionsFooter should match snapshot for 'content' footer category "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -1439,7 +1439,7 @@ exports[`PreconditionsFooter should match snapshot for 'update' footer category "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -1554,7 +1554,7 @@ exports[`PreconditionsFooter should match snapshot for 'update' footer category "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { diff --git a/ts/features/messages/components/Home/__tests__/__snapshots__/SecuritySuggestions.test.tsx.snap b/ts/features/messages/components/Home/__tests__/__snapshots__/SecuritySuggestions.test.tsx.snap index 7a52544f987..11286cd7e0c 100644 --- a/ts/features/messages/components/Home/__tests__/__snapshots__/SecuritySuggestions.test.tsx.snap +++ b/ts/features/messages/components/Home/__tests__/__snapshots__/SecuritySuggestions.test.tsx.snap @@ -465,7 +465,7 @@ exports[`SecuritySuggestions should match snapshot 1`] = ` > Date: Thu, 21 Nov 2024 11:38:07 +0100 Subject: [PATCH 15/46] Update `io-app-design-system` to `4.0.1` to fix TS errors --- package.json | 2 +- .../bonus/cgn/components/merchants/CgnModuleDiscount.tsx | 8 ++++---- ts/features/design-system/core/DSBadges.tsx | 8 ++++---- yarn.lock | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 2fb630ef56f..817a9f273e0 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "dependencies": { "@babel/plugin-transform-regenerator": "^7.18.6", "@gorhom/bottom-sheet": "^4.1.5", - "@pagopa/io-app-design-system": "4.0.0", + "@pagopa/io-app-design-system": "4.0.1", "@pagopa/io-pagopa-commons": "^3.1.0", "@pagopa/io-react-native-cieid": "^0.3.5", "@pagopa/io-react-native-crypto": "^0.3.0", diff --git a/ts/features/bonus/cgn/components/merchants/CgnModuleDiscount.tsx b/ts/features/bonus/cgn/components/merchants/CgnModuleDiscount.tsx index c48514bb197..a8c1db53ad7 100644 --- a/ts/features/bonus/cgn/components/merchants/CgnModuleDiscount.tsx +++ b/ts/features/bonus/cgn/components/merchants/CgnModuleDiscount.tsx @@ -61,10 +61,10 @@ export const CategoryTag = ({ category }: CategoryTagProps) => { diff --git a/ts/features/design-system/core/DSBadges.tsx b/ts/features/design-system/core/DSBadges.tsx index cdcbdaca6e6..ec4b090a3d7 100644 --- a/ts/features/design-system/core/DSBadges.tsx +++ b/ts/features/design-system/core/DSBadges.tsx @@ -118,10 +118,10 @@ const renderTag = () => ( diff --git a/yarn.lock b/yarn.lock index 23d4b6901d9..c096e51529a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2215,10 +2215,10 @@ dependencies: "@types/node" ">= 8" -"@pagopa/io-app-design-system@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@pagopa/io-app-design-system/-/io-app-design-system-4.0.0.tgz#cc7aea4423381484afc4705b58d6da7700b68e1b" - integrity sha512-Xyo/V0+rHxe34LYOPDSIhI4qrPwWa894dHRB1zz/t9EymgbGvuNAIyqEoPDkhqV11ndg4cMF7Ok8eAhXXH+YxQ== +"@pagopa/io-app-design-system@4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@pagopa/io-app-design-system/-/io-app-design-system-4.0.1.tgz#1f939232e3662fa519eba9d2334b33a597643ebb" + integrity sha512-CSaWgbkZ9Tjzz7qdCKz6wnRQ1c3/rej6ordgDeDH0faIlMwCkzNqpduwUWF3j91dIirLpSRCJPhKMfnOkhQsAA== dependencies: "@testing-library/jest-native" "^5.4.2" "@types/react-test-renderer" "^18.0.0" From 060fcba62a70802b8f227eb2351b56d83c841210 Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Thu, 21 Nov 2024 12:15:46 +0100 Subject: [PATCH 16/46] Update `jest` snapshots --- .../IOScrollViewCentredContent.test.tsx.snap | 48 ++--- .../ItwCredentialCard.test.tsx.snap | 76 +++---- .../WrappedMessageListItem.test.tsx.snap | 188 ++++++++++-------- ...MessageDetailsAttachmentItem.test.tsx.snap | 16 +- .../MessageDetailsPayment.test.tsx.snap | 4 +- .../MessagePaymentItem.test.tsx.snap | 8 +- .../F24ListBottomSheetLink.test.tsx.snap | 44 ++-- .../__snapshots__/F24Section.test.tsx.snap | 12 +- .../MessageDetails.test.tsx.snap | 30 +-- .../MessagePaymentBottomSheet.test.tsx.snap | 14 +- .../MessagePayments.test.tsx.snap | 72 +++---- .../MessageDetailsScreen.test.tsx.snap | 38 ++-- ...otificationPermissionsScreen.test.tsx.snap | 4 +- .../__snapshots__/LandingScreen.test.tsx.snap | 16 +- 14 files changed, 305 insertions(+), 265 deletions(-) diff --git a/ts/components/ui/__test__/__snapshots__/IOScrollViewCentredContent.test.tsx.snap b/ts/components/ui/__test__/__snapshots__/IOScrollViewCentredContent.test.tsx.snap index b1c0d09c979..d812b6b30a5 100644 --- a/ts/components/ui/__test__/__snapshots__/IOScrollViewCentredContent.test.tsx.snap +++ b/ts/components/ui/__test__/__snapshots__/IOScrollViewCentredContent.test.tsx.snap @@ -367,7 +367,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 16, + "gap": 16, } } > @@ -506,7 +506,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 8, + "gap": 8, } } > @@ -1293,7 +1293,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 16, + "gap": 16, } } > @@ -1432,7 +1432,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 8, + "gap": 8, } } > @@ -2444,7 +2444,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 16, + "gap": 16, } } > @@ -2583,7 +2583,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 8, + "gap": 8, } } > @@ -3484,7 +3484,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 16, + "gap": 16, } } > @@ -3623,7 +3623,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 8, + "gap": 8, } } > @@ -4304,7 +4304,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 16, + "gap": 16, } } > @@ -4443,7 +4443,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 8, + "gap": 8, } } > @@ -5349,7 +5349,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 16, + "gap": 16, } } > @@ -5488,7 +5488,7 @@ exports[`IOScrollViewCentredContent should match snapshot, with description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 8, + "gap": 8, } } > @@ -6283,7 +6283,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 16, + "gap": 16, } } > @@ -6422,7 +6422,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 8, + "gap": 8, } } > @@ -7186,7 +7186,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 16, + "gap": 16, } } > @@ -7325,7 +7325,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 8, + "gap": 8, } } > @@ -8314,7 +8314,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 16, + "gap": 16, } } > @@ -8453,7 +8453,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 8, + "gap": 8, } } > @@ -9331,7 +9331,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 16, + "gap": 16, } } > @@ -9470,7 +9470,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 8, + "gap": 8, } } > @@ -10128,7 +10128,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 16, + "gap": 16, } } > @@ -10267,7 +10267,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 8, + "gap": 8, } } > @@ -11150,7 +11150,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 16, + "gap": 16, } } > @@ -11289,7 +11289,7 @@ exports[`IOScrollViewCentredContent should match snapshot, without description, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 8, + "gap": 8, } } > diff --git a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap index 1464f9d7b14..8d91beb17e5 100644 --- a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap +++ b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap @@ -61,9 +61,9 @@ exports[`ItwCredentialCard should match snapshot when credential type is "Europe @@ -227,9 +227,9 @@ exports[`ItwCredentialCard should match snapshot when credential type is "Europe @@ -393,9 +393,9 @@ exports[`ItwCredentialCard should match snapshot when credential type is "MDL" 1 @@ -559,9 +559,9 @@ exports[`ItwCredentialCard should match snapshot when status is "expired" 1`] = @@ -587,19 +587,23 @@ exports[`ItwCredentialCard should match snapshot when status is "expired" 1`] = @@ -887,19 +891,23 @@ exports[`ItwCredentialCard should match snapshot when status is "expiring" 1`] = @@ -1325,9 +1333,9 @@ exports[`ItwCredentialCard should match snapshot when status is "valid" 1`] = ` @@ -1496,9 +1504,9 @@ exports[`ItwCredentialCard should render the preview 1`] = ` diff --git a/ts/features/messages/components/Home/__tests__/__snapshots__/WrappedMessageListItem.test.tsx.snap b/ts/features/messages/components/Home/__tests__/__snapshots__/WrappedMessageListItem.test.tsx.snap index 165b04cb8dc..154459f5338 100644 --- a/ts/features/messages/components/Home/__tests__/__snapshots__/WrappedMessageListItem.test.tsx.snap +++ b/ts/features/messages/components/Home/__tests__/__snapshots__/WrappedMessageListItem.test.tsx.snap @@ -723,19 +723,23 @@ exports[`WrappedMessageListItem should match snapshot, from SEND, read message 1 > @@ -371,7 +371,7 @@ exports[`MessageDetailsAttachmentItem Should match snapshot when is fetching the "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > @@ -1034,9 +1034,9 @@ exports[`MessageDetailsAttachmentItem Should match snapshot when the attachment style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -1048,7 +1048,7 @@ exports[`MessageDetailsAttachmentItem Should match snapshot when the attachment "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > @@ -1554,9 +1554,9 @@ exports[`MessageDetailsAttachmentItem Should match snapshot with all parameters style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -1568,7 +1568,7 @@ exports[`MessageDetailsAttachmentItem Should match snapshot with all parameters "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > @@ -2121,9 +2121,9 @@ exports[`MessageDetailsAttachmentItem Should match snapshot with required parame style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -2135,7 +2135,7 @@ exports[`MessageDetailsAttachmentItem Should match snapshot with required parame "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > diff --git a/ts/features/messages/components/MessageDetail/__tests__/__snapshots__/MessageDetailsPayment.test.tsx.snap b/ts/features/messages/components/MessageDetail/__tests__/__snapshots__/MessageDetailsPayment.test.tsx.snap index 6ad0cafd5e2..465b05f227d 100644 --- a/ts/features/messages/components/MessageDetail/__tests__/__snapshots__/MessageDetailsPayment.test.tsx.snap +++ b/ts/features/messages/components/MessageDetail/__tests__/__snapshots__/MessageDetailsPayment.test.tsx.snap @@ -844,9 +844,9 @@ exports[`MessageDetailsPayment Should match snapshot when there are payment data style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -864,7 +864,7 @@ exports[`MessageDetailsPayment Should match snapshot when there are payment data { "display": "flex", "flexDirection": "column", - "rowGap": 4, + "gap": 4, } } > diff --git a/ts/features/messages/components/MessageDetail/__tests__/__snapshots__/MessagePaymentItem.test.tsx.snap b/ts/features/messages/components/MessageDetail/__tests__/__snapshots__/MessagePaymentItem.test.tsx.snap index 6302d5ef587..a5da5b969b0 100644 --- a/ts/features/messages/components/MessageDetail/__tests__/__snapshots__/MessagePaymentItem.test.tsx.snap +++ b/ts/features/messages/components/MessageDetail/__tests__/__snapshots__/MessagePaymentItem.test.tsx.snap @@ -365,9 +365,9 @@ exports[`MessagePaymentItem component Should match the snapshot for a loading it style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -385,7 +385,7 @@ exports[`MessagePaymentItem component Should match the snapshot for a loading it { "display": "flex", "flexDirection": "column", - "rowGap": 4, + "gap": 4, } } > @@ -876,9 +876,9 @@ exports[`MessagePaymentItem component Should match the snapshot for a payable it @@ -1445,9 +1445,9 @@ exports[`MessagePaymentItem component Should match the snapshot for a processed diff --git a/ts/features/pn/components/__test__/__snapshots__/F24ListBottomSheetLink.test.tsx.snap b/ts/features/pn/components/__test__/__snapshots__/F24ListBottomSheetLink.test.tsx.snap index 4e618e6e05c..5e268c1bb6e 100644 --- a/ts/features/pn/components/__test__/__snapshots__/F24ListBottomSheetLink.test.tsx.snap +++ b/ts/features/pn/components/__test__/__snapshots__/F24ListBottomSheetLink.test.tsx.snap @@ -546,9 +546,9 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -560,7 +560,7 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > @@ -770,9 +770,9 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -784,7 +784,7 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > @@ -994,9 +994,9 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -1008,7 +1008,7 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > @@ -1218,9 +1218,9 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -1232,7 +1232,7 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > @@ -1442,9 +1442,9 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -1456,7 +1456,7 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > @@ -1666,9 +1666,9 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -1680,7 +1680,7 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > @@ -1890,9 +1890,9 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -1904,7 +1904,7 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > @@ -2114,9 +2114,9 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -2128,7 +2128,7 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > @@ -2338,9 +2338,9 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -2352,7 +2352,7 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > @@ -2562,9 +2562,9 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -2576,7 +2576,7 @@ exports[`F24ListBottomSheetLink should be snapshot for a 10 items F24 list 1`] = "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > @@ -3772,9 +3772,9 @@ exports[`F24ListBottomSheetLink should be snapshot for an 1 item F24 list 1`] = style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -3786,7 +3786,7 @@ exports[`F24ListBottomSheetLink should be snapshot for an 1 item F24 list 1`] = "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > diff --git a/ts/features/pn/components/__test__/__snapshots__/F24Section.test.tsx.snap b/ts/features/pn/components/__test__/__snapshots__/F24Section.test.tsx.snap index 79901262d76..153a88e8d8f 100644 --- a/ts/features/pn/components/__test__/__snapshots__/F24Section.test.tsx.snap +++ b/ts/features/pn/components/__test__/__snapshots__/F24Section.test.tsx.snap @@ -699,9 +699,9 @@ exports[`F24Section should match snapshot when there are more than one F24 1`] = style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -713,7 +713,7 @@ exports[`F24Section should match snapshot when there are more than one F24 1`] = "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > @@ -923,9 +923,9 @@ exports[`F24Section should match snapshot when there are more than one F24 1`] = style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -937,7 +937,7 @@ exports[`F24Section should match snapshot when there are more than one F24 1`] = "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > @@ -2678,9 +2678,9 @@ exports[`F24Section should match snapshot when there is a single F24 1`] = ` style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -2692,7 +2692,7 @@ exports[`F24Section should match snapshot when there is a single F24 1`] = ` "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > diff --git a/ts/features/pn/components/__test__/__snapshots__/MessageDetails.test.tsx.snap b/ts/features/pn/components/__test__/__snapshots__/MessageDetails.test.tsx.snap index 2670145a80f..a94c77151a2 100644 --- a/ts/features/pn/components/__test__/__snapshots__/MessageDetails.test.tsx.snap +++ b/ts/features/pn/components/__test__/__snapshots__/MessageDetails.test.tsx.snap @@ -368,19 +368,23 @@ exports[`MessageDetails component should match the snapshot with default props 1 > @@ -1045,9 +1045,9 @@ exports[`MessagePaymentBottomSheet should match snapshot, six payments 1`] = ` @@ -1295,9 +1295,9 @@ exports[`MessagePaymentBottomSheet should match snapshot, six payments 1`] = ` @@ -1545,9 +1545,9 @@ exports[`MessagePaymentBottomSheet should match snapshot, six payments 1`] = ` @@ -1795,9 +1795,9 @@ exports[`MessagePaymentBottomSheet should match snapshot, six payments 1`] = ` @@ -2045,9 +2045,9 @@ exports[`MessagePaymentBottomSheet should match snapshot, six payments 1`] = ` @@ -2295,9 +2295,9 @@ exports[`MessagePaymentBottomSheet should match snapshot, six payments 1`] = ` diff --git a/ts/features/pn/components/__test__/__snapshots__/MessagePayments.test.tsx.snap b/ts/features/pn/components/__test__/__snapshots__/MessagePayments.test.tsx.snap index c8fd3c87784..9c309b4c261 100644 --- a/ts/features/pn/components/__test__/__snapshots__/MessagePayments.test.tsx.snap +++ b/ts/features/pn/components/__test__/__snapshots__/MessagePayments.test.tsx.snap @@ -883,9 +883,9 @@ exports[`MessagePayments should match snapshot when cancelled, with payments, wi @@ -1134,9 +1134,9 @@ exports[`MessagePayments should match snapshot when cancelled, with payments, wi @@ -1385,9 +1385,9 @@ exports[`MessagePayments should match snapshot when cancelled, with payments, wi @@ -1636,9 +1636,9 @@ exports[`MessagePayments should match snapshot when cancelled, with payments, wi @@ -1887,9 +1887,9 @@ exports[`MessagePayments should match snapshot when cancelled, with payments, wi @@ -2138,9 +2138,9 @@ exports[`MessagePayments should match snapshot when cancelled, with payments, wi @@ -2389,9 +2389,9 @@ exports[`MessagePayments should match snapshot when cancelled, with payments, wi @@ -3120,9 +3120,9 @@ exports[`MessagePayments should match snapshot when cancelled, without payments, @@ -3371,9 +3371,9 @@ exports[`MessagePayments should match snapshot when cancelled, without payments, @@ -3622,9 +3622,9 @@ exports[`MessagePayments should match snapshot when cancelled, without payments, @@ -3873,9 +3873,9 @@ exports[`MessagePayments should match snapshot when cancelled, without payments, @@ -4124,9 +4124,9 @@ exports[`MessagePayments should match snapshot when cancelled, without payments, @@ -4375,9 +4375,9 @@ exports[`MessagePayments should match snapshot when cancelled, without payments, @@ -4626,9 +4626,9 @@ exports[`MessagePayments should match snapshot when cancelled, without payments, @@ -5692,9 +5692,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with five (ma @@ -5917,9 +5917,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with five (ma @@ -6167,9 +6167,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with five (ma @@ -6417,9 +6417,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with five (ma @@ -6667,9 +6667,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with five (ma @@ -7390,9 +7390,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with five (ma @@ -7615,9 +7615,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with five (ma @@ -7865,9 +7865,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with five (ma @@ -8115,9 +8115,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with five (ma @@ -8365,9 +8365,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with five (ma @@ -9088,9 +9088,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with more-tha @@ -9313,9 +9313,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with more-tha @@ -9563,9 +9563,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with more-tha @@ -9813,9 +9813,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with more-tha @@ -10063,9 +10063,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with more-tha @@ -10906,9 +10906,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with more-tha @@ -11131,9 +11131,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with more-tha @@ -11381,9 +11381,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with more-tha @@ -11631,9 +11631,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with more-tha @@ -11881,9 +11881,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with more-tha @@ -12724,9 +12724,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with one paya @@ -13422,9 +13422,9 @@ exports[`MessagePayments should match snapshot when not cancelled, with one paya diff --git a/ts/features/pn/screens/__test__/__snapshots__/MessageDetailsScreen.test.tsx.snap b/ts/features/pn/screens/__test__/__snapshots__/MessageDetailsScreen.test.tsx.snap index cfb0fb96ebc..d103325a4f2 100644 --- a/ts/features/pn/screens/__test__/__snapshots__/MessageDetailsScreen.test.tsx.snap +++ b/ts/features/pn/screens/__test__/__snapshots__/MessageDetailsScreen.test.tsx.snap @@ -227,19 +227,23 @@ exports[`MessageDetailsScreen should match the snapshot when everything went fin > @@ -858,7 +862,7 @@ exports[`MessageDetailsScreen should match the snapshot when everything went fin "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > @@ -1068,9 +1072,9 @@ exports[`MessageDetailsScreen should match the snapshot when everything went fin style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -1082,7 +1086,7 @@ exports[`MessageDetailsScreen should match the snapshot when everything went fin "flexDirection": "column", "flexGrow": 1, "flexShrink": 1, - "rowGap": 4, + "gap": 4, } } > diff --git a/ts/features/pushNotifications/screens/__tests__/__snapshots__/SystemNotificationPermissionsScreen.test.tsx.snap b/ts/features/pushNotifications/screens/__tests__/__snapshots__/SystemNotificationPermissionsScreen.test.tsx.snap index fcf3d843709..3e7ffcf2220 100644 --- a/ts/features/pushNotifications/screens/__tests__/__snapshots__/SystemNotificationPermissionsScreen.test.tsx.snap +++ b/ts/features/pushNotifications/screens/__tests__/__snapshots__/SystemNotificationPermissionsScreen.test.tsx.snap @@ -367,7 +367,7 @@ exports[`SystemNotificationPermissionsScreen Should match snapshot 1`] = ` "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 16, + "gap": 16, } } > @@ -562,7 +562,7 @@ exports[`SystemNotificationPermissionsScreen Should match snapshot 1`] = ` "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 8, + "gap": 8, } } > diff --git a/ts/screens/authentication/__tests__/__snapshots__/LandingScreen.test.tsx.snap b/ts/screens/authentication/__tests__/__snapshots__/LandingScreen.test.tsx.snap index f5433887c1e..735178056c1 100644 --- a/ts/screens/authentication/__tests__/__snapshots__/LandingScreen.test.tsx.snap +++ b/ts/screens/authentication/__tests__/__snapshots__/LandingScreen.test.tsx.snap @@ -1774,9 +1774,9 @@ exports[`LandingScreen with CieID FF enabled Should match the snapshot 1`] = ` style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -1784,11 +1784,11 @@ exports[`LandingScreen with CieID FF enabled Should match the snapshot 1`] = ` style={ { "alignItems": "center", - "columnGap": 12, "display": "flex", "flexDirection": "row", "flexGrow": 1, "flexShrink": 1, + "gap": 12, } } > @@ -2042,9 +2042,9 @@ exports[`LandingScreen with CieID FF enabled Should match the snapshot 1`] = ` style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -2052,11 +2052,11 @@ exports[`LandingScreen with CieID FF enabled Should match the snapshot 1`] = ` style={ { "alignItems": "center", - "columnGap": 12, "display": "flex", "flexDirection": "row", "flexGrow": 1, "flexShrink": 1, + "gap": 12, } } > @@ -4625,9 +4625,9 @@ exports[`LandingScreen with both local and remote CieID FF disabled Should match style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -4635,11 +4635,11 @@ exports[`LandingScreen with both local and remote CieID FF disabled Should match style={ { "alignItems": "center", - "columnGap": 12, "display": "flex", "flexDirection": "row", "flexGrow": 1, "flexShrink": 1, + "gap": 12, } } > @@ -4893,9 +4893,9 @@ exports[`LandingScreen with both local and remote CieID FF disabled Should match style={ { "alignItems": "center", - "columnGap": 8, "display": "flex", "flexDirection": "row", + "gap": 8, } } > @@ -4903,11 +4903,11 @@ exports[`LandingScreen with both local and remote CieID FF disabled Should match style={ { "alignItems": "center", - "columnGap": 12, "display": "flex", "flexDirection": "row", "flexGrow": 1, "flexShrink": 1, + "gap": 12, } } > From d34efa7decbd7340dd7bb0f591e089d8ae9f7f5a Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Thu, 21 Nov 2024 13:44:54 +0100 Subject: [PATCH 17/46] Update `jest` snapshots --- .../__tests__/__snapshots__/CieIdAuthUrlError.test.tsx.snap | 2 +- .../__snapshots__/PushNotificationsBanner.test.tsx.snap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/features/cieLogin/__tests__/__snapshots__/CieIdAuthUrlError.test.tsx.snap b/ts/features/cieLogin/__tests__/__snapshots__/CieIdAuthUrlError.test.tsx.snap index 3d1fa6ceee4..7cf7b0bce82 100644 --- a/ts/features/cieLogin/__tests__/__snapshots__/CieIdAuthUrlError.test.tsx.snap +++ b/ts/features/cieLogin/__tests__/__snapshots__/CieIdAuthUrlError.test.tsx.snap @@ -334,7 +334,7 @@ exports[`CieIdAuthUrlError Should match the snapshot 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { diff --git a/ts/features/pushNotifications/components/__tests__/__snapshots__/PushNotificationsBanner.test.tsx.snap b/ts/features/pushNotifications/components/__tests__/__snapshots__/PushNotificationsBanner.test.tsx.snap index 8dce179b3a2..9d02edad6b8 100644 --- a/ts/features/pushNotifications/components/__tests__/__snapshots__/PushNotificationsBanner.test.tsx.snap +++ b/ts/features/pushNotifications/components/__tests__/__snapshots__/PushNotificationsBanner.test.tsx.snap @@ -233,7 +233,7 @@ exports[`PushNotificationsBanner should render correctly 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { From c305ae1a1da1f746e2617d717b955b3f38497ec4 Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Thu, 21 Nov 2024 15:44:15 +0100 Subject: [PATCH 18/46] Fix wrong font in the `TabNavigator` --- .../DSHeaderSecondLevelWithSectionTitle.tsx | 6 ++---- .../design-system/navigation/navigator.tsx | 14 ++++++------- ts/navigation/TabNavigator.tsx | 21 ++++++++++--------- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/ts/features/design-system/core/DSHeaderSecondLevelWithSectionTitle.tsx b/ts/features/design-system/core/DSHeaderSecondLevelWithSectionTitle.tsx index bc6ae69f1fc..686e80fd63d 100644 --- a/ts/features/design-system/core/DSHeaderSecondLevelWithSectionTitle.tsx +++ b/ts/features/design-system/core/DSHeaderSecondLevelWithSectionTitle.tsx @@ -13,15 +13,13 @@ import { HeaderSecondLevel, IOColors, IOVisualCostants, + makeFontStyleObject, VSpacer } from "@pagopa/io-app-design-system"; -import { makeFontStyleObject } from "../../../components/core/fonts"; const styles = StyleSheet.create({ sectionTitle: { - ...makeFontStyleObject("Regular", false, "ReadexPro"), - fontSize: 14, - lineHeight: 18, + ...makeFontStyleObject(14, "Titillio", 18, "Semibold"), color: IOColors["grey-700"] } }); diff --git a/ts/features/design-system/navigation/navigator.tsx b/ts/features/design-system/navigation/navigator.tsx index 9d98a75766a..7a9e59620d3 100644 --- a/ts/features/design-system/navigation/navigator.tsx +++ b/ts/features/design-system/navigation/navigator.tsx @@ -1,6 +1,7 @@ import { IOVisualCostants, IconButton, + makeFontStyleObject, useIOExperimentalDesign, useIOThemeContext } from "@pagopa/io-app-design-system"; @@ -12,7 +13,6 @@ import { } from "@react-navigation/stack"; import * as React from "react"; import { Alert, Platform, View } from "react-native"; -import { makeFontStyleObject } from "../../../components/core/fonts"; import HeaderFirstLevel from "../../../components/ui/HeaderFirstLevel"; import { IONavigationDarkTheme, @@ -156,12 +156,12 @@ export const DesignSystemNavigator = () => { const { themeType } = useIOThemeContext(); const customHeaderConf: StackNavigationOptions = { - headerTitleStyle: { - ...(isExperimental - ? makeFontStyleObject("Regular", false, "ReadexPro") - : makeFontStyleObject("Semibold", false, "TitilliumSansPro")), - fontSize: 14 - }, + headerTitleStyle: makeFontStyleObject( + 14, + isExperimental ? "Titillio" : "TitilliumSansPro", + 14, + "Semibold" + ), headerTitleAlign: "center", headerLeft: RNNBackButton }; diff --git a/ts/navigation/TabNavigator.tsx b/ts/navigation/TabNavigator.tsx index d6062d60b91..41e09db955b 100644 --- a/ts/navigation/TabNavigator.tsx +++ b/ts/navigation/TabNavigator.tsx @@ -1,8 +1,11 @@ -import { IOColors, useIOTheme } from "@pagopa/io-app-design-system"; +import { + IOColors, + makeFontStyleObject, + useIOTheme +} from "@pagopa/io-app-design-system"; import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; import React from "react"; import LoadingSpinnerOverlay from "../components/LoadingSpinnerOverlay"; -import { makeFontStyleObject } from "../components/core/fonts"; import { TabIconComponent } from "../components/ui/TabIconComponent"; import { MESSAGES_ROUTES } from "../features/messages/navigation/routes"; import { MessagesHomeScreen } from "../features/messages/screens/MessagesHomeScreen"; @@ -59,14 +62,12 @@ export const MainTabNavigator = () => { currentRouteName={route.name as keyof MainTabParamsList} /> ), - tabBarLabelStyle: { - fontSize: isDesignSystemEnabled ? 10 : 12, - ...makeFontStyleObject( - "Regular", - false, - isDesignSystemEnabled ? "ReadexPro" : "TitilliumSansPro" - ) - }, + tabBarLabelStyle: makeFontStyleObject( + 11, + isDesignSystemEnabled ? "Titillio" : "TitilliumSansPro", + 11, + "Regular" + ), tabBarHideOnKeyboard: true, tabBarAllowFontScaling: false, tabBarActiveTintColor: IOColors[theme["interactiveElem-default"]], From 73762effd801490d6cb06e9e5f496738428f5825 Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Fri, 22 Nov 2024 18:51:40 +0100 Subject: [PATCH 19/46] Update `jest` snapshots --- .../__snapshots__/LoadingScreenContent.test.tsx.snap | 8 ++++---- .../cie/__tests__/__snapshots__/wizards.test.tsx.snap | 2 -- .../__test__/__snapshots__/IngressScreen.test.tsx.snap | 2 +- .../__snapshots__/MessageRouterScreen.test.tsx.snap | 8 ++++---- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ts/components/screens/__tests__/__snapshots__/LoadingScreenContent.test.tsx.snap b/ts/components/screens/__tests__/__snapshots__/LoadingScreenContent.test.tsx.snap index 319b5f9794a..c4e12275739 100644 --- a/ts/components/screens/__tests__/__snapshots__/LoadingScreenContent.test.tsx.snap +++ b/ts/components/screens/__tests__/__snapshots__/LoadingScreenContent.test.tsx.snap @@ -365,7 +365,7 @@ exports[`LoadingScreenContent should match the snapshot with title, a child, hea "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 24, + "gap": 24, } } > @@ -962,7 +962,7 @@ exports[`LoadingScreenContent should match the snapshot with title, a child, hea "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 24, + "gap": 24, } } > @@ -1559,7 +1559,7 @@ exports[`LoadingScreenContent should match the snapshot with title, no children, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 24, + "gap": 24, } } > @@ -2153,7 +2153,7 @@ exports[`LoadingScreenContent should match the snapshot with title, no children, "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 24, + "gap": 24, } } > diff --git a/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap b/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap index 75c4ec1bf5d..9e06fc910cc 100644 --- a/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap +++ b/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap @@ -91,8 +91,6 @@ exports[`CieIdWizard Should match the snapshot 1`] = ` } > If you have the CieID app on your device, enter the code you have set for the CieID app or use your face or fingerprint. - -To enter the IO app without physically using the Electronic Identity Card,you must first enable Level 1 and Level 2 access in the CieID application. diff --git a/ts/features/messages/screens/__tests__/__snapshots__/MessageRouterScreen.test.tsx.snap b/ts/features/messages/screens/__tests__/__snapshots__/MessageRouterScreen.test.tsx.snap index 608690eedf2..bb7e622befe 100644 --- a/ts/features/messages/screens/__tests__/__snapshots__/MessageRouterScreen.test.tsx.snap +++ b/ts/features/messages/screens/__tests__/__snapshots__/MessageRouterScreen.test.tsx.snap @@ -224,7 +224,7 @@ exports[`MessageRouterScreen should match snapshot before starting to retrieve m "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 24, + "gap": 24, } } > @@ -1079,7 +1079,7 @@ exports[`MessageRouterScreen should match snapshot if message data retrieval was "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 24, + "gap": 24, } } > @@ -3003,7 +3003,7 @@ exports[`MessageRouterScreen should match snapshot on message data retrieval suc "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 24, + "gap": 24, } } > @@ -3858,7 +3858,7 @@ exports[`MessageRouterScreen should match snapshot while retrieving message data "alignItems": "center", "display": "flex", "flexDirection": "column", - "rowGap": 24, + "gap": 24, } } > From 470537472818893491ac96fd8b85fc263098cf6a Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Mon, 25 Nov 2024 09:38:30 +0100 Subject: [PATCH 20/46] Fix typo in the english locale + Update `jest` snapshots --- locales/en/index.yml | 2 +- ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/locales/en/index.yml b/locales/en/index.yml index ade802d8c36..69b1aed92af 100644 --- a/locales/en/index.yml +++ b/locales/en/index.yml @@ -669,7 +669,7 @@ authentication: wizards: cie_id_wizard: title: Do you have the CieID app? - description: "If you have the CieID app on your device, enter the code you have set for the CieID app or use your face or fingerprint.\n\nTo enter the IO app without physically using the Electronic Identity Card,you must first enable Level 1 and Level 2 access in the CieID application." + description: "If you have the CieID app on your device, enter the code you have set for the CieID app or use your face or fingerprint.\n\nTo enter the IO app without physically using the Electronic Identity Card, you must first enable Level 1 and Level 2 access in the CieID application." actions: primary: label: Yes, log in with CieID diff --git a/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap b/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap index 9e06fc910cc..98caafee54e 100644 --- a/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap +++ b/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap @@ -91,6 +91,8 @@ exports[`CieIdWizard Should match the snapshot 1`] = ` } > If you have the CieID app on your device, enter the code you have set for the CieID app or use your face or fingerprint. + +To enter the IO app without physically using the Electronic Identity Card, you must first enable Level 1 and Level 2 access in the CieID application. Date: Mon, 25 Nov 2024 15:37:56 +0100 Subject: [PATCH 21/46] Fix `tsc` error --- .../itwallet/trustmark/screens/ItwCredentialTrustmarkScreen.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/features/itwallet/trustmark/screens/ItwCredentialTrustmarkScreen.tsx b/ts/features/itwallet/trustmark/screens/ItwCredentialTrustmarkScreen.tsx index 93bc76d6a59..d29cf008aeb 100644 --- a/ts/features/itwallet/trustmark/screens/ItwCredentialTrustmarkScreen.tsx +++ b/ts/features/itwallet/trustmark/screens/ItwCredentialTrustmarkScreen.tsx @@ -94,7 +94,7 @@ const TrustmarkExpirationTimer = () => { // Format the expiration time to mm:ss and show a placeholder if the expiration time is undefined const formattedExpirationTime = expirationSeconds !== undefined ? ( - + {format(new Date(expirationSeconds * 1000), "mm:ss")} ) : ( From 7cf30ae6c7394b86550bc88d7b2f3d434bc15875 Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Tue, 26 Nov 2024 15:25:06 +0100 Subject: [PATCH 22/46] Remove `LabelSmall` from `ItwPresentationCredentialFiscalCodeModal` --- .../screens/ItwPresentationCredentialFiscalCodeModal.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ts/features/itwallet/presentation/screens/ItwPresentationCredentialFiscalCodeModal.tsx b/ts/features/itwallet/presentation/screens/ItwPresentationCredentialFiscalCodeModal.tsx index 60cc8d7300b..7467e3e1124 100644 --- a/ts/features/itwallet/presentation/screens/ItwPresentationCredentialFiscalCodeModal.tsx +++ b/ts/features/itwallet/presentation/screens/ItwPresentationCredentialFiscalCodeModal.tsx @@ -4,7 +4,7 @@ import { IOAppMargin, IOColors, IOVisualCostants, - LabelSmall, + BodySmall, useIOTheme } from "@pagopa/io-app-design-system"; import React from "react"; @@ -102,7 +102,9 @@ const ItwPresentationCredentialFiscalCodeModal = () => { ]} > - {nameSurname} + + {nameSurname} + Date: Wed, 27 Nov 2024 13:53:53 +0100 Subject: [PATCH 23/46] Update `jest` snapshots --- .../__snapshots__/MessageGreenPassScreen.test.tsx.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/features/messages/screens/__tests__/__snapshots__/MessageGreenPassScreen.test.tsx.snap b/ts/features/messages/screens/__tests__/__snapshots__/MessageGreenPassScreen.test.tsx.snap index 34e37fc62fa..bd5b799b6b0 100644 --- a/ts/features/messages/screens/__tests__/__snapshots__/MessageGreenPassScreen.test.tsx.snap +++ b/ts/features/messages/screens/__tests__/__snapshots__/MessageGreenPassScreen.test.tsx.snap @@ -635,7 +635,7 @@ exports[`MessageGreenPassScreen Should match snapshost 1`] = ` "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { From 1340db93c8df0cf02ca126f79898179511bb09ba Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Thu, 28 Nov 2024 11:29:50 +0100 Subject: [PATCH 24/46] Update `jest` snapshot --- .../WalletPaymentOutcomeScreen.test.tsx.snap | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ts/features/payments/checkout/screens/___tests___/__snapshots__/WalletPaymentOutcomeScreen.test.tsx.snap b/ts/features/payments/checkout/screens/___tests___/__snapshots__/WalletPaymentOutcomeScreen.test.tsx.snap index acd80320ee3..63a71475347 100644 --- a/ts/features/payments/checkout/screens/___tests___/__snapshots__/WalletPaymentOutcomeScreen.test.tsx.snap +++ b/ts/features/payments/checkout/screens/___tests___/__snapshots__/WalletPaymentOutcomeScreen.test.tsx.snap @@ -45780,7 +45780,7 @@ Se il problema persiste, prova a usare un altro metodo o gestore del pagamento. "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, { @@ -45896,7 +45896,7 @@ Se il problema persiste, prova a usare un altro metodo o gestore del pagamento. "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -46168,7 +46168,7 @@ Se il problema persiste, prova a usare un altro metodo o gestore del pagamento. "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": 20, }, ] @@ -46335,7 +46335,7 @@ Se il problema persiste, prova a usare un altro metodo o gestore del pagamento. "fontFamily": "Titillium Sans Pro", "fontSize": 16, "fontStyle": "normal", - "fontWeight": "700", + "fontWeight": "600", "lineHeight": undefined, }, { @@ -47187,7 +47187,7 @@ Se il problema persiste, prova a usare un altro metodo o gestore del pagamento. @@ -47198,6 +47198,7 @@ Ricorda di pagare l'avviso entro le scadenze previste dall'ente. Se non riesci t @@ -47288,7 +47289,7 @@ Di solito l’importo viene riaccreditato entro pochi minuti. In altri casi, il From f0eaa97fd761234ce37138ab08418e52645b33d3 Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Thu, 28 Nov 2024 17:04:27 +0100 Subject: [PATCH 25/46] Fix `CgnCard` dark mode appearance --- ts/features/bonus/cgn/components/CgnCard.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ts/features/bonus/cgn/components/CgnCard.tsx b/ts/features/bonus/cgn/components/CgnCard.tsx index 55d1584b1e4..8630cdb542b 100644 --- a/ts/features/bonus/cgn/components/CgnCard.tsx +++ b/ts/features/bonus/cgn/components/CgnCard.tsx @@ -44,6 +44,7 @@ export const CgnCard = ({ expireDate, withEycaLogo }: CgnCardProps) => { const expiredTag = ( { -
{I18n.t("bonus.cgn.name")}
+
+ {I18n.t("bonus.cgn.name")} +
{isExpired && expiredTag}
Date: Thu, 28 Nov 2024 17:09:05 +0100 Subject: [PATCH 26/46] Remove unused `PaymentCardBig` component --- ts/features/design-system/core/DSCards.tsx | 44 - .../common/components/PaymentCardBig.tsx | 313 ------- .../__tests__/PaymentCardBig.test.tsx | 53 -- .../PaymentCardBig.test.tsx.snap | 885 ------------------ 4 files changed, 1295 deletions(-) delete mode 100644 ts/features/payments/common/components/PaymentCardBig.tsx delete mode 100644 ts/features/payments/common/components/__tests__/PaymentCardBig.test.tsx delete mode 100644 ts/features/payments/common/components/__tests__/__snapshots__/PaymentCardBig.test.tsx.snap diff --git a/ts/features/design-system/core/DSCards.tsx b/ts/features/design-system/core/DSCards.tsx index ff212399057..3b2fef79163 100644 --- a/ts/features/design-system/core/DSCards.tsx +++ b/ts/features/design-system/core/DSCards.tsx @@ -21,7 +21,6 @@ import { ItwStoredCredentialsMocks } from "../../itwallet/common/utils/itwMocksUtils"; import { PaymentCard } from "../../payments/common/components/PaymentCard"; -import { PaymentCardBig } from "../../payments/common/components/PaymentCardBig"; import { PaymentCardSmall } from "../../payments/common/components/PaymentCardSmall"; import { PaymentCardsCarousel, @@ -208,49 +207,6 @@ const PaymentCards = () => ( - - - - - - - - - - - - diff --git a/ts/features/payments/common/components/PaymentCardBig.tsx b/ts/features/payments/common/components/PaymentCardBig.tsx deleted file mode 100644 index fd1181d73d2..00000000000 --- a/ts/features/payments/common/components/PaymentCardBig.tsx +++ /dev/null @@ -1,313 +0,0 @@ -import { - H3, - H6, - IOColors, - IOLogoPaymentExtType, - IOStyles, - BodySmall, - LogoPaymentExt, - VSpacer -} from "@pagopa/io-app-design-system"; -import React from "react"; -import { StyleSheet, View } from "react-native"; -import Placeholder from "rn-placeholder"; -import { LogoPaymentExtended } from "../../../../components/ui/LogoPaymentExtended"; -import I18n from "../../../../i18n"; -import { WithTestID } from "../../../../types/WithTestID"; -import { format } from "../../../../utils/dates"; -import { capitalize } from "../../../../utils/strings"; -import { LogoPaymentWithFallback } from "../../../../components/ui/utils/components/LogoPaymentWithFallback"; - -export const PaymentCardBig = (props: PaymentCardBigProps) => { - if (props.isLoading) { - return ; - } - return ( - - - - - - ); -}; -// ------------- core -const BigPaymentCardBottomSection = (props: PaymentCardStandardProps) => { - switch (props.cardType) { - case "PAYPAL": - return ( - - ); - case "BANCOMATPAY": - return ( - - - {props.phoneNumber} - - - - - ); - case "PAGOBANCOMAT": - return ( - - - - - ); - case "COBADGE": - return ( - - - - - ); - case "CREDIT": - return ( - - - - - ); - } -}; -const BigPaymentCardTopSection = (props: PaymentCardStandardProps) => { - switch (props.cardType) { - case "PAYPAL": - return ( - - ); - case "PAGOBANCOMAT": - return ( - - - - - ); - case "COBADGE": - return ( - - - - - ); - case "CREDIT": - return ( - -

- {`${props.cardIcon} ••${props.hpan}`} -

- -
- ); - case "BANCOMATPAY": - return ( - - - - ); - } -}; - -// ------------- utils -const BottomSectionText = (props: { string: string; a11yLabel: string }) => ( -
- {props.string} -
-); -const ExpDateComponent = ({ expDate }: { expDate?: Date }) => { - if (expDate) { - return ( - <> - - - {I18n.t("wallet.creditCard.validUntil", { - expDate: format(expDate, "MM/YY") - })} - - - ); - } - - return null; -}; - -// ------------- skeleton -const CardSkeleton = ({ testID }: { testID?: string }) => ( - - - - - - - - - - - - -); - -// ------------- styles + types - -// all cards have an expiration date except for paypal and bpay, -// bancomatPay also has a phone number -// the rendering of the circuit logo is handled by the component - -export type PaymentCardBigProps = WithTestID< - | { isLoading: true; accessibilityLabel?: string } - | ({ - isLoading?: false; - accessibilityLabel?: string; - } & PaymentCardStandardProps) ->; - -type PaymentCardStandardProps = - | { - cardType: "PAYPAL"; - holderEmail: string; - } - | { - cardType: "BANCOMATPAY"; - phoneNumber: string; - holderName: string; - } - | { - cardType: "PAGOBANCOMAT"; - expirationDate?: Date; - abiCode?: string; - holderName: string; - bankName?: string; - } - | { - cardType: "COBADGE"; - expirationDate?: Date; - abiCode?: string; - bankName?: string; - holderName: string; - cardIcon?: IOLogoPaymentExtType; - } - | { - cardType: "CREDIT"; - expirationDate?: Date; - holderName: string; - hpan: string; - cardIcon?: IOLogoPaymentExtType; - }; - -const LOGO_HEIGHT = 32; -const BANK_LOGO_WIDTH = 213; -const BPAY_LOGO_WIDTH = 170; -const PAYPAL_LOGO_WIDTH = 114; -const styles = StyleSheet.create({ - cardContainer: { - flex: 1, - alignItems: "flex-start", - alignContent: "space-between", - justifyContent: "space-between", - height: 207, - borderRadius: 16, - borderCurve: "continuous", - backgroundColor: IOColors["grey-100"], - padding: 24, - width: "100%" // required for consistent skeleton sizing - }, - bottomRow: { - height: 48, - width: "100%", - flexDirection: "row", - alignItems: "center", - justifyContent: "space-between" - } -}); diff --git a/ts/features/payments/common/components/__tests__/PaymentCardBig.test.tsx b/ts/features/payments/common/components/__tests__/PaymentCardBig.test.tsx deleted file mode 100644 index 6ab8e29da3c..00000000000 --- a/ts/features/payments/common/components/__tests__/PaymentCardBig.test.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import { default as React } from "react"; -import { createStore } from "redux"; -import ROUTES from "../../../../../navigation/routes"; -import { applicationChangeState } from "../../../../../store/actions/application"; -import { appReducer } from "../../../../../store/reducers"; -import { GlobalState } from "../../../../../store/reducers/types"; -import { renderScreenWithNavigationStoreContext } from "../../../../../utils/testWrapper"; -import { PaymentCardBig, PaymentCardBigProps } from "../PaymentCardBig"; - -describe("PaymentCardBig component", () => { - const testID = "PaymentCardBigTestID"; - jest.useFakeTimers(); - it(`matches snapshot for loading`, () => { - const component = renderCardBig({ isLoading: true }); - expect(component).toMatchSnapshot(); - }); - it(`matches snapshot for paypal`, () => { - const component = renderCardBig({ - cardType: "PAYPAL", - holderEmail: "someEmail@test.com" - }); - expect(component).toMatchSnapshot(); - }); - - it(`should render a phone number in case of BancomatPay`, () => { - const component = renderCardBig({ - cardType: "BANCOMATPAY", - phoneNumber: "1234567890", - holderName: "holderName", - testID - }); - expect(component).not.toBeNull(); - expect(component.queryByText("1234567890")).not.toBeNull(); - }); - it(`should render a skeleton when loading`, () => { - const component = renderCardBig({ - isLoading: true, - testID - }); - expect(component).not.toBeNull(); - expect(component.queryByTestId(`${testID}-skeleton`)).not.toBeNull(); - }); -}); - -function renderCardBig(props: PaymentCardBigProps) { - const globalState = appReducer(undefined, applicationChangeState("active")); - return renderScreenWithNavigationStoreContext( - () => , - ROUTES.WALLET_HOME, - {}, - createStore(appReducer, globalState as any) - ); -} diff --git a/ts/features/payments/common/components/__tests__/__snapshots__/PaymentCardBig.test.tsx.snap b/ts/features/payments/common/components/__tests__/__snapshots__/PaymentCardBig.test.tsx.snap deleted file mode 100644 index 4ac4cb61a26..00000000000 --- a/ts/features/payments/common/components/__tests__/__snapshots__/PaymentCardBig.test.tsx.snap +++ /dev/null @@ -1,885 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`PaymentCardBig component matches snapshot for loading 1`] = ` - - - - - - - - - - - - - - - WALLET_HOME - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`; - -exports[`PaymentCardBig component matches snapshot for paypal 1`] = ` - - - - - - - - - - - - - - - WALLET_HOME - - - - - - - - - - - - - - - - - - - - - someEmail@test.com - - - - - - - - - - - - - -`; From 71fb3c7510873141414dc22093d64b03fe89982b Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Thu, 28 Nov 2024 17:10:49 +0100 Subject: [PATCH 27/46] Force light mode on `Tag` in the `ItwCredentialCard` component --- ts/features/itwallet/common/components/ItwCredentialCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/features/itwallet/common/components/ItwCredentialCard.tsx b/ts/features/itwallet/common/components/ItwCredentialCard.tsx index c8b6743f79a..43a96ecc943 100644 --- a/ts/features/itwallet/common/components/ItwCredentialCard.tsx +++ b/ts/features/itwallet/common/components/ItwCredentialCard.tsx @@ -56,7 +56,7 @@ export const ItwCredentialCard = ({ > {getCredentialNameFromType(credentialType, "").toUpperCase()}
- {statusTagProps && } + {statusTagProps && }
Date: Thu, 28 Nov 2024 17:13:34 +0100 Subject: [PATCH 28/46] Fix `PaymentCard` dark mode appearance and overflow elements --- .../payments/common/components/PaymentCard.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ts/features/payments/common/components/PaymentCard.tsx b/ts/features/payments/common/components/PaymentCard.tsx index 0994f2a190f..700b8c4f661 100644 --- a/ts/features/payments/common/components/PaymentCard.tsx +++ b/ts/features/payments/common/components/PaymentCard.tsx @@ -26,6 +26,8 @@ export type PaymentCardProps = { isExpired?: boolean; }; +const SECONDARY_INFO_TEXT_COLOR: IOColors = "grey-700"; + export type PaymentCardComponentProps = WithTestID< | ({ isLoading?: false; @@ -46,6 +48,7 @@ const PaymentCard = (props: PaymentCardComponentProps) => { const holderNameText = props.holderName && ( { ); const expireDateText = props.expireDate && ( - + {I18n.t("wallet.creditCard.validUntil", { expDate: format(props.expireDate, "MM/YY") })} @@ -65,6 +68,7 @@ const PaymentCard = (props: PaymentCardComponentProps) => { const maskedEmailText = props.holderEmail && ( { const maskedPhoneText = props.holderPhone && ( { return (
{capitalize(circuitName)} •••• {props.hpan}
@@ -134,6 +143,7 @@ const PaymentCard = (props: PaymentCardComponentProps) => { const expiredTag = ( From fcfe17936380fa6679ab704183eac83eea0406ea Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Thu, 28 Nov 2024 17:22:34 +0100 Subject: [PATCH 29/46] Update `io-app-design-system` to `4.1.0` --- package.json | 2 +- .../design-system/components/DSSpacerViewerBox.tsx | 3 +-- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 95b05f45024..fd572160fe7 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "dependencies": { "@babel/plugin-transform-regenerator": "^7.18.6", "@gorhom/bottom-sheet": "^4.1.5", - "@pagopa/io-app-design-system": "4.0.1", + "@pagopa/io-app-design-system": "4.1.0", "@pagopa/io-pagopa-commons": "^3.1.0", "@pagopa/io-react-native-cieid": "^0.3.5", "@pagopa/io-react-native-crypto": "^0.3.0", diff --git a/ts/features/design-system/components/DSSpacerViewerBox.tsx b/ts/features/design-system/components/DSSpacerViewerBox.tsx index 33127fab7cc..b4595ead4a2 100644 --- a/ts/features/design-system/components/DSSpacerViewerBox.tsx +++ b/ts/features/design-system/components/DSSpacerViewerBox.tsx @@ -5,13 +5,12 @@ import { VSpacer, HSpacer, IOSpacer, - SpacerOrientation, useIOTheme } from "@pagopa/io-app-design-system"; type DSSpacerViewerBoxProps = { size: IOSpacer; - orientation?: SpacerOrientation; + orientation?: "horizontal" | "vertical"; }; type DSSpacerLabelProps = { diff --git a/yarn.lock b/yarn.lock index ea908faefc1..a990719226f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2215,10 +2215,10 @@ dependencies: "@types/node" ">= 8" -"@pagopa/io-app-design-system@4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@pagopa/io-app-design-system/-/io-app-design-system-4.0.1.tgz#1f939232e3662fa519eba9d2334b33a597643ebb" - integrity sha512-CSaWgbkZ9Tjzz7qdCKz6wnRQ1c3/rej6ordgDeDH0faIlMwCkzNqpduwUWF3j91dIirLpSRCJPhKMfnOkhQsAA== +"@pagopa/io-app-design-system@4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@pagopa/io-app-design-system/-/io-app-design-system-4.1.0.tgz#6c71913db76a308e1c4d37f6be133dea25a74537" + integrity sha512-qDOnMDdw2QXWLX9raLzRDw51uFAOcRlA+i01n6pV8P0AbYkKvSdZ4lQIle8LZ8BndBmo5ghVXz7NPF88ZYXILg== dependencies: "@testing-library/jest-native" "^5.4.2" "@types/react-test-renderer" "^18.0.0" From 868ed2dd897f2fa50f6dc18c2a814ea2eb54fc44 Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Thu, 28 Nov 2024 17:54:37 +0100 Subject: [PATCH 30/46] Update `jest` snapshot --- .../SecuritySuggestions.test.tsx.snap | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/ts/features/messages/components/Home/__tests__/__snapshots__/SecuritySuggestions.test.tsx.snap b/ts/features/messages/components/Home/__tests__/__snapshots__/SecuritySuggestions.test.tsx.snap index 11286cd7e0c..7adde6f1b0c 100644 --- a/ts/features/messages/components/Home/__tests__/__snapshots__/SecuritySuggestions.test.tsx.snap +++ b/ts/features/messages/components/Home/__tests__/__snapshots__/SecuritySuggestions.test.tsx.snap @@ -459,7 +459,10 @@ exports[`SecuritySuggestions should match snapshot 1`] = ` @@ -575,7 +578,10 @@ exports[`SecuritySuggestions should match snapshot 1`] = ` @@ -600,13 +606,6 @@ exports[`SecuritySuggestions should match snapshot 1`] = ` > If you lose your device, log out from the web. - @@ -753,13 +755,6 @@ exports[`SecuritySuggestions should match snapshot 1`] = ` > If you fear that someone might use your SPID or CIE, lock access to the app after authenticating from the web. - From d4da05df395e7bf8ea9eebbeec5bebe6b4c67bfc Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Fri, 29 Nov 2024 11:13:14 +0100 Subject: [PATCH 31/46] Enable larger and bolder text in the `ItwCredentialCard` --- .../common/components/ItwCredentialCard.tsx | 33 +++++++++-------- .../components/ItwDigitalVersionBadge.tsx | 36 ++++++++++--------- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/ts/features/itwallet/common/components/ItwCredentialCard.tsx b/ts/features/itwallet/common/components/ItwCredentialCard.tsx index 43a96ecc943..e41c33192b9 100644 --- a/ts/features/itwallet/common/components/ItwCredentialCard.tsx +++ b/ts/features/itwallet/common/components/ItwCredentialCard.tsx @@ -1,11 +1,6 @@ -import { - HStack, - IOColors, - makeFontStyleObject, - Tag -} from "@pagopa/io-app-design-system"; +import { HStack, IOColors, IOText, Tag } from "@pagopa/io-app-design-system"; import React from "react"; -import { ImageSourcePropType, StyleSheet, Text, View } from "react-native"; +import { ImageSourcePropType, StyleSheet, View } from "react-native"; import { AnimatedImage } from "../../../../components/AnimatedImage"; import { borderColorByStatus, @@ -48,14 +43,22 @@ export const ItwCredentialCard = ({ - {getCredentialNameFromType(credentialType, "").toUpperCase()} - + {statusTagProps && } @@ -116,10 +119,6 @@ const styles = StyleSheet.create({ borderRadius: 8, borderWidth: 2 }, - label: { - flex: 1, - ...makeFontStyleObject(16, "TitilliumSansPro", 20, "Semibold") - }, header: { display: "flex", flexDirection: "row", diff --git a/ts/features/itwallet/common/components/ItwDigitalVersionBadge.tsx b/ts/features/itwallet/common/components/ItwDigitalVersionBadge.tsx index 2d2b58c37cb..649ed3be6b3 100644 --- a/ts/features/itwallet/common/components/ItwDigitalVersionBadge.tsx +++ b/ts/features/itwallet/common/components/ItwDigitalVersionBadge.tsx @@ -3,10 +3,11 @@ import { IOBadgeRadius, IOBadgeVSpacing, IOColors, - makeFontStyleObject + IOText, + useIOExperimentalDesign } from "@pagopa/io-app-design-system"; import React from "react"; -import { Platform, StyleSheet, Text, View } from "react-native"; +import { Platform, StyleSheet, View } from "react-native"; import I18n from "../../../../i18n"; type DigitalVersionBadgeProps = { @@ -23,6 +24,8 @@ const ItwDigitalVersionBadge = ({ credentialType, isFaded = false }: DigitalVersionBadgeProps) => { + const { isExperimental } = useIOExperimentalDesign(); + const mapCredentialTypes: Record< NonNullable, CredentialTypesProps @@ -53,19 +56,24 @@ const ItwDigitalVersionBadge = ({ {isFaded && } - {`${I18n.t("features.itWallet.card.digital")}`} - + ); @@ -98,12 +106,6 @@ const styles = StyleSheet.create({ backgroundColor: IOColors.white, opacity: 0.6, zIndex: 10 - }, - label: { - alignSelf: "center", - textTransform: "uppercase", - flexShrink: 1, - ...makeFontStyleObject(12, "Titillio", 16, "Regular") } }); From 1ea5e1ea77ec222e08b34b2d1b9d2ef619a711b6 Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Fri, 29 Nov 2024 11:29:00 +0100 Subject: [PATCH 32/46] Remove preview prop from `ItwCredentialCard` --- ts/features/design-system/core/DSCards.tsx | 18 ----- .../common/components/ItwCredentialCard.tsx | 76 +++++++++---------- .../components/ItwDigitalVersionBadge.tsx | 2 +- 3 files changed, 35 insertions(+), 61 deletions(-) diff --git a/ts/features/design-system/core/DSCards.tsx b/ts/features/design-system/core/DSCards.tsx index 3b2fef79163..c4a6a7e381e 100644 --- a/ts/features/design-system/core/DSCards.tsx +++ b/ts/features/design-system/core/DSCards.tsx @@ -345,12 +345,6 @@ const ItwCards = () => ( - - - @@ -398,12 +392,6 @@ const ItwCards = () => ( - - - ( - - - { const isValid = validCredentialStatuses.includes(status); const theme = getThemeColorByCredentialType(credentialType); @@ -33,43 +31,41 @@ export const ItwCredentialCard = ({ const statusTagProps = tagPropsByStatus[status]; return ( - - - - - - - - - {getCredentialNameFromType(credentialType, "").toUpperCase()} - - {statusTagProps && } - - - - + + + + + + {getCredentialNameFromType(credentialType, "").toUpperCase()} + + {statusTagProps && } + + + + ); }; @@ -92,10 +88,6 @@ const credentialCardBackgrounds: { }; const styles = StyleSheet.create({ - previewContainer: { - aspectRatio: 9 / 2, - overflow: "hidden" - }, cardContainer: { aspectRatio: 16 / 10, borderRadius: 8, diff --git a/ts/features/itwallet/common/components/ItwDigitalVersionBadge.tsx b/ts/features/itwallet/common/components/ItwDigitalVersionBadge.tsx index 649ed3be6b3..54617c701b0 100644 --- a/ts/features/itwallet/common/components/ItwDigitalVersionBadge.tsx +++ b/ts/features/itwallet/common/components/ItwDigitalVersionBadge.tsx @@ -63,7 +63,7 @@ const ItwDigitalVersionBadge = ({ lineHeight={16} numberOfLines={1} ellipsizeMode="tail" - maxFontSizeMultiplier={1.25} + maxFontSizeMultiplier={1.2} style={{ color: foreground, alignSelf: "center", From 37be84081165b4660c51fdcb5082faafc830709f Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Mon, 2 Dec 2024 09:53:08 +0100 Subject: [PATCH 33/46] Update `jest` snapshots --- package.json | 2 +- .../__snapshots__/wizards.test.tsx.snap | 2 +- .../ItwCredentialCard.test.tsx.snap | 2467 +++++++++-------- .../ItwFeedbackBanner.test.tsx.snap | 123 +- .../ItwDiscoveryBanner.test.tsx.snap | 238 +- .../RemoteContentBanner.test.tsx.snap | 119 +- .../PushNotificationsBanner.test.tsx.snap | 123 +- .../__snapshots__/LandingScreen.test.tsx.snap | 238 +- .../ProfileMainScreenTopBanner.test.tsx.snap | 123 +- .../SettingsDiscoveryBanner.test.tsx.snap | 123 +- yarn.lock | 8 +- 11 files changed, 1501 insertions(+), 2065 deletions(-) diff --git a/package.json b/package.json index 0ee91630c00..cda773eadf3 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "dependencies": { "@babel/plugin-transform-regenerator": "^7.18.6", "@gorhom/bottom-sheet": "^4.1.5", - "@pagopa/io-app-design-system": "4.1.0", + "@pagopa/io-app-design-system": "4.2.0", "@pagopa/io-pagopa-commons": "^3.1.0", "@pagopa/io-react-native-cieid": "^0.3.5", "@pagopa/io-react-native-crypto": "^0.3.0", diff --git a/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap b/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap index 98caafee54e..75c4ec1bf5d 100644 --- a/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap +++ b/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap @@ -92,7 +92,7 @@ exports[`CieIdWizard Should match the snapshot 1`] = ` > If you have the CieID app on your device, enter the code you have set for the CieID app or use your face or fingerprint. -To enter the IO app without physically using the Electronic Identity Card, you must first enable Level 1 and Level 2 access in the CieID application. +To enter the IO app without physically using the Electronic Identity Card,you must first enable Level 1 and Level 2 access in the CieID application. - - - + "opacity": 0, + }, + { + "height": "100%", + "width": "100%", + }, + ] + } + /> + + - - - CARTA EUROPEA DELLA DISABILITÀ - - - - - - - Versione digitale - - + CARTA EUROPEA DELLA DISABILITÀ + + + + > + + Versione digitale + + + `; exports[`ItwCredentialCard should match snapshot when credential type is "EuropeanHealthInsuranceCard" 1`] = ` - - - + "opacity": 0, + }, + { + "height": "100%", + "width": "100%", + }, + ] + } + /> + + - - - TESSERA SANITARIA - TESSERA EUROPEA DI ASSICURAZIONE MALATTIA - - - - - - - Versione digitale - - + TESSERA SANITARIA - TESSERA EUROPEA DI ASSICURAZIONE MALATTIA + + + - - + > + + Versione digitale + + + + + `; exports[`ItwCredentialCard should match snapshot when credential type is "MDL" 1`] = ` + + + - + PATENTE DI GUIDA + + + + + + + > + Versione digitale + + + + +`; + +exports[`ItwCredentialCard should match snapshot when status is "expired" 1`] = ` + + + + + - - - PATENTE DI GUIDA - - - - + > + PATENTE DI GUIDA + + + + + + + + + - Versione digitale + Scaduta - - -`; - -exports[`ItwCredentialCard should match snapshot when status is "expired" 1`] = ` - - - - - + - PATENTE DI GUIDA - - - - - - - - - - - - Scaduta - - - - - - - - - Versione digitale - - + Versione digitale + - + `; exports[`ItwCredentialCard should match snapshot when status is "expiring" 1`] = ` - - - - - - - PATENTE DI GUIDA - - - - - - - - - - - - In scadenza - - - - - - - - Versione digitale - - - - - - -`; - -exports[`ItwCredentialCard should match snapshot when status is "pending" 1`] = ` - + } + /> + - - - - - - PATENTE DI GUIDA - - - - + > + PATENTE DI GUIDA + + + + + + + + - Versione digitale + In scadenza + + + > + + Versione digitale + + + `; -exports[`ItwCredentialCard should match snapshot when status is "valid" 1`] = ` +exports[`ItwCredentialCard should match snapshot when status is "pending" 1`] = ` + + + + + PATENTE DI GUIDA + + + + + - + - + > + Versione digitale + + + + + +`; + +exports[`ItwCredentialCard should match snapshot when status is "valid" 1`] = ` + + + + + - - - PATENTE DI GUIDA - - - - - - - Versione digitale - - + PATENTE DI GUIDA + + + + > + + Versione digitale + + + `; @@ -1442,7 +1512,8 @@ exports[`ItwCredentialCard should render the preview 1`] = ` - - - + "opacity": 0, + }, + { + "height": "100%", + "width": "100%", + }, + ] + } + /> + + - - - PATENTE DI GUIDA - - - - - - - Versione digitale - - + PATENTE DI GUIDA + + + + > + + Versione digitale + + + `; diff --git a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwFeedbackBanner.test.tsx.snap b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwFeedbackBanner.test.tsx.snap index 8bc76caf473..917bd2f7f30 100644 --- a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwFeedbackBanner.test.tsx.snap +++ b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwFeedbackBanner.test.tsx.snap @@ -466,6 +466,9 @@ exports[`ItwFeedbackBanner should match the snapshot 1`] = ` /> @@ -476,104 +479,30 @@ exports[`ItwFeedbackBanner should match the snapshot 1`] = ` } } /> - - - - Inizia - - - + Inizia + diff --git a/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBanner.test.tsx.snap b/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBanner.test.tsx.snap index 50734bd6b2a..04917c2cd53 100644 --- a/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBanner.test.tsx.snap +++ b/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBanner.test.tsx.snap @@ -467,6 +467,9 @@ exports[`ItwDiscoveryBanner should match snapshot 1`] = ` /> @@ -477,104 +480,30 @@ exports[`ItwDiscoveryBanner should match snapshot 1`] = ` } } /> - - - - Inizia - - - + Inizia + @@ -1264,104 +1196,30 @@ exports[`ItwDiscoveryBannerStandalone should match snapshot 1`] = ` } } /> - - - - Inizia - - - + Inizia + @@ -448,104 +451,30 @@ exports[`RemoteContentBanner Should match snapshot 1`] = ` } } /> - - - - Learn more - - - + Learn more + @@ -148,104 +151,30 @@ exports[`PushNotificationsBanner should render correctly 1`] = ` } } /> - - - - Turn on push notifications - - - + Turn on push notifications + diff --git a/ts/screens/authentication/__tests__/__snapshots__/LandingScreen.test.tsx.snap b/ts/screens/authentication/__tests__/__snapshots__/LandingScreen.test.tsx.snap index 735178056c1..7b120e85a42 100644 --- a/ts/screens/authentication/__tests__/__snapshots__/LandingScreen.test.tsx.snap +++ b/ts/screens/authentication/__tests__/__snapshots__/LandingScreen.test.tsx.snap @@ -2329,6 +2329,9 @@ exports[`LandingScreen with CieID FF enabled Should match the snapshot 1`] = ` /> @@ -2339,104 +2342,30 @@ exports[`LandingScreen with CieID FF enabled Should match the snapshot 1`] = ` } } /> - - - - We give you a hand - - - + We give you a hand + @@ -5190,104 +5122,30 @@ exports[`LandingScreen with both local and remote CieID FF disabled Should match } } /> - - - - We give you a hand - - - + We give you a hand + @@ -339,104 +342,30 @@ exports[`ProfileMainScreenTopBanner should match snapshot for all possible resul } } /> - - - - Go to "Your data" section - - - + Go to "Your data" section + diff --git a/ts/screens/profile/components/__test__/__snapshots__/SettingsDiscoveryBanner.test.tsx.snap b/ts/screens/profile/components/__test__/__snapshots__/SettingsDiscoveryBanner.test.tsx.snap index 048fef905d7..826dff5bac1 100644 --- a/ts/screens/profile/components/__test__/__snapshots__/SettingsDiscoveryBanner.test.tsx.snap +++ b/ts/screens/profile/components/__test__/__snapshots__/SettingsDiscoveryBanner.test.tsx.snap @@ -439,6 +439,9 @@ exports[`settingsDiscoveryBanner should match snapshot 1`] = ` /> @@ -449,104 +452,30 @@ exports[`settingsDiscoveryBanner should match snapshot 1`] = ` } } /> - - - - Go to Settings - - - + Go to Settings + diff --git a/yarn.lock b/yarn.lock index a990719226f..8d37f37aa68 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2215,10 +2215,10 @@ dependencies: "@types/node" ">= 8" -"@pagopa/io-app-design-system@4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@pagopa/io-app-design-system/-/io-app-design-system-4.1.0.tgz#6c71913db76a308e1c4d37f6be133dea25a74537" - integrity sha512-qDOnMDdw2QXWLX9raLzRDw51uFAOcRlA+i01n6pV8P0AbYkKvSdZ4lQIle8LZ8BndBmo5ghVXz7NPF88ZYXILg== +"@pagopa/io-app-design-system@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pagopa/io-app-design-system/-/io-app-design-system-4.2.0.tgz#2e80e672504b7735b741f3ad9353add186256b28" + integrity sha512-wz9NwCEAb4cbKeCTQPmIU8ECsg5IDruqJn4JXG+FxX7i/T/upoMUm5l+Rqo2NDi0bMwcPvpU/SOsdH6jCkDM1Q== dependencies: "@testing-library/jest-native" "^5.4.2" "@types/react-test-renderer" "^18.0.0" From ead2e1f867dac70f99e7522eee07b5d16278d517 Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Mon, 2 Dec 2024 10:14:07 +0100 Subject: [PATCH 34/46] Replace `FooterWithButtons` in the `FciDocumentsScreen` --- .../fci/screens/valid/FciDocumentsScreen.tsx | 89 +++++++++---------- 1 file changed, 43 insertions(+), 46 deletions(-) diff --git a/ts/features/fci/screens/valid/FciDocumentsScreen.tsx b/ts/features/fci/screens/valid/FciDocumentsScreen.tsx index 528a4142581..52a5c33f4d7 100644 --- a/ts/features/fci/screens/valid/FciDocumentsScreen.tsx +++ b/ts/features/fci/screens/valid/FciDocumentsScreen.tsx @@ -1,10 +1,8 @@ -import * as React from "react"; -import Pdf from "react-native-pdf"; -import { pipe } from "fp-ts/lib/function"; -import * as RA from "fp-ts/lib/ReadonlyArray"; -import * as O from "fp-ts/lib/Option"; -import * as S from "fp-ts/lib/string"; -import { StyleSheet, View } from "react-native"; +import { + FooterActionsInline, + IOColors, + IOStyles +} from "@pagopa/io-app-design-system"; import { RouteProp, StackActions, @@ -12,40 +10,41 @@ import { useNavigation, useRoute } from "@react-navigation/native"; -import { - BlockButtonProps, - ButtonSolidProps, - FooterWithButtons, - IOColors, - IOStyles -} from "@pagopa/io-app-design-system"; +import { pipe } from "fp-ts/lib/function"; +import * as O from "fp-ts/lib/Option"; +import * as RA from "fp-ts/lib/ReadonlyArray"; +import * as S from "fp-ts/lib/string"; +import * as React from "react"; +import { ComponentProps } from "react"; +import { StyleSheet, View } from "react-native"; +import Pdf from "react-native-pdf"; +import { TypeEnum as ClauseType } from "../../../../../definitions/fci/Clause"; +import { DocumentToSign } from "../../../../../definitions/fci/DocumentToSign"; +import { useHeaderSecondLevel } from "../../../../hooks/useHeaderSecondLevel"; import I18n from "../../../../i18n"; -import DocumentsNavigationBar from "../../components/DocumentsNavigationBar"; +import { useIODispatch, useIOSelector } from "../../../../store/hooks"; import { emptyContextualHelp } from "../../../../utils/emptyContextualHelp"; +import { trackFciDocOpeningSuccess, trackFciSigningDoc } from "../../analytics"; +import DocumentsNavigationBar from "../../components/DocumentsNavigationBar"; +import LoadingComponent from "../../components/LoadingComponent"; import { useFciAbortSignatureFlow } from "../../hooks/useFciAbortSignatureFlow"; -import { fciSignatureDetailDocumentsSelector } from "../../store/reducers/fciSignatureRequest"; -import { FCI_ROUTES } from "../../navigation/routes"; -import { TypeEnum as ClauseType } from "../../../../../definitions/fci/Clause"; +import { useFciNoSignatureFields } from "../../hooks/useFciNoSignatureFields"; import { FciParamsList } from "../../navigation/params"; -import { DocumentToSign } from "../../../../../definitions/fci/DocumentToSign"; +import { FCI_ROUTES } from "../../navigation/routes"; import { fciClearStateRequest, fciDownloadPreview, fciUpdateDocumentSignaturesRequest } from "../../store/actions"; import { fciDocumentSignaturesSelector } from "../../store/reducers/fciDocumentSignatures"; -import { useIODispatch, useIOSelector } from "../../../../store/hooks"; import { fciDownloadPathSelector } from "../../store/reducers/fciDownloadPreview"; -import { trackFciDocOpeningSuccess, trackFciSigningDoc } from "../../analytics"; +import { fciEnvironmentSelector } from "../../store/reducers/fciEnvironment"; +import { fciSignatureDetailDocumentsSelector } from "../../store/reducers/fciSignatureRequest"; import { getOptionalSignatureFields, getRequiredSignatureFields, getSignatureFieldsLength } from "../../utils/signatureFields"; -import { useFciNoSignatureFields } from "../../hooks/useFciNoSignatureFields"; -import { fciEnvironmentSelector } from "../../store/reducers/fciEnvironment"; -import LoadingComponent from "../../components/LoadingComponent"; -import { useHeaderSecondLevel } from "../../../../hooks/useHeaderSecondLevel"; const styles = StyleSheet.create({ pdf: { @@ -58,6 +57,10 @@ export type FciDocumentsScreenNavigationParams = Readonly<{ currentDoc: number; }>; +type FooterActionsInlineEndButton = ComponentProps< + typeof FooterActionsInline +>["endAction"]; + const FciDocumentsScreen = () => { const pdfRef = React.useRef(null); const [totalPages, setTotalPages] = React.useState(0); @@ -136,29 +139,20 @@ const FciDocumentsScreen = () => { const onCancelPress = () => present(); - const cancelButtonProps: ButtonSolidProps = { - onPress: onCancelPress, - label: I18n.t("features.fci.documents.footer.cancel"), - accessibilityLabel: I18n.t("features.fci.documents.footer.cancel") - }; - - const continueButtonProps: ButtonSolidProps = { + const continueButtonProps: FooterActionsInlineEndButton = { + color: "primary", onPress: onContinuePress, - label: I18n.t("features.fci.documents.footer.continue"), - accessibilityLabel: I18n.t("features.fci.documents.footer.continue") + label: I18n.t("features.fci.documents.footer.continue") }; - const keepReadingButtonProps: ButtonSolidProps = { + const keepReadingButtonProps: FooterActionsInlineEndButton = { + color: "primary", onPress: () => pointToPage(totalPages), - label: I18n.t("global.buttons.continue"), - accessibilityLabel: I18n.t("global.buttons.continue") + label: I18n.t("global.buttons.continue") }; - const secondaryButtonProps: BlockButtonProps = { - type: currentPage < totalPages ? "Outline" : "Solid", - buttonProps: - currentPage < totalPages ? keepReadingButtonProps : continueButtonProps - }; + const secondaryButtonProps: FooterActionsInlineEndButton = + currentPage < totalPages ? keepReadingButtonProps : continueButtonProps; const pointToPage = (page: number) => pipe( @@ -247,10 +241,13 @@ const FciDocumentsScreen = () => { {documents.length > 0 && ( <> {renderPager()} - )} From a9f6b6d91076bbcdd55a704565bd57a88e350f13 Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Mon, 2 Dec 2024 10:15:32 +0100 Subject: [PATCH 35/46] Remove preview from `ItwCredentialCard` test --- .../components/__tests__/ItwCredentialCard.test.tsx | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/ts/features/itwallet/common/components/__tests__/ItwCredentialCard.test.tsx b/ts/features/itwallet/common/components/__tests__/ItwCredentialCard.test.tsx index fb5f1c334e4..233b5a56030 100644 --- a/ts/features/itwallet/common/components/__tests__/ItwCredentialCard.test.tsx +++ b/ts/features/itwallet/common/components/__tests__/ItwCredentialCard.test.tsx @@ -1,8 +1,7 @@ import { render } from "@testing-library/react-native"; import * as React from "react"; -import { CredentialType } from "../../utils/itwMocksUtils"; -import { ItwCredentialCard } from "../ItwCredentialCard"; import { ItwCredentialStatus } from "../../utils/itwTypesUtils"; +import { ItwCredentialCard } from "../ItwCredentialCard"; describe("ItwCredentialCard", () => { it.each(["EuropeanHealthInsuranceCard", "EuropeanDisabilityCard", "MDL"])( @@ -27,14 +26,4 @@ describe("ItwCredentialCard", () => { expect(component).toMatchSnapshot(); } ); - - it("should render the preview", () => { - const component = render( - - ); - expect(component).toMatchSnapshot(); - }); }); From fdecfc7625416931482916363eb63546e267dd2b Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Mon, 2 Dec 2024 10:43:26 +0100 Subject: [PATCH 36/46] Update `jest` snapshot --- ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap b/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap index 75c4ec1bf5d..98caafee54e 100644 --- a/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap +++ b/ts/features/cie/__tests__/__snapshots__/wizards.test.tsx.snap @@ -92,7 +92,7 @@ exports[`CieIdWizard Should match the snapshot 1`] = ` > If you have the CieID app on your device, enter the code you have set for the CieID app or use your face or fingerprint. -To enter the IO app without physically using the Electronic Identity Card,you must first enable Level 1 and Level 2 access in the CieID application. +To enter the IO app without physically using the Electronic Identity Card, you must first enable Level 1 and Level 2 access in the CieID application. Date: Mon, 2 Dec 2024 11:13:11 +0100 Subject: [PATCH 37/46] Remove obsolete snapshot --- .../ItwCredentialCard.test.tsx.snap | 176 ------------------ 1 file changed, 176 deletions(-) diff --git a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap index 3941cce9d45..b0c9d8b4438 100644 --- a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap +++ b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap @@ -1507,179 +1507,3 @@ exports[`ItwCredentialCard should match snapshot when status is "valid" 1`] = ` /> `; - -exports[`ItwCredentialCard should render the preview 1`] = ` - - - - - - - - PATENTE DI GUIDA - - - - - - - Versione digitale - - - - - -`; From 624ac1e5111190e775df500f015639af145bfefc Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Thu, 5 Dec 2024 17:12:22 +0100 Subject: [PATCH 38/46] Update `jest` snapshots --- .../code/screens/IdPayCodeDisplayScreen.tsx | 1 - .../ItwCredentialCard.test.tsx.snap | 1449 +---------------- .../ItwFeedbackBanner.test.tsx.snap | 53 +- .../ItwDiscoveryBanner.test.tsx.snap | 106 +- .../RemoteContentBanner.test.tsx.snap | 53 +- .../PushNotificationsBanner.test.tsx.snap | 53 +- .../__snapshots__/LandingScreen.test.tsx.snap | 106 +- .../ProfileMainScreenTopBanner.test.tsx.snap | 53 +- .../SettingsDiscoveryBanner.test.tsx.snap | 53 +- 9 files changed, 20 insertions(+), 1907 deletions(-) diff --git a/ts/features/idpay/code/screens/IdPayCodeDisplayScreen.tsx b/ts/features/idpay/code/screens/IdPayCodeDisplayScreen.tsx index 1636d8a8004..7fbc2f5a4e3 100644 --- a/ts/features/idpay/code/screens/IdPayCodeDisplayScreen.tsx +++ b/ts/features/idpay/code/screens/IdPayCodeDisplayScreen.tsx @@ -20,7 +20,6 @@ import { AppParamsList, IOStackNavigationProp } from "../../../../navigation/params/AppParamsList"; -import useContentWithFF from "../../../../screens/profile/useContentWithFF"; import { useIOSelector } from "../../../../store/hooks"; import { emptyContextualHelp } from "../../../../utils/emptyContextualHelp"; import { useIdPayInfoCieBottomSheet } from "../components/IdPayInfoCieBottomSheet"; diff --git a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap index d73aaca719b..b0c9d8b4438 100644 --- a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap +++ b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap @@ -1,1444 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`ItwCredentialCard should match snapshot when credential type is "EuropeanDisabilityCard" 1`] = ` - - - - - - - - - CARTA EUROPEA DELLA DISABILITÀ - - - - - - - Versione digitale - - - - - - -`; - -exports[`ItwCredentialCard should match snapshot when credential type is "EuropeanHealthInsuranceCard" 1`] = ` - - - - - - - - - TESSERA SANITARIA - TESSERA EUROPEA DI ASSICURAZIONE MALATTIA - - - - - - - Versione digitale - - - - - - -`; - -exports[`ItwCredentialCard should match snapshot when credential type is "MDL" 1`] = ` - - - - - - - - - PATENTE DI GUIDA - - - - - - - Versione digitale - - - - - - -`; - -exports[`ItwCredentialCard should match snapshot when status is "expired" 1`] = ` - - - - - - - - - PATENTE DI GUIDA - - - - - - - - - - - - Scaduta - - - - - - - - - Versione digitale - - - - - - -`; - -exports[`ItwCredentialCard should match snapshot when status is "expiring" 1`] = ` - - - - - - - - - PATENTE DI GUIDA - - - - - - - - - - - - In scadenza - - - - - - - - Versione digitale - - - - - - -`; - -exports[`ItwCredentialCard should match snapshot when status is "pending" 1`] = ` - - - - - - - - - PATENTE DI GUIDA - - - - - - - - Versione digitale - - - - - - -`; - -exports[`ItwCredentialCard should match snapshot when status is "valid" 1`] = ` - - - - - - - - - PATENTE DI GUIDA - - - - - - - Versione digitale - - - - - - -`; - -exports[`ItwCredentialCard should render the preview 1`] = ` - - - - Inizia - - - + Inizia + - - - Inizia - - - + Inizia + - - - Inizia - - - + Inizia + - - - Learn more - - - + Learn more + - - - Turn on push notifications - - - + Turn on push notifications + - - - We give you a hand - - - + We give you a hand + - - - We give you a hand - - - + We give you a hand + - - - Go to "Your data" section - - - + Go to "Your data" section + - - - Go to Settings - - - + Go to Settings + Date: Thu, 12 Dec 2024 14:13:53 +0100 Subject: [PATCH 39/46] Update `jest` snapshots --- .../ItwDiscoveryBanner.test.tsx.snap | 119 ++++-------------- 1 file changed, 24 insertions(+), 95 deletions(-) diff --git a/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBanner.test.tsx.snap b/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBanner.test.tsx.snap index 0b30e7b2358..9000382b5e9 100644 --- a/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBanner.test.tsx.snap +++ b/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBanner.test.tsx.snap @@ -468,6 +468,9 @@ exports[`ItwDiscoveryBanner should match snapshot 1`] = ` /> @@ -478,104 +481,30 @@ exports[`ItwDiscoveryBanner should match snapshot 1`] = ` } } /> - - - - Inizia - - - + Inizia + Date: Thu, 12 Dec 2024 14:46:43 +0100 Subject: [PATCH 40/46] Update `jest` snapshots --- ...ItwDiscoveryBannerStandalone.test.tsx.snap | 119 ++++-------------- 1 file changed, 24 insertions(+), 95 deletions(-) diff --git a/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBannerStandalone.test.tsx.snap b/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBannerStandalone.test.tsx.snap index d88d6cb7505..fb14b2a8d8f 100644 --- a/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBannerStandalone.test.tsx.snap +++ b/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBannerStandalone.test.tsx.snap @@ -816,6 +816,9 @@ exports[`ItwDiscoveryBannerStandalone should match snapshot when isItwDiscoveryB /> @@ -826,104 +829,30 @@ exports[`ItwDiscoveryBannerStandalone should match snapshot when isItwDiscoveryB } } /> - - - - Inizia - - - + Inizia + Date: Thu, 12 Dec 2024 15:49:02 +0100 Subject: [PATCH 41/46] Update `jest` snapshots --- ...ItwDiscoveryBannerOnboarding.test.tsx.snap | 119 ++++-------------- 1 file changed, 24 insertions(+), 95 deletions(-) diff --git a/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBannerOnboarding.test.tsx.snap b/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBannerOnboarding.test.tsx.snap index 2e102837f74..5f6ae6a8234 100644 --- a/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBannerOnboarding.test.tsx.snap +++ b/ts/features/itwallet/common/components/discoveryBanner/__tests__/__snapshots__/ItwDiscoveryBannerOnboarding.test.tsx.snap @@ -784,6 +784,9 @@ exports[`ItwDiscoveryBannerOnboarding should match snapshot when isItwDiscoveryB /> @@ -794,104 +797,30 @@ exports[`ItwDiscoveryBannerOnboarding should match snapshot when isItwDiscoveryB } } /> - - - - Inizia - - - + Inizia + Date: Thu, 12 Dec 2024 18:19:41 +0100 Subject: [PATCH 42/46] Disable bolder text in the `ItwSkeumorphicCard` component --- .../ItwSkeumorphicCard/ClaimLabel.tsx | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/ts/features/itwallet/common/components/ItwSkeumorphicCard/ClaimLabel.tsx b/ts/features/itwallet/common/components/ItwSkeumorphicCard/ClaimLabel.tsx index 08c5a5f5d97..bc1d523e995 100644 --- a/ts/features/itwallet/common/components/ItwSkeumorphicCard/ClaimLabel.tsx +++ b/ts/features/itwallet/common/components/ItwSkeumorphicCard/ClaimLabel.tsx @@ -1,6 +1,9 @@ -import { IOFontWeight, IOText } from "@pagopa/io-app-design-system"; +import { + IOFontWeight, + makeFontStyleObject +} from "@pagopa/io-app-design-system"; import React from "react"; -import { TextStyle, useWindowDimensions } from "react-native"; +import { Text, TextStyle, useWindowDimensions } from "react-native"; export type ClaimLabelProps = { fontSize?: number; @@ -27,21 +30,27 @@ export const ClaimLabel: React.FunctionComponent< const fontScale = width / 360; return ( - {props.children} - + ); }; From 645a80020515d7ad5975fa3343456291824fb731 Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Fri, 13 Dec 2024 08:57:32 +0100 Subject: [PATCH 43/46] Restore original `ItwDigitalVersionBadge` --- .../components/ItwDigitalVersionBadge.tsx | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/ts/features/itwallet/common/components/ItwDigitalVersionBadge.tsx b/ts/features/itwallet/common/components/ItwDigitalVersionBadge.tsx index 54617c701b0..2d2b58c37cb 100644 --- a/ts/features/itwallet/common/components/ItwDigitalVersionBadge.tsx +++ b/ts/features/itwallet/common/components/ItwDigitalVersionBadge.tsx @@ -3,11 +3,10 @@ import { IOBadgeRadius, IOBadgeVSpacing, IOColors, - IOText, - useIOExperimentalDesign + makeFontStyleObject } from "@pagopa/io-app-design-system"; import React from "react"; -import { Platform, StyleSheet, View } from "react-native"; +import { Platform, StyleSheet, Text, View } from "react-native"; import I18n from "../../../../i18n"; type DigitalVersionBadgeProps = { @@ -24,8 +23,6 @@ const ItwDigitalVersionBadge = ({ credentialType, isFaded = false }: DigitalVersionBadgeProps) => { - const { isExperimental } = useIOExperimentalDesign(); - const mapCredentialTypes: Record< NonNullable, CredentialTypesProps @@ -56,24 +53,19 @@ const ItwDigitalVersionBadge = ({ {isFaded && } - {`${I18n.t("features.itWallet.card.digital")}`} - + ); @@ -106,6 +98,12 @@ const styles = StyleSheet.create({ backgroundColor: IOColors.white, opacity: 0.6, zIndex: 10 + }, + label: { + alignSelf: "center", + textTransform: "uppercase", + flexShrink: 1, + ...makeFontStyleObject(12, "Titillio", 16, "Regular") } }); From b86812f28a3f635ed70eea86952978773de02199 Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Fri, 13 Dec 2024 09:13:34 +0100 Subject: [PATCH 44/46] Update `jest` snapshots --- .../__snapshots__/CardData.test.tsx.snap | 460 ++++++------------ .../ItwCredentialCard.test.tsx.snap | 154 +++--- 2 files changed, 216 insertions(+), 398 deletions(-) diff --git a/ts/features/itwallet/common/components/ItwSkeumorphicCard/__tests__/__snapshots__/CardData.test.tsx.snap b/ts/features/itwallet/common/components/ItwSkeumorphicCard/__tests__/__snapshots__/CardData.test.tsx.snap index e36a7877c6c..929ab6b29b8 100644 --- a/ts/features/itwallet/common/components/ItwSkeumorphicCard/__tests__/__snapshots__/CardData.test.tsx.snap +++ b/ts/features/itwallet/common/components/ItwSkeumorphicCard/__tests__/__snapshots__/CardData.test.tsx.snap @@ -211,23 +211,16 @@ exports[`CardData should match snapshot for DC front data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 22.916666666666668, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 22.916666666666668, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > Marco @@ -251,23 +244,16 @@ exports[`CardData should match snapshot for DC front data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 22.916666666666668, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 22.916666666666668, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > Rossi @@ -291,23 +277,16 @@ exports[`CardData should match snapshot for DC front data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 22.916666666666668, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 22.916666666666668, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > 15/03/90 @@ -331,23 +310,16 @@ exports[`CardData should match snapshot for DC front data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 22.916666666666668, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 22.916666666666668, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > 10008581 @@ -371,23 +343,16 @@ exports[`CardData should match snapshot for DC front data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 22.916666666666668, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 22.916666666666668, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > 23/03/32 @@ -425,23 +390,16 @@ exports[`CardData should match snapshot for MDL back data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 18.75, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 18.75, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > 23/01/35 @@ -465,23 +423,16 @@ exports[`CardData should match snapshot for MDL back data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 18.75, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 18.75, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > 16/02/35 @@ -505,23 +456,16 @@ exports[`CardData should match snapshot for MDL back data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 18.75, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 18.75, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > 23/01/35 @@ -545,23 +489,16 @@ exports[`CardData should match snapshot for MDL back data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 18.75, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 18.75, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > 16/02/35 @@ -585,23 +522,16 @@ exports[`CardData should match snapshot for MDL back data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 18.75, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 18.75, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > 78 @@ -625,23 +555,16 @@ exports[`CardData should match snapshot for MDL back data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 18.75, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 18.75, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > 71 MS5118113X @@ -712,23 +635,16 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 22.916666666666668, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 22.916666666666668, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > ROSSI @@ -752,23 +668,16 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 22.916666666666668, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 22.916666666666668, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > MARCO @@ -792,23 +701,16 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 22.916666666666668, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 22.916666666666668, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > 22/09/92 @@ -832,23 +734,16 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 22.916666666666668, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 22.916666666666668, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > MILANO (MI) @@ -872,23 +767,16 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 22.916666666666668, - "fontStyle": "normal", - "fontWeight": "700", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 22.916666666666668, + "fontStyle": "normal", + "fontWeight": "700", + "lineHeight": undefined, + "textTransform": "none", + } } > 08/01/2025 @@ -912,23 +800,16 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 22.916666666666668, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 22.916666666666668, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > MC-RM @@ -952,23 +833,16 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 22.916666666666668, - "fontStyle": "normal", - "fontWeight": "700", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 22.916666666666668, + "fontStyle": "normal", + "fontWeight": "700", + "lineHeight": undefined, + "textTransform": "none", + } } > 16/02/2035 @@ -992,23 +866,16 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 22.916666666666668, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 22.916666666666668, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > RM8375131N @@ -1032,23 +899,16 @@ exports[`CardData should match snapshot for MDL front data 1`] = ` accessible={false} allowFontScaling={false} lineBreakMode="head" - maxFontSizeMultiplier={1.25} numberOfLines={1} style={ - [ - {}, - { - "color": "#0E0F13", - "fontFamily": "Titillium Sans Pro", - "fontSize": 22.916666666666668, - "fontStyle": "normal", - "fontWeight": "600", - "lineHeight": undefined, - }, - { - "textTransform": "none", - }, - ] + { + "fontFamily": "Titillium Sans Pro", + "fontSize": 22.916666666666668, + "fontStyle": "normal", + "fontWeight": "600", + "lineHeight": undefined, + "textTransform": "none", + } } > AM B diff --git a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap index b0c9d8b4438..40be007b20e 100644 --- a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap +++ b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap @@ -126,28 +126,22 @@ exports[`ItwCredentialCard should match snapshot when credential type is "Europe @@ -302,28 +296,22 @@ exports[`ItwCredentialCard should match snapshot when credential type is "Europe @@ -478,28 +466,22 @@ exports[`ItwCredentialCard should match snapshot when credential type is "MDL" 1 @@ -792,28 +774,22 @@ exports[`ItwCredentialCard should match snapshot when status is "expired" 1`] = @@ -1092,28 +1068,22 @@ exports[`ItwCredentialCard should match snapshot when status is "expiring" 1`] = @@ -1282,28 +1252,22 @@ exports[`ItwCredentialCard should match snapshot when status is "pending" 1`] = @@ -1458,28 +1422,22 @@ exports[`ItwCredentialCard should match snapshot when status is "valid" 1`] = ` From 72885c54d69f9581ccfabdc54650a322967cb01d Mon Sep 17 00:00:00 2001 From: Federico Mastrini Date: Mon, 16 Dec 2024 10:56:10 +0100 Subject: [PATCH 45/46] fix: itw digital version badge corners rounding --- .../components/ItwDigitalVersionBadge.tsx | 7 +- .../__tests__/ItwDigitalVersionBadge.test.tsx | 17 ++ .../ItwDigitalVersionBadge.test.tsx.snap | 180 ++++++++++++++++++ 3 files changed, 201 insertions(+), 3 deletions(-) create mode 100644 ts/features/itwallet/common/components/__tests__/ItwDigitalVersionBadge.test.tsx create mode 100644 ts/features/itwallet/common/components/__tests__/__snapshots__/ItwDigitalVersionBadge.test.tsx.snap diff --git a/ts/features/itwallet/common/components/ItwDigitalVersionBadge.tsx b/ts/features/itwallet/common/components/ItwDigitalVersionBadge.tsx index 2d2b58c37cb..39b86ab5ce7 100644 --- a/ts/features/itwallet/common/components/ItwDigitalVersionBadge.tsx +++ b/ts/features/itwallet/common/components/ItwDigitalVersionBadge.tsx @@ -88,10 +88,11 @@ const styles = StyleSheet.create({ } }), borderCurve: "continuous", - borderTopLeftRadius: IOBadgeRadius, - borderBottomLeftRadius: IOBadgeRadius, + borderRadius: IOBadgeRadius, paddingHorizontal: IOBadgeHSpacing, - paddingVertical: IOBadgeVSpacing + paddingVertical: IOBadgeVSpacing, + paddingEnd: IOBadgeHSpacing + 8, + marginEnd: -IOBadgeHSpacing }, faded: { ...StyleSheet.absoluteFillObject, diff --git a/ts/features/itwallet/common/components/__tests__/ItwDigitalVersionBadge.test.tsx b/ts/features/itwallet/common/components/__tests__/ItwDigitalVersionBadge.test.tsx new file mode 100644 index 00000000000..63ff7e617c6 --- /dev/null +++ b/ts/features/itwallet/common/components/__tests__/ItwDigitalVersionBadge.test.tsx @@ -0,0 +1,17 @@ +import { render } from "@testing-library/react-native"; +import React from "react"; +import { ItwDigitalVersionBadge } from "../ItwDigitalVersionBadge"; + +describe("ItwDigitalVersionBadge", () => { + it.each([ + "MDL", + "EuropeanDisabilityCard", + "EuropeanHealthInsuranceCard", + "InvalidCredentialType" + ])("should render correctly %s", credentialType => { + const component = render( + + ).toJSON(); + expect(component).toMatchSnapshot(); + }); +}); diff --git a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwDigitalVersionBadge.test.tsx.snap b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwDigitalVersionBadge.test.tsx.snap new file mode 100644 index 00000000000..d455e9d6119 --- /dev/null +++ b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwDigitalVersionBadge.test.tsx.snap @@ -0,0 +1,180 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ItwDigitalVersionBadge should render correctly EuropeanDisabilityCard 1`] = ` + + + + Versione digitale + + + +`; + +exports[`ItwDigitalVersionBadge should render correctly EuropeanHealthInsuranceCard 1`] = ` + + + + Versione digitale + + + +`; + +exports[`ItwDigitalVersionBadge should render correctly InvalidCredentialType 1`] = `null`; + +exports[`ItwDigitalVersionBadge should render correctly MDL 1`] = ` + + + + Versione digitale + + + +`; From cda616b3a4d1e60ccd2abaccae03a1704da15bd1 Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Mon, 16 Dec 2024 11:50:44 +0100 Subject: [PATCH 46/46] Update `jest` snapshot --- .../ItwCredentialCard.test.tsx.snap | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap index 40be007b20e..8dd883f8751 100644 --- a/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap +++ b/ts/features/itwallet/common/components/__tests__/__snapshots__/ItwCredentialCard.test.tsx.snap @@ -108,12 +108,13 @@ exports[`ItwCredentialCard should match snapshot when credential type is "Europe [ { "alignItems": "center", - "borderBottomLeftRadius": 24, "borderCurve": "continuous", - "borderTopLeftRadius": 24, + "borderRadius": 24, "flexDirection": "row", "justifyContent": "center", + "marginEnd": -8, "overflow": "hidden", + "paddingEnd": 16, "paddingHorizontal": 8, "paddingVertical": 4, }, @@ -278,12 +279,13 @@ exports[`ItwCredentialCard should match snapshot when credential type is "Europe [ { "alignItems": "center", - "borderBottomLeftRadius": 24, "borderCurve": "continuous", - "borderTopLeftRadius": 24, + "borderRadius": 24, "flexDirection": "row", "justifyContent": "center", + "marginEnd": -8, "overflow": "hidden", + "paddingEnd": 16, "paddingHorizontal": 8, "paddingVertical": 4, }, @@ -448,12 +450,13 @@ exports[`ItwCredentialCard should match snapshot when credential type is "MDL" 1 [ { "alignItems": "center", - "borderBottomLeftRadius": 24, "borderCurve": "continuous", - "borderTopLeftRadius": 24, + "borderRadius": 24, "flexDirection": "row", "justifyContent": "center", + "marginEnd": -8, "overflow": "hidden", + "paddingEnd": 16, "paddingHorizontal": 8, "paddingVertical": 4, }, @@ -742,12 +745,13 @@ exports[`ItwCredentialCard should match snapshot when status is "expired" 1`] = [ { "alignItems": "center", - "borderBottomLeftRadius": 24, "borderCurve": "continuous", - "borderTopLeftRadius": 24, + "borderRadius": 24, "flexDirection": "row", "justifyContent": "center", + "marginEnd": -8, "overflow": "hidden", + "paddingEnd": 16, "paddingHorizontal": 8, "paddingVertical": 4, }, @@ -1050,12 +1054,13 @@ exports[`ItwCredentialCard should match snapshot when status is "expiring" 1`] = [ { "alignItems": "center", - "borderBottomLeftRadius": 24, "borderCurve": "continuous", - "borderTopLeftRadius": 24, + "borderRadius": 24, "flexDirection": "row", "justifyContent": "center", + "marginEnd": -8, "overflow": "hidden", + "paddingEnd": 16, "paddingHorizontal": 8, "paddingVertical": 4, }, @@ -1220,12 +1225,13 @@ exports[`ItwCredentialCard should match snapshot when status is "pending" 1`] = [ { "alignItems": "center", - "borderBottomLeftRadius": 24, "borderCurve": "continuous", - "borderTopLeftRadius": 24, + "borderRadius": 24, "flexDirection": "row", "justifyContent": "center", + "marginEnd": -8, "overflow": "hidden", + "paddingEnd": 16, "paddingHorizontal": 8, "paddingVertical": 4, }, @@ -1404,12 +1410,13 @@ exports[`ItwCredentialCard should match snapshot when status is "valid" 1`] = ` [ { "alignItems": "center", - "borderBottomLeftRadius": 24, "borderCurve": "continuous", - "borderTopLeftRadius": 24, + "borderRadius": 24, "flexDirection": "row", "justifyContent": "center", + "marginEnd": -8, "overflow": "hidden", + "paddingEnd": 16, "paddingHorizontal": 8, "paddingVertical": 4, },