From 8b9dfbfefcc6ba6d7c8f82af9eaa04323a73a26c Mon Sep 17 00:00:00 2001 From: LucasBeneston Date: Fri, 10 Jan 2025 12:06:35 +0100 Subject: [PATCH 1/6] (PC-33786) feat(accessibility): add noMawWidth in SecondaryPageWithBlurHeader and use in accessibility --- .../Achievements.native.test.tsx.native-snap | 1 + ...gottenPassword.native.test.tsx.native-snap | 1 + ...ializePassword.native.test.tsx.native-snap | 1 + ...swordEmailSent.native.test.tsx.native-snap | 1 + .../login/Login.native.test.tsx.native-snap | 1 + ...nEmailSentPage.native.test.tsx.native-snap | 1 + ...FavoritesSorts.native.test.tsx.native-snap | 1 + .../Accessibility.native.test.tsx.native-snap | 3 +- ...lityActionPlan.native.test.tsx.native-snap | 3 +- ...ityDeclaration.native.test.tsx.native-snap | 15 +++++----- ...lityEngagement.native.test.tsx.native-snap | 3 +- ...commendedPaths.native.test.tsx.native-snap | 3 +- .../ChangeEmail.native.test.tsx.native-snap | 1 + ...ailSetPassword.native.test.tsx.native-snap | 1 + ...ChangePassword.native.test.tsx.native-snap | 1 + ...onsentSettings.native.test.tsx.native-snap | 1 + .../LegalNotices.native.test.tsx.native-snap | 1 + ...EmailSelection.native.test.tsx.native-snap | 1 + ...ationsSettings.native.test.tsx.native-snap | 2 ++ .../PersonalData.native.test.tsx.native-snap | 1 + .../SearchFilter.native.test.tsx.native-snap | 1 + ...WithBlurHeader.native.test.tsx.native-snap | 1 + .../pages/Accessibility/Accessibility.tsx | 2 +- .../Accessibility/AccessibilityActionPlan.tsx | 2 +- .../AccessibilityDeclaration.tsx | 17 ++++------- .../Accessibility/AccessibilityEngagement.tsx | 2 +- .../pages/Accessibility/RecommendedPaths.tsx | 2 +- src/ui/pages/SecondaryPageWithBlurHeader.tsx | 29 ++++++++++++------- 28 files changed, 62 insertions(+), 37 deletions(-) diff --git a/__snapshots__/features/achievements/pages/Achievements.native.test.tsx.native-snap b/__snapshots__/features/achievements/pages/Achievements.native.test.tsx.native-snap index a00117cbf50..57b9ef7e891 100644 --- a/__snapshots__/features/achievements/pages/Achievements.native.test.tsx.native-snap +++ b/__snapshots__/features/achievements/pages/Achievements.native.test.tsx.native-snap @@ -167,6 +167,7 @@ exports[` should match snapshot 1`] = ` "width": "100%", } } + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/auth/pages/forgottenPassword/ForgottenPassword/ForgottenPassword.native.test.tsx.native-snap b/__snapshots__/features/auth/pages/forgottenPassword/ForgottenPassword/ForgottenPassword.native.test.tsx.native-snap index f2a4176eb42..474b7fecf4f 100644 --- a/__snapshots__/features/auth/pages/forgottenPassword/ForgottenPassword/ForgottenPassword.native.test.tsx.native-snap +++ b/__snapshots__/features/auth/pages/forgottenPassword/ForgottenPassword/ForgottenPassword.native.test.tsx.native-snap @@ -190,6 +190,7 @@ exports[` should match snapshot 1`] = ` "width": "100%", } } + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/auth/pages/forgottenPassword/ReinitializePassword/ReinitializePassword.native.test.tsx.native-snap b/__snapshots__/features/auth/pages/forgottenPassword/ReinitializePassword/ReinitializePassword.native.test.tsx.native-snap index bd727f25ba0..9b2b3e0e8e6 100644 --- a/__snapshots__/features/auth/pages/forgottenPassword/ReinitializePassword/ReinitializePassword.native.test.tsx.native-snap +++ b/__snapshots__/features/auth/pages/forgottenPassword/ReinitializePassword/ReinitializePassword.native.test.tsx.native-snap @@ -252,6 +252,7 @@ exports[`ReinitializePassword Page should match snapshot 1`] = ` "width": "100%", } } + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/auth/pages/forgottenPassword/ResetPasswordEmailSent/ResetPasswordEmailSent.native.test.tsx.native-snap b/__snapshots__/features/auth/pages/forgottenPassword/ResetPasswordEmailSent/ResetPasswordEmailSent.native.test.tsx.native-snap index 5f1b6df7276..7a2d028c253 100644 --- a/__snapshots__/features/auth/pages/forgottenPassword/ResetPasswordEmailSent/ResetPasswordEmailSent.native.test.tsx.native-snap +++ b/__snapshots__/features/auth/pages/forgottenPassword/ResetPasswordEmailSent/ResetPasswordEmailSent.native.test.tsx.native-snap @@ -180,6 +180,7 @@ exports[` should match snapshot 1`] = ` "width": "100%", } } + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/auth/pages/login/Login.native.test.tsx.native-snap b/__snapshots__/features/auth/pages/login/Login.native.test.tsx.native-snap index 39a71b2f0fe..5da8e6a4969 100644 --- a/__snapshots__/features/auth/pages/login/Login.native.test.tsx.native-snap +++ b/__snapshots__/features/auth/pages/login/Login.native.test.tsx.native-snap @@ -190,6 +190,7 @@ exports[` should render correctly when feature flag is enabled 1`] = ` "width": "100%", } } + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/auth/pages/signup/SignupConfirmationEmailSent/SignupConfirmationEmailSentPage.native.test.tsx.native-snap b/__snapshots__/features/auth/pages/signup/SignupConfirmationEmailSent/SignupConfirmationEmailSentPage.native.test.tsx.native-snap index 6fe506ad75c..0d13ed54027 100644 --- a/__snapshots__/features/auth/pages/signup/SignupConfirmationEmailSent/SignupConfirmationEmailSentPage.native.test.tsx.native-snap +++ b/__snapshots__/features/auth/pages/signup/SignupConfirmationEmailSent/SignupConfirmationEmailSentPage.native.test.tsx.native-snap @@ -190,6 +190,7 @@ exports[` should render correctly 1`] = ` "width": "100%", } } + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/favorites/pages/FavoritesSorts.native.test.tsx.native-snap b/__snapshots__/features/favorites/pages/FavoritesSorts.native.test.tsx.native-snap index ce36238ca16..6fa872b39c8 100644 --- a/__snapshots__/features/favorites/pages/FavoritesSorts.native.test.tsx.native-snap +++ b/__snapshots__/features/favorites/pages/FavoritesSorts.native.test.tsx.native-snap @@ -190,6 +190,7 @@ exports[` should render correctly 1`] = ` "width": "100%", } } + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/Accessibility/Accessibility.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/Accessibility/Accessibility.native.test.tsx.native-snap index 27922356caa..8c2483a9042 100644 --- a/__snapshots__/features/profile/pages/Accessibility/Accessibility.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/Accessibility/Accessibility.native.test.tsx.native-snap @@ -184,12 +184,13 @@ exports[`Accessibility should render correctly 1`] = ` contentContainerStyle={ { "alignSelf": "center", - "maxWidth": 500, + "maxWidth": "100%", "paddingHorizontal": 24, "paddingVertical": 24, "width": "100%", } } + noMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap index 4d74bfb15d7..6964bb17701 100644 --- a/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap @@ -184,12 +184,13 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` contentContainerStyle={ { "alignSelf": "center", - "maxWidth": 500, + "maxWidth": "100%", "paddingHorizontal": 24, "paddingVertical": 24, "width": "100%", } } + noMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/Accessibility/AccessibilityDeclaration.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/Accessibility/AccessibilityDeclaration.native.test.tsx.native-snap index 28eb479c300..937b913ade9 100644 --- a/__snapshots__/features/profile/pages/Accessibility/AccessibilityDeclaration.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/Accessibility/AccessibilityDeclaration.native.test.tsx.native-snap @@ -184,12 +184,13 @@ exports[`AccessibilityDeclaration should render correctly 1`] = ` contentContainerStyle={ { "alignSelf": "center", - "maxWidth": 500, + "maxWidth": "100%", "paddingHorizontal": 24, "paddingVertical": 24, "width": "100%", } } + noMaxWidth={true} scrollEnabled={true} style={ [ @@ -315,7 +316,7 @@ exports[`AccessibilityDeclaration should render correctly 1`] = ` > - Schéma pluriannuel d’accessibilité 2022 - 2024 + Schéma pluriannuel d’accessibilité 2022 - 2025 @@ -485,7 +486,7 @@ exports[`AccessibilityDeclaration should render correctly 1`] = ` > - Actions réalisées en 2022 et 2023 + Actions réalisées depuis 2022 diff --git a/__snapshots__/features/profile/pages/Accessibility/AccessibilityEngagement.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/Accessibility/AccessibilityEngagement.native.test.tsx.native-snap index f99ac2a0cf7..03318fbafee 100644 --- a/__snapshots__/features/profile/pages/Accessibility/AccessibilityEngagement.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/Accessibility/AccessibilityEngagement.native.test.tsx.native-snap @@ -184,12 +184,13 @@ exports[`AccessibilityEngagement should render correctly 1`] = ` contentContainerStyle={ { "alignSelf": "center", - "maxWidth": 500, + "maxWidth": "100%", "paddingHorizontal": 24, "paddingVertical": 24, "width": "100%", } } + noMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/Accessibility/RecommendedPaths.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/Accessibility/RecommendedPaths.native.test.tsx.native-snap index 4d5d2a33924..8c55612747c 100644 --- a/__snapshots__/features/profile/pages/Accessibility/RecommendedPaths.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/Accessibility/RecommendedPaths.native.test.tsx.native-snap @@ -184,12 +184,13 @@ exports[`RecommendedPaths should render correctly 1`] = ` contentContainerStyle={ { "alignSelf": "center", - "maxWidth": 500, + "maxWidth": "100%", "paddingHorizontal": 24, "paddingVertical": 24, "width": "100%", } } + noMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/ChangeEmail/ChangeEmail.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/ChangeEmail/ChangeEmail.native.test.tsx.native-snap index 0570e969ab1..353db3db8a6 100644 --- a/__snapshots__/features/profile/pages/ChangeEmail/ChangeEmail.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/ChangeEmail/ChangeEmail.native.test.tsx.native-snap @@ -190,6 +190,7 @@ exports[` should render correctly 1`] = ` "width": "100%", } } + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/ChangeEmailSetPassword/ChangeEmailSetPassword.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/ChangeEmailSetPassword/ChangeEmailSetPassword.native.test.tsx.native-snap index daec46b3dd8..9c210d67769 100644 --- a/__snapshots__/features/profile/pages/ChangeEmailSetPassword/ChangeEmailSetPassword.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/ChangeEmailSetPassword/ChangeEmailSetPassword.native.test.tsx.native-snap @@ -190,6 +190,7 @@ exports[` should match snapshot 1`] = ` "width": "100%", } } + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/ChangePassword/ChangePassword.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/ChangePassword/ChangePassword.native.test.tsx.native-snap index 470a6ff5989..ac1dfa4f728 100644 --- a/__snapshots__/features/profile/pages/ChangePassword/ChangePassword.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/ChangePassword/ChangePassword.native.test.tsx.native-snap @@ -191,6 +191,7 @@ exports[`ChangePassword should render correctly 1`] = ` } } keyboardShouldPersistTaps="handled" + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/ConsentSettings/ConsentSettings.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/ConsentSettings/ConsentSettings.native.test.tsx.native-snap index adef878f514..e5205e03f31 100644 --- a/__snapshots__/features/profile/pages/ConsentSettings/ConsentSettings.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/ConsentSettings/ConsentSettings.native.test.tsx.native-snap @@ -190,6 +190,7 @@ exports[` should render correctly 1`] = ` "width": "100%", } } + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/LegalNotices/LegalNotices.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/LegalNotices/LegalNotices.native.test.tsx.native-snap index b552deb9206..e2396aa7951 100644 --- a/__snapshots__/features/profile/pages/LegalNotices/LegalNotices.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/LegalNotices/LegalNotices.native.test.tsx.native-snap @@ -190,6 +190,7 @@ exports[`LegalNotices should render correctly 1`] = ` "width": "100%", } } + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/NewEmailSelection/NewEmailSelection.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/NewEmailSelection/NewEmailSelection.native.test.tsx.native-snap index 079990c2b32..194ee28351e 100644 --- a/__snapshots__/features/profile/pages/NewEmailSelection/NewEmailSelection.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/NewEmailSelection/NewEmailSelection.native.test.tsx.native-snap @@ -190,6 +190,7 @@ exports[` should match snapshot 1`] = ` "width": "100%", } } + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/NotificationSettings/NotificationsSettings.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/NotificationSettings/NotificationsSettings.native.test.tsx.native-snap index 02fcb7ad5ac..d212c55450a 100644 --- a/__snapshots__/features/profile/pages/NotificationSettings/NotificationsSettings.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/NotificationSettings/NotificationsSettings.native.test.tsx.native-snap @@ -190,6 +190,7 @@ exports[`NotificationsSettings should render correctly when user is logged in 1` "width": "100%", } } + noMaxWidth={false} scrollEnabled={true} style={ [ @@ -2574,6 +2575,7 @@ exports[`NotificationsSettings should render correctly when user is not logged i "width": "100%", } } + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/PersonalData/PersonalData.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/PersonalData/PersonalData.native.test.tsx.native-snap index 67f74d1fc40..038811079ad 100644 --- a/__snapshots__/features/profile/pages/PersonalData/PersonalData.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/PersonalData/PersonalData.native.test.tsx.native-snap @@ -190,6 +190,7 @@ exports[`PersonalData should render personal data success 1`] = ` "width": "100%", } } + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/search/pages/SearchFilter/SearchFilter.native.test.tsx.native-snap b/__snapshots__/features/search/pages/SearchFilter/SearchFilter.native.test.tsx.native-snap index 8394217a0a9..6670e10b831 100644 --- a/__snapshots__/features/search/pages/SearchFilter/SearchFilter.native.test.tsx.native-snap +++ b/__snapshots__/features/search/pages/SearchFilter/SearchFilter.native.test.tsx.native-snap @@ -199,6 +199,7 @@ exports[` should render correctly 1`] = ` } } keyboardShouldPersistTaps="always" + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/ui/pages/SecondaryPageWithBlurHeader.native.test.tsx.native-snap b/__snapshots__/ui/pages/SecondaryPageWithBlurHeader.native.test.tsx.native-snap index 128c7caf287..ff7b60737be 100644 --- a/__snapshots__/ui/pages/SecondaryPageWithBlurHeader.native.test.tsx.native-snap +++ b/__snapshots__/ui/pages/SecondaryPageWithBlurHeader.native.test.tsx.native-snap @@ -190,6 +190,7 @@ exports[` should render correctly 1`] = ` "width": "100%", } } + noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/src/features/profile/pages/Accessibility/Accessibility.tsx b/src/features/profile/pages/Accessibility/Accessibility.tsx index 9caac53ccc1..bc8aed8cf83 100644 --- a/src/features/profile/pages/Accessibility/Accessibility.tsx +++ b/src/features/profile/pages/Accessibility/Accessibility.tsx @@ -42,7 +42,7 @@ const sections = [ export function Accessibility() { return ( - + } /> ) diff --git a/src/features/profile/pages/Accessibility/AccessibilityActionPlan.tsx b/src/features/profile/pages/Accessibility/AccessibilityActionPlan.tsx index b5a9f6cf49d..fd40cbe8cb3 100644 --- a/src/features/profile/pages/Accessibility/AccessibilityActionPlan.tsx +++ b/src/features/profile/pages/Accessibility/AccessibilityActionPlan.tsx @@ -18,7 +18,7 @@ import { getHeadingAttrs } from 'ui/theme/typographyAttrs/getHeadingAttrs' export function AccessibilityActionPlan() { return ( - + Schéma pluriannuel d’accessibilité 2022 - 2024 diff --git a/src/features/profile/pages/Accessibility/AccessibilityDeclaration.tsx b/src/features/profile/pages/Accessibility/AccessibilityDeclaration.tsx index d0d9f5aae2d..675a361972d 100644 --- a/src/features/profile/pages/Accessibility/AccessibilityDeclaration.tsx +++ b/src/features/profile/pages/Accessibility/AccessibilityDeclaration.tsx @@ -2,7 +2,6 @@ import React from 'react' import styled from 'styled-components/native' import { contactSupport } from 'features/auth/helpers/contactSupport' -import { RootNavigateParams } from 'features/navigation/RootNavigator/types' import { WEBAPP_V2_URL } from 'libs/environment' import { BulletListItem } from 'ui/components/BulletListItem' import { ButtonInsideText } from 'ui/components/buttons/buttonInsideText/ButtonInsideText' @@ -18,10 +17,6 @@ import { getSpacing, Spacer, TypoDS } from 'ui/theme' import { DOUBLE_LINE_BREAK } from 'ui/theme/constants' import { getHeadingAttrs } from 'ui/theme/typographyAttrs/getHeadingAttrs' -const actionPlanScreen: { screen: RootNavigateParams[0] } = { - screen: 'AccessibilityActionPlan', -} - const webappUrl = { url: WEBAPP_V2_URL } const homeUrl = { url: `${WEBAPP_V2_URL}/accueil` } const signupUrl = { url: `${WEBAPP_V2_URL}/creation-compte` } @@ -40,7 +35,7 @@ const rightsDelegateUrl = { url: 'https://www.defenseurdesdroits.fr/saisir/deleg export function AccessibilityDeclaration() { return ( - + Le pass Culture s’engage à rendre son site internet accessible conformément à l’article 47 de la loi n° 2005-102 du 11 février 2005. À cette fin, il met en œuvre la stratégie et les @@ -53,9 +48,9 @@ export function AccessibilityDeclaration() { @@ -64,9 +59,9 @@ export function AccessibilityDeclaration() { @@ -77,7 +72,7 @@ export function AccessibilityDeclaration() { typography="BodyAccentXs" wording="Plan d’actions 2024" icon={PlainArrowNext} - navigateTo={actionPlanScreen} + navigateTo={{ screen: 'AccessibilityActionPlan' }} /> diff --git a/src/features/profile/pages/Accessibility/AccessibilityEngagement.tsx b/src/features/profile/pages/Accessibility/AccessibilityEngagement.tsx index e116027e01f..ab640e8b342 100644 --- a/src/features/profile/pages/Accessibility/AccessibilityEngagement.tsx +++ b/src/features/profile/pages/Accessibility/AccessibilityEngagement.tsx @@ -13,7 +13,7 @@ import { getHeadingAttrs } from 'ui/theme/typographyAttrs/getHeadingAttrs' export function AccessibilityEngagement() { return ( - + Date de publication : 19 mai 2022 diff --git a/src/features/profile/pages/Accessibility/RecommendedPaths.tsx b/src/features/profile/pages/Accessibility/RecommendedPaths.tsx index 0c42948b17a..0b1cb6206c6 100644 --- a/src/features/profile/pages/Accessibility/RecommendedPaths.tsx +++ b/src/features/profile/pages/Accessibility/RecommendedPaths.tsx @@ -11,7 +11,7 @@ import { DOUBLE_LINE_BREAK, LINE_BREAK } from 'ui/theme/constants' export function RecommendedPaths() { return ( - + En complément de la mise en conformité du pass Culture au regard des critères du RGAA qui reste partielle, les équipes du pass Culture se sont attachées à travailler des parcours diff --git a/src/ui/pages/SecondaryPageWithBlurHeader.tsx b/src/ui/pages/SecondaryPageWithBlurHeader.tsx index 7a3c1db169f..e0d8462a3fc 100644 --- a/src/ui/pages/SecondaryPageWithBlurHeader.tsx +++ b/src/ui/pages/SecondaryPageWithBlurHeader.tsx @@ -1,5 +1,5 @@ import React, { PropsWithChildren, ReactNode } from 'react' -import { ScrollView, ScrollViewProps } from 'react-native' +import { ScrollViewProps } from 'react-native' import styled from 'styled-components/native' import { BlurHeader } from 'ui/components/headers/BlurHeader' @@ -15,6 +15,7 @@ type Props = PropsWithChildren<{ RightButton?: ReactNode scrollable?: boolean scrollViewProps?: Omit + noMaxWidth?: boolean }> export const SecondaryPageWithBlurHeader = ({ @@ -25,6 +26,7 @@ export const SecondaryPageWithBlurHeader = ({ children, scrollable = true, scrollViewProps = {}, + noMaxWidth = false, }: Props) => { const headerHeight = useGetHeaderHeight() @@ -36,7 +38,7 @@ export const SecondaryPageWithBlurHeader = ({ onGoBack={onGoBack} RightButton={RightButton} /> - + {children} @@ -45,15 +47,20 @@ export const SecondaryPageWithBlurHeader = ({ ) } -const StyledScrollView = styled(ScrollView).attrs(({ theme }) => ({ - contentContainerStyle: { - paddingHorizontal: theme.contentPage.marginHorizontal, - paddingVertical: theme.contentPage.marginVertical, - maxWidth: theme.contentPage.maxWidth, - width: '100%', - alignSelf: 'center', - }, -}))`` +interface StyledScrollViewProps { + noMaxWidth: boolean +} +const StyledScrollView = styled.ScrollView.attrs( + ({ theme, noMaxWidth }) => ({ + contentContainerStyle: { + paddingHorizontal: theme.contentPage.marginHorizontal, + paddingVertical: theme.contentPage.marginVertical, + maxWidth: noMaxWidth ? '100%' : theme.contentPage.maxWidth, + width: '100%', + alignSelf: 'center', + }, + }) +)({}) const Placeholder = styled.View<{ height: number }>(({ height }) => ({ height, From 0d637b30659b87541694f8d0acfac6a9fd8870e8 Mon Sep 17 00:00:00 2001 From: LucasBeneston Date: Fri, 10 Jan 2025 12:27:16 +0100 Subject: [PATCH 2/6] (PC-33786) feat(accessibility): update 2024 accessibility action plan --- ...lityActionPlan.native.test.tsx.native-snap | 268 +++++++++++------- .../AccessibilityActionPlan2024.tsx | 26 +- 2 files changed, 188 insertions(+), 106 deletions(-) diff --git a/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap index 6964bb17701..23feee85ee3 100644 --- a/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap @@ -3334,11 +3334,11 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` - - En cours + Réalisé @@ -3413,11 +3413,11 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` > Intégrer les données d’Acceslibre pour améliorer l’information sur l’accessibilité des lieux - - En cours + Réalisé @@ -3491,11 +3491,11 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` > Mener des actions de sensibilisation des partenaires culturels sur l’information d’accessibilité de leurs lieux - - Prochainement + Réalisé @@ -3679,11 +3679,11 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` - - Prochainement + Réalisé @@ -3868,11 +3868,11 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` - - Prochainement + Réalisé + + + + + + + + + + + undefined-SVG-Mock + + + + Sensibilisation des équipes internes aux enjeux d’accessibilité + + - + Réalisé @@ -3965,6 +4043,84 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` + + + + + + undefined-SVG-Mock + + + + + Réaliser un nouvel audit d’accessibilité du portail pro par un cabinet externe + + - + Prochainement + + + + - - Prochainement + En cours @@ -4229,85 +4385,7 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` } > - - Prochainement - - - - - - - - - - undefined-SVG-Mock - - - - - Sensibilisation des équipes internes aux enjeux d’accessibilité - - - - Prochainement + En cours diff --git a/src/features/profile/pages/Accessibility/AccessibilityActionPlan2024.tsx b/src/features/profile/pages/Accessibility/AccessibilityActionPlan2024.tsx index fa1b3601062..4e999ae25cb 100644 --- a/src/features/profile/pages/Accessibility/AccessibilityActionPlan2024.tsx +++ b/src/features/profile/pages/Accessibility/AccessibilityActionPlan2024.tsx @@ -31,16 +31,16 @@ export const AccessibilityActionPlan2024 = () => ( icon={ExternalSiteFilled} externalNav={{ url: 'https://passculture.pro/' }} /> - + - + - + @@ -53,7 +53,7 @@ export const AccessibilityActionPlan2024 = () => ( icon={ExternalSiteFilled} externalNav={{ url: 'https://pass.culture.fr/' }} /> - + @@ -67,14 +67,22 @@ export const AccessibilityActionPlan2024 = () => ( icon={ExternalSiteFilled} externalNav={{ url: 'https://passculture.pro/' }} /> - + + + + + + + + + Rendre le site{' '} @@ -86,16 +94,12 @@ export const AccessibilityActionPlan2024 = () => ( externalNav={{ url: 'https://passculture.app/' }} />{' '} 100% accessible - + - - - - - + From 74dfc5a6e5f46586fd94836a2e8f112073478045 Mon Sep 17 00:00:00 2001 From: LucasBeneston Date: Fri, 10 Jan 2025 13:17:56 +0100 Subject: [PATCH 3/6] (PC-33786) feat(accessibility): add status details in ActionPlanTag --- ...lityActionPlan.native.test.tsx.native-snap | 1322 ++++++++++++++--- .../Buttons/ActionPlanTag/ActionPlanTag.tsx | 10 +- .../AccessibilityActionPlan2024.tsx | 20 +- 3 files changed, 1114 insertions(+), 238 deletions(-) diff --git a/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap index 23feee85ee3..880baf0470a 100644 --- a/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap @@ -3051,6 +3051,844 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } /> + + Plan annuel 2025 + + + + + + + + + undefined-SVG-Mock + + + + + Réaliser un audit interne sur les parcours clés de la version web + + + - + Prochainement + + + + + + + + + + undefined-SVG-Mock + + + + + Valider la certification “Développer des sites web accessibles” (tous les développeurs front-end) + + + - + Prochainement + + + + + + + + + + undefined-SVG-Mock + + + + + Former un développeur à l’audit d’accessibilité numérique des applications mobiles + + + - + Prochainement + + + + + + + + + + undefined-SVG-Mock + + + + + Mettre en place un process de vérification d’accessibilité RGAA pour les nouvelles fonctionnalités + + + - + Prochainement + + + + + + + + + + undefined-SVG-Mock + + + + + Revoir l’accessibilité de tous les mails transactionnels + + + - + Prochainement + + + + + + + + + + undefined-SVG-Mock + + + + + Atteindre 100% d’accessibilité de la version web sur les parcours clés + + + - + Prochainement + + + + + + + + + + undefined-SVG-Mock + + + + + Informer des modalités de mises en accessibilité des offres + + + - + Prochainement + + + + + + + + + + undefined-SVG-Mock + + + + + Renforcer la visibilité sur le pass d’offres accessibles auprès des publics concernés (partenariats et inscriptions d’AC spécialisées…) + + + - + Prochainement + + + + + + + + + + undefined-SVG-Mock + + + + + Proposer un mode sombre aux utilisateurs + + + - + Prochainement + + + + + + + + + + undefined-SVG-Mock + + + + + Mettre en place un design system 100% accessible + + + - + Prochainement + + + + + + - - + + - Réalisé @@ -3346,7 +4185,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -3425,7 +4265,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -3503,7 +4344,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -3691,7 +4533,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -3838,207 +4681,52 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` button-icon-SVG-Mock - - - - https://passculture.pro/ - - - - - - - - Réalisé - - - - - - - - - - - undefined-SVG-Mock - - - - - Sensibilisation des équipes internes aux enjeux d’accessibilité - - - - Réalisé - - - - - - - - - - undefined-SVG-Mock + + + + https://passculture.pro/ + + + + + + + - + Réalisé - - - - Mettre en place une charte graphique 100% accessible - - - - Prochainement @@ -4101,13 +4789,13 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - Réaliser un nouvel audit d’accessibilité du portail pro par un cabinet externe + Sensibilisation des équipes internes aux enjeux d’accessibilité - - - Prochainement + + - + Réalisé @@ -4305,8 +4994,10 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - En cours + - poursuivi en 2025 @@ -4384,8 +5075,170 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - En cours + - poursuivi en 2025 + + + + + + + + + + undefined-SVG-Mock + + + + + Mettre en place une charte graphique 100% accessible + + + - + Prochainement + - a faire en 2025 + + + + + + + + + + undefined-SVG-Mock + + + + + Réaliser un nouvel audit d’accessibilité du portail pro par un cabinet externe + + + - + Prochainement + - a faire en 2025 @@ -4510,7 +5363,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -4588,7 +5442,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -4763,7 +5618,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -4938,7 +5794,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -5016,7 +5873,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -5206,7 +6064,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -5285,7 +6144,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -5411,7 +6271,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -5489,7 +6350,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -5567,7 +6429,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -5645,7 +6508,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -5723,7 +6587,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -5801,7 +6666,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -5879,7 +6745,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé @@ -5957,7 +6824,8 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - - + + - Réalisé diff --git a/src/features/profile/components/Buttons/ActionPlanTag/ActionPlanTag.tsx b/src/features/profile/components/Buttons/ActionPlanTag/ActionPlanTag.tsx index b0ac23b7d18..2112a398596 100644 --- a/src/features/profile/components/Buttons/ActionPlanTag/ActionPlanTag.tsx +++ b/src/features/profile/components/Buttons/ActionPlanTag/ActionPlanTag.tsx @@ -2,6 +2,7 @@ import React from 'react' import styled from 'styled-components/native' import { TypoDS } from 'ui/theme' +import { SPACE } from 'ui/theme/constants' export enum ActionPlanStatus { DONE = 'Réalisé', @@ -11,10 +12,17 @@ export enum ActionPlanStatus { export const ActionPlanTag = ({ status = ActionPlanStatus.DONE, + details, }: { status?: ActionPlanStatus + details?: string }) => { - return - {status} + return ( + + {SPACE}- {status} + {details && ` - ${details}`} + + ) } const StyledButtonText = styled(TypoDS.BodyAccent)<{ done: boolean }>(({ theme, done }) => ({ diff --git a/src/features/profile/pages/Accessibility/AccessibilityActionPlan2024.tsx b/src/features/profile/pages/Accessibility/AccessibilityActionPlan2024.tsx index 4e999ae25cb..3865ff5d915 100644 --- a/src/features/profile/pages/Accessibility/AccessibilityActionPlan2024.tsx +++ b/src/features/profile/pages/Accessibility/AccessibilityActionPlan2024.tsx @@ -75,14 +75,6 @@ export const AccessibilityActionPlan2024 = () => ( - - - - - - - - Rendre le site{' '} @@ -94,12 +86,20 @@ export const AccessibilityActionPlan2024 = () => ( externalNav={{ url: 'https://passculture.app/' }} />{' '} 100% accessible - + - + + + + + + + + + From a2e8f42907416e9b9460ea0c5a2d6239f1eb2983 Mon Sep 17 00:00:00 2001 From: LucasBeneston Date: Fri, 10 Jan 2025 14:13:38 +0100 Subject: [PATCH 4/6] (PC-33786) feat(accessibility): add 2025 accessibility action plan --- ...lityActionPlan.native.test.tsx.native-snap | 4 +- .../Accessibility/AccessibilityActionPlan.tsx | 3 + .../AccessibilityActionPlan2025.tsx | 58 +++++++++++++++++++ 3 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 src/features/profile/pages/Accessibility/AccessibilityActionPlan2025.tsx diff --git a/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap index 880baf0470a..0fd294881f6 100644 --- a/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap @@ -3239,7 +3239,7 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` > - - Prochainement + En cours @@ -3539,7 +3539,7 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` ] } > - Atteindre 100% d’accessibilité de la version web sur les parcours clés + Atteindre 100% d’accessibilité de la version web sur les parcours clés + + diff --git a/src/features/profile/pages/Accessibility/AccessibilityActionPlan2025.tsx b/src/features/profile/pages/Accessibility/AccessibilityActionPlan2025.tsx new file mode 100644 index 00000000000..f21ce2e5eeb --- /dev/null +++ b/src/features/profile/pages/Accessibility/AccessibilityActionPlan2025.tsx @@ -0,0 +1,58 @@ +import React from 'react' + +import { + ActionPlanStatus, + ActionPlanTag, +} from 'features/profile/components/Buttons/ActionPlanTag/ActionPlanTag' +import { BulletListItem } from 'ui/components/BulletListItem' +import { VerticalUl } from 'ui/components/Ul' +import { Spacer, TypoDS } from 'ui/theme' +import { getHeadingAttrs } from 'ui/theme/typographyAttrs/getHeadingAttrs' + +export const AccessibilityActionPlan2025 = () => ( + + Plan annuel 2025 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +) From d317fb8c6fab453c7acae1585629a3a014993576 Mon Sep 17 00:00:00 2001 From: LucasBeneston Date: Fri, 10 Jan 2025 14:38:38 +0100 Subject: [PATCH 5/6] (PC-33786) feat(accessibility): use userEvent instead fireEvent in accessibility tests --- .../Accessibility.native.test.tsx | 9 ++-- .../AccessibilityActionPlan.native.test.tsx | 45 +++++++++++++------ .../AccessibilityDeclaration.native.test.tsx | 9 ++-- .../AccessibilityEngagement.native.test.tsx | 9 ++-- 4 files changed, 50 insertions(+), 22 deletions(-) diff --git a/src/features/profile/pages/Accessibility/Accessibility.native.test.tsx b/src/features/profile/pages/Accessibility/Accessibility.native.test.tsx index 427206f3614..ebb3046a304 100644 --- a/src/features/profile/pages/Accessibility/Accessibility.native.test.tsx +++ b/src/features/profile/pages/Accessibility/Accessibility.native.test.tsx @@ -2,7 +2,7 @@ import React from 'react' import { navigate } from '__mocks__/@react-navigation/native' import { Accessibility } from 'features/profile/pages/Accessibility/Accessibility' -import { render, fireEvent, screen } from 'tests/utils' +import { render, userEvent, screen } from 'tests/utils' jest.mock('libs/firebase/analytics/analytics') @@ -12,6 +12,9 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) +const user = userEvent.setup() +jest.useFakeTimers() + describe('Accessibility', () => { it('should render correctly', () => { render() @@ -25,11 +28,11 @@ describe('Accessibility', () => { ${'AccessibilityDeclaration'} | ${'Déclaration d’accessibilité'} ${'AccessibilityEngagement'} | ${'Les engagements du pass Culture'} ${'RecommendedPaths'} | ${'Parcours recommandés'} - `('should navigate to $route when $title is clicked', ({ route, title }) => { + `('should navigate to $route when $title is clicked', async ({ route, title }) => { render() const row = screen.getByText(title) - fireEvent.press(row) + await user.press(row) expect(navigate).toHaveBeenCalledWith(route, undefined) }) diff --git a/src/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx b/src/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx index 8a1cb808328..7fb82aa6349 100644 --- a/src/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx +++ b/src/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx @@ -1,8 +1,9 @@ import React from 'react' +import { ReactTestInstance } from 'react-test-renderer' import * as NavigationHelpers from 'features/navigation/helpers/openUrl' import { AccessibilityActionPlan } from 'features/profile/pages/Accessibility/AccessibilityActionPlan' -import { render, fireEvent, screen } from 'tests/utils' +import { render, userEvent, screen } from 'tests/utils' const openURLSpy = jest.spyOn(NavigationHelpers, 'openUrl') @@ -14,6 +15,9 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) +const user = userEvent.setup() +jest.useFakeTimers() + describe('AccessibilityActionPlan', () => { it('should render correctly', () => { render() @@ -21,18 +25,33 @@ describe('AccessibilityActionPlan', () => { expect(screen).toMatchSnapshot() }) - it.each(['https://pass.culture.fr/', 'https://passculture.app/', 'https://passculture.pro/'])( - 'should open $link when clicking help center link', - (link) => { - render() + it('should open https://pass.culture.fr/ when clicking on "https://pass.culture.fr/" link', async () => { + render() + + const links = screen.getAllByText('https://pass.culture.fr/') + // Using as because links is never undefined and the typing is not correct + await user.press(links[0] as ReactTestInstance) + + expect(openURLSpy).toHaveBeenCalledWith('https://pass.culture.fr/', undefined, true) + }) + + it('should open https://passculture.app/ when clicking on "https://passculture.app/" link', async () => { + render() - const linkComponents = screen.getAllByText(link) - linkComponents.forEach((link) => { - fireEvent.press(link) - }) + const links = screen.getAllByText('https://passculture.app/') + // Using as because links is never undefined and the typing is not correct + await user.press(links[0] as ReactTestInstance) - expect(openURLSpy).toHaveBeenCalledTimes(linkComponents.length) - expect(openURLSpy).toHaveBeenCalledWith(link, undefined, true) - } - ) + expect(openURLSpy).toHaveBeenCalledWith('https://passculture.app/', undefined, true) + }) + + it('should open https://passculture.pro/ when clicking on "https://passculture.pro/" link', async () => { + render() + + const links = screen.getAllByText('https://passculture.pro/') + // Using as because links is never undefined and the typing is not correct + await user.press(links[0] as ReactTestInstance) + + expect(openURLSpy).toHaveBeenCalledWith('https://passculture.pro/', undefined, true) + }) }) diff --git a/src/features/profile/pages/Accessibility/AccessibilityDeclaration.native.test.tsx b/src/features/profile/pages/Accessibility/AccessibilityDeclaration.native.test.tsx index 18d535b72b6..8c18d82a39a 100644 --- a/src/features/profile/pages/Accessibility/AccessibilityDeclaration.native.test.tsx +++ b/src/features/profile/pages/Accessibility/AccessibilityDeclaration.native.test.tsx @@ -3,7 +3,7 @@ import React from 'react' import * as NavigationHelpers from 'features/navigation/helpers/openUrl' import { AccessibilityDeclaration } from 'features/profile/pages/Accessibility/AccessibilityDeclaration' import { WEBAPP_V2_URL } from 'libs/environment' -import { render, fireEvent, screen } from 'tests/utils' +import { render, userEvent, screen } from 'tests/utils' const openURLSpy = jest.spyOn(NavigationHelpers, 'openUrl') @@ -15,6 +15,9 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) +const user = userEvent.setup() +jest.useFakeTimers() + describe('AccessibilityDeclaration', () => { it('should render correctly', () => { render() @@ -35,11 +38,11 @@ describe('AccessibilityDeclaration', () => { ${`${WEBAPP_V2_URL}/accessibilite/declaration`} | ${'Déclaration d’accessibilité'} ${'https://formulaire.defenseurdesdroits.fr/'} | ${'Défenseur des droits'} ${'https://www.defenseurdesdroits.fr/saisir/delegues'} | ${'Défenseur des droits dans votre région'} - `('should open $url when $title is clicked', ({ url, title }) => { + `('should open $url when $title is clicked', async ({ url, title }) => { render() const link = screen.getByTestId(title) - fireEvent.press(link) + await user.press(link) expect(openURLSpy).toHaveBeenCalledWith(url, undefined, true) }) diff --git a/src/features/profile/pages/Accessibility/AccessibilityEngagement.native.test.tsx b/src/features/profile/pages/Accessibility/AccessibilityEngagement.native.test.tsx index f9da44e1ce7..55642242e2d 100644 --- a/src/features/profile/pages/Accessibility/AccessibilityEngagement.native.test.tsx +++ b/src/features/profile/pages/Accessibility/AccessibilityEngagement.native.test.tsx @@ -3,7 +3,7 @@ import React from 'react' import * as NavigationHelpers from 'features/navigation/helpers/openUrl' import { AccessibilityEngagement } from 'features/profile/pages/Accessibility/AccessibilityEngagement' import { env } from 'libs/environment' -import { render, fireEvent, screen } from 'tests/utils' +import { render, userEvent, screen } from 'tests/utils' const openURLSpy = jest.spyOn(NavigationHelpers, 'openUrl') @@ -15,6 +15,9 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) +const user = userEvent.setup() +jest.useFakeTimers() + describe('AccessibilityEngagement', () => { it('should render correctly', () => { render() @@ -22,11 +25,11 @@ describe('AccessibilityEngagement', () => { expect(screen).toMatchSnapshot() }) - it('should open FAQ when clicking help center link', () => { + it('should open FAQ when clicking help center link', async () => { render() const button = screen.getByText('notre centre d’aide') - fireEvent.press(button) + await user.press(button) expect(openURLSpy).toHaveBeenCalledWith(env.FAQ_LINK, undefined, true) }) From 6d0d12cd1350b2d92b1a38696cf1fb31cb1c19de Mon Sep 17 00:00:00 2001 From: LucasBeneston Date: Fri, 10 Jan 2025 17:00:39 +0100 Subject: [PATCH 6/6] (PC-33786) feat(v2): change noMaxWidth > enableMaxWidth --- .../Achievements.native.test.tsx.native-snap | 2 +- .../ForgottenPassword.native.test.tsx.native-snap | 2 +- ...initializePassword.native.test.tsx.native-snap | 2 +- ...tPasswordEmailSent.native.test.tsx.native-snap | 2 +- .../pages/login/Login.native.test.tsx.native-snap | 2 +- ...ationEmailSentPage.native.test.tsx.native-snap | 2 +- .../FavoritesSorts.native.test.tsx.native-snap | 2 +- .../Accessibility.native.test.tsx.native-snap | 2 +- ...sibilityActionPlan.native.test.tsx.native-snap | 2 +- ...ibilityDeclaration.native.test.tsx.native-snap | 2 +- ...sibilityEngagement.native.test.tsx.native-snap | 2 +- .../RecommendedPaths.native.test.tsx.native-snap | 2 +- .../ChangeEmail.native.test.tsx.native-snap | 2 +- ...geEmailSetPassword.native.test.tsx.native-snap | 2 +- .../ChangePassword.native.test.tsx.native-snap | 2 +- .../ConsentSettings.native.test.tsx.native-snap | 2 +- .../LegalNotices.native.test.tsx.native-snap | 2 +- .../NewEmailSelection.native.test.tsx.native-snap | 2 +- ...ificationsSettings.native.test.tsx.native-snap | 4 ++-- .../PersonalData.native.test.tsx.native-snap | 2 +- .../SearchFilter.native.test.tsx.native-snap | 2 +- ...PageWithBlurHeader.native.test.tsx.native-snap | 2 +- .../profile/pages/Accessibility/Accessibility.tsx | 2 +- .../Accessibility/AccessibilityActionPlan.tsx | 2 +- .../Accessibility/AccessibilityDeclaration.tsx | 2 +- .../Accessibility/AccessibilityEngagement.tsx | 2 +- .../pages/Accessibility/RecommendedPaths.tsx | 2 +- src/ui/pages/SecondaryPageWithBlurHeader.tsx | 15 +++++++++------ 28 files changed, 37 insertions(+), 34 deletions(-) diff --git a/__snapshots__/features/achievements/pages/Achievements.native.test.tsx.native-snap b/__snapshots__/features/achievements/pages/Achievements.native.test.tsx.native-snap index 57b9ef7e891..7cbf756c7c1 100644 --- a/__snapshots__/features/achievements/pages/Achievements.native.test.tsx.native-snap +++ b/__snapshots__/features/achievements/pages/Achievements.native.test.tsx.native-snap @@ -167,7 +167,7 @@ exports[` should match snapshot 1`] = ` "width": "100%", } } - noMaxWidth={false} + enableMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/auth/pages/forgottenPassword/ForgottenPassword/ForgottenPassword.native.test.tsx.native-snap b/__snapshots__/features/auth/pages/forgottenPassword/ForgottenPassword/ForgottenPassword.native.test.tsx.native-snap index 474b7fecf4f..ab43d186861 100644 --- a/__snapshots__/features/auth/pages/forgottenPassword/ForgottenPassword/ForgottenPassword.native.test.tsx.native-snap +++ b/__snapshots__/features/auth/pages/forgottenPassword/ForgottenPassword/ForgottenPassword.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[` should match snapshot 1`] = ` "width": "100%", } } - noMaxWidth={false} + enableMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/auth/pages/forgottenPassword/ReinitializePassword/ReinitializePassword.native.test.tsx.native-snap b/__snapshots__/features/auth/pages/forgottenPassword/ReinitializePassword/ReinitializePassword.native.test.tsx.native-snap index 9b2b3e0e8e6..4843a6bfb5c 100644 --- a/__snapshots__/features/auth/pages/forgottenPassword/ReinitializePassword/ReinitializePassword.native.test.tsx.native-snap +++ b/__snapshots__/features/auth/pages/forgottenPassword/ReinitializePassword/ReinitializePassword.native.test.tsx.native-snap @@ -252,7 +252,7 @@ exports[`ReinitializePassword Page should match snapshot 1`] = ` "width": "100%", } } - noMaxWidth={false} + enableMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/auth/pages/forgottenPassword/ResetPasswordEmailSent/ResetPasswordEmailSent.native.test.tsx.native-snap b/__snapshots__/features/auth/pages/forgottenPassword/ResetPasswordEmailSent/ResetPasswordEmailSent.native.test.tsx.native-snap index 7a2d028c253..fbe3b70a6fa 100644 --- a/__snapshots__/features/auth/pages/forgottenPassword/ResetPasswordEmailSent/ResetPasswordEmailSent.native.test.tsx.native-snap +++ b/__snapshots__/features/auth/pages/forgottenPassword/ResetPasswordEmailSent/ResetPasswordEmailSent.native.test.tsx.native-snap @@ -180,7 +180,7 @@ exports[` should match snapshot 1`] = ` "width": "100%", } } - noMaxWidth={false} + enableMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/auth/pages/login/Login.native.test.tsx.native-snap b/__snapshots__/features/auth/pages/login/Login.native.test.tsx.native-snap index 5da8e6a4969..b4cdbe6bec5 100644 --- a/__snapshots__/features/auth/pages/login/Login.native.test.tsx.native-snap +++ b/__snapshots__/features/auth/pages/login/Login.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[` should render correctly when feature flag is enabled 1`] = ` "width": "100%", } } - noMaxWidth={false} + enableMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/auth/pages/signup/SignupConfirmationEmailSent/SignupConfirmationEmailSentPage.native.test.tsx.native-snap b/__snapshots__/features/auth/pages/signup/SignupConfirmationEmailSent/SignupConfirmationEmailSentPage.native.test.tsx.native-snap index 0d13ed54027..0000e76a277 100644 --- a/__snapshots__/features/auth/pages/signup/SignupConfirmationEmailSent/SignupConfirmationEmailSentPage.native.test.tsx.native-snap +++ b/__snapshots__/features/auth/pages/signup/SignupConfirmationEmailSent/SignupConfirmationEmailSentPage.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[` should render correctly 1`] = ` "width": "100%", } } - noMaxWidth={false} + enableMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/favorites/pages/FavoritesSorts.native.test.tsx.native-snap b/__snapshots__/features/favorites/pages/FavoritesSorts.native.test.tsx.native-snap index 6fa872b39c8..5b8e36109b5 100644 --- a/__snapshots__/features/favorites/pages/FavoritesSorts.native.test.tsx.native-snap +++ b/__snapshots__/features/favorites/pages/FavoritesSorts.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[` should render correctly 1`] = ` "width": "100%", } } - noMaxWidth={false} + enableMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/Accessibility/Accessibility.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/Accessibility/Accessibility.native.test.tsx.native-snap index 8c2483a9042..26e874cbc04 100644 --- a/__snapshots__/features/profile/pages/Accessibility/Accessibility.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/Accessibility/Accessibility.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[`Accessibility should render correctly 1`] = ` "width": "100%", } } - noMaxWidth={true} + enableMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap index 0fd294881f6..89bce7f2235 100644 --- a/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/Accessibility/AccessibilityActionPlan.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[`AccessibilityActionPlan should render correctly 1`] = ` "width": "100%", } } - noMaxWidth={true} + enableMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/Accessibility/AccessibilityDeclaration.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/Accessibility/AccessibilityDeclaration.native.test.tsx.native-snap index 937b913ade9..ad74b03988f 100644 --- a/__snapshots__/features/profile/pages/Accessibility/AccessibilityDeclaration.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/Accessibility/AccessibilityDeclaration.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[`AccessibilityDeclaration should render correctly 1`] = ` "width": "100%", } } - noMaxWidth={true} + enableMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/Accessibility/AccessibilityEngagement.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/Accessibility/AccessibilityEngagement.native.test.tsx.native-snap index 03318fbafee..922717d3a8e 100644 --- a/__snapshots__/features/profile/pages/Accessibility/AccessibilityEngagement.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/Accessibility/AccessibilityEngagement.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[`AccessibilityEngagement should render correctly 1`] = ` "width": "100%", } } - noMaxWidth={true} + enableMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/Accessibility/RecommendedPaths.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/Accessibility/RecommendedPaths.native.test.tsx.native-snap index 8c55612747c..1cdf6a94955 100644 --- a/__snapshots__/features/profile/pages/Accessibility/RecommendedPaths.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/Accessibility/RecommendedPaths.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[`RecommendedPaths should render correctly 1`] = ` "width": "100%", } } - noMaxWidth={true} + enableMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/ChangeEmail/ChangeEmail.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/ChangeEmail/ChangeEmail.native.test.tsx.native-snap index 353db3db8a6..ed5afb51366 100644 --- a/__snapshots__/features/profile/pages/ChangeEmail/ChangeEmail.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/ChangeEmail/ChangeEmail.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[` should render correctly 1`] = ` "width": "100%", } } - noMaxWidth={false} + enableMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/ChangeEmailSetPassword/ChangeEmailSetPassword.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/ChangeEmailSetPassword/ChangeEmailSetPassword.native.test.tsx.native-snap index 9c210d67769..6cfd4b10578 100644 --- a/__snapshots__/features/profile/pages/ChangeEmailSetPassword/ChangeEmailSetPassword.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/ChangeEmailSetPassword/ChangeEmailSetPassword.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[` should match snapshot 1`] = ` "width": "100%", } } - noMaxWidth={false} + enableMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/ChangePassword/ChangePassword.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/ChangePassword/ChangePassword.native.test.tsx.native-snap index ac1dfa4f728..338eec4c782 100644 --- a/__snapshots__/features/profile/pages/ChangePassword/ChangePassword.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/ChangePassword/ChangePassword.native.test.tsx.native-snap @@ -190,8 +190,8 @@ exports[`ChangePassword should render correctly 1`] = ` "width": "100%", } } + enableMaxWidth={true} keyboardShouldPersistTaps="handled" - noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/ConsentSettings/ConsentSettings.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/ConsentSettings/ConsentSettings.native.test.tsx.native-snap index e5205e03f31..65cb6680d41 100644 --- a/__snapshots__/features/profile/pages/ConsentSettings/ConsentSettings.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/ConsentSettings/ConsentSettings.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[` should render correctly 1`] = ` "width": "100%", } } - noMaxWidth={false} + enableMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/LegalNotices/LegalNotices.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/LegalNotices/LegalNotices.native.test.tsx.native-snap index e2396aa7951..d93e1ae7abb 100644 --- a/__snapshots__/features/profile/pages/LegalNotices/LegalNotices.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/LegalNotices/LegalNotices.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[`LegalNotices should render correctly 1`] = ` "width": "100%", } } - noMaxWidth={false} + enableMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/NewEmailSelection/NewEmailSelection.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/NewEmailSelection/NewEmailSelection.native.test.tsx.native-snap index 194ee28351e..efc9facd7c4 100644 --- a/__snapshots__/features/profile/pages/NewEmailSelection/NewEmailSelection.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/NewEmailSelection/NewEmailSelection.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[` should match snapshot 1`] = ` "width": "100%", } } - noMaxWidth={false} + enableMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/NotificationSettings/NotificationsSettings.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/NotificationSettings/NotificationsSettings.native.test.tsx.native-snap index d212c55450a..50d535178a7 100644 --- a/__snapshots__/features/profile/pages/NotificationSettings/NotificationsSettings.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/NotificationSettings/NotificationsSettings.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[`NotificationsSettings should render correctly when user is logged in 1` "width": "100%", } } - noMaxWidth={false} + enableMaxWidth={true} scrollEnabled={true} style={ [ @@ -2575,7 +2575,7 @@ exports[`NotificationsSettings should render correctly when user is not logged i "width": "100%", } } - noMaxWidth={false} + enableMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/profile/pages/PersonalData/PersonalData.native.test.tsx.native-snap b/__snapshots__/features/profile/pages/PersonalData/PersonalData.native.test.tsx.native-snap index 038811079ad..88d0cf304cb 100644 --- a/__snapshots__/features/profile/pages/PersonalData/PersonalData.native.test.tsx.native-snap +++ b/__snapshots__/features/profile/pages/PersonalData/PersonalData.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[`PersonalData should render personal data success 1`] = ` "width": "100%", } } - noMaxWidth={false} + enableMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/__snapshots__/features/search/pages/SearchFilter/SearchFilter.native.test.tsx.native-snap b/__snapshots__/features/search/pages/SearchFilter/SearchFilter.native.test.tsx.native-snap index 6670e10b831..662658996de 100644 --- a/__snapshots__/features/search/pages/SearchFilter/SearchFilter.native.test.tsx.native-snap +++ b/__snapshots__/features/search/pages/SearchFilter/SearchFilter.native.test.tsx.native-snap @@ -198,8 +198,8 @@ exports[` should render correctly 1`] = ` "width": "100%", } } + enableMaxWidth={true} keyboardShouldPersistTaps="always" - noMaxWidth={false} scrollEnabled={true} style={ [ diff --git a/__snapshots__/ui/pages/SecondaryPageWithBlurHeader.native.test.tsx.native-snap b/__snapshots__/ui/pages/SecondaryPageWithBlurHeader.native.test.tsx.native-snap index ff7b60737be..40b628eecd5 100644 --- a/__snapshots__/ui/pages/SecondaryPageWithBlurHeader.native.test.tsx.native-snap +++ b/__snapshots__/ui/pages/SecondaryPageWithBlurHeader.native.test.tsx.native-snap @@ -190,7 +190,7 @@ exports[` should render correctly 1`] = ` "width": "100%", } } - noMaxWidth={false} + enableMaxWidth={true} scrollEnabled={true} style={ [ diff --git a/src/features/profile/pages/Accessibility/Accessibility.tsx b/src/features/profile/pages/Accessibility/Accessibility.tsx index bc8aed8cf83..57311032a79 100644 --- a/src/features/profile/pages/Accessibility/Accessibility.tsx +++ b/src/features/profile/pages/Accessibility/Accessibility.tsx @@ -42,7 +42,7 @@ const sections = [ export function Accessibility() { return ( - + } /> ) diff --git a/src/features/profile/pages/Accessibility/AccessibilityActionPlan.tsx b/src/features/profile/pages/Accessibility/AccessibilityActionPlan.tsx index fef778b808e..879ac22df7e 100644 --- a/src/features/profile/pages/Accessibility/AccessibilityActionPlan.tsx +++ b/src/features/profile/pages/Accessibility/AccessibilityActionPlan.tsx @@ -19,7 +19,7 @@ import { getHeadingAttrs } from 'ui/theme/typographyAttrs/getHeadingAttrs' export function AccessibilityActionPlan() { return ( - + Schéma pluriannuel d’accessibilité 2022 - 2024 diff --git a/src/features/profile/pages/Accessibility/AccessibilityDeclaration.tsx b/src/features/profile/pages/Accessibility/AccessibilityDeclaration.tsx index 675a361972d..c2e3f422cf1 100644 --- a/src/features/profile/pages/Accessibility/AccessibilityDeclaration.tsx +++ b/src/features/profile/pages/Accessibility/AccessibilityDeclaration.tsx @@ -35,7 +35,7 @@ const rightsDelegateUrl = { url: 'https://www.defenseurdesdroits.fr/saisir/deleg export function AccessibilityDeclaration() { return ( - + Le pass Culture s’engage à rendre son site internet accessible conformément à l’article 47 de la loi n° 2005-102 du 11 février 2005. À cette fin, il met en œuvre la stratégie et les diff --git a/src/features/profile/pages/Accessibility/AccessibilityEngagement.tsx b/src/features/profile/pages/Accessibility/AccessibilityEngagement.tsx index ab640e8b342..526d08da2c9 100644 --- a/src/features/profile/pages/Accessibility/AccessibilityEngagement.tsx +++ b/src/features/profile/pages/Accessibility/AccessibilityEngagement.tsx @@ -13,7 +13,7 @@ import { getHeadingAttrs } from 'ui/theme/typographyAttrs/getHeadingAttrs' export function AccessibilityEngagement() { return ( - + Date de publication : 19 mai 2022 diff --git a/src/features/profile/pages/Accessibility/RecommendedPaths.tsx b/src/features/profile/pages/Accessibility/RecommendedPaths.tsx index 0b1cb6206c6..f9be272effe 100644 --- a/src/features/profile/pages/Accessibility/RecommendedPaths.tsx +++ b/src/features/profile/pages/Accessibility/RecommendedPaths.tsx @@ -11,7 +11,7 @@ import { DOUBLE_LINE_BREAK, LINE_BREAK } from 'ui/theme/constants' export function RecommendedPaths() { return ( - + En complément de la mise en conformité du pass Culture au regard des critères du RGAA qui reste partielle, les équipes du pass Culture se sont attachées à travailler des parcours diff --git a/src/ui/pages/SecondaryPageWithBlurHeader.tsx b/src/ui/pages/SecondaryPageWithBlurHeader.tsx index e0d8462a3fc..f4adc05d7ad 100644 --- a/src/ui/pages/SecondaryPageWithBlurHeader.tsx +++ b/src/ui/pages/SecondaryPageWithBlurHeader.tsx @@ -15,7 +15,7 @@ type Props = PropsWithChildren<{ RightButton?: ReactNode scrollable?: boolean scrollViewProps?: Omit - noMaxWidth?: boolean + enableMaxWidth?: boolean }> export const SecondaryPageWithBlurHeader = ({ @@ -26,7 +26,7 @@ export const SecondaryPageWithBlurHeader = ({ children, scrollable = true, scrollViewProps = {}, - noMaxWidth = false, + enableMaxWidth = true, }: Props) => { const headerHeight = useGetHeaderHeight() @@ -38,7 +38,10 @@ export const SecondaryPageWithBlurHeader = ({ onGoBack={onGoBack} RightButton={RightButton} /> - + {children} @@ -48,14 +51,14 @@ export const SecondaryPageWithBlurHeader = ({ } interface StyledScrollViewProps { - noMaxWidth: boolean + enableMaxWidth: boolean } const StyledScrollView = styled.ScrollView.attrs( - ({ theme, noMaxWidth }) => ({ + ({ theme, enableMaxWidth }) => ({ contentContainerStyle: { paddingHorizontal: theme.contentPage.marginHorizontal, paddingVertical: theme.contentPage.marginVertical, - maxWidth: noMaxWidth ? '100%' : theme.contentPage.maxWidth, + maxWidth: enableMaxWidth ? theme.contentPage.maxWidth : '100%', width: '100%', alignSelf: 'center', },