Skip to content

Commit

Permalink
Merge branch 'IOBP-797-hide-total-label-when-not-provided' of https:/…
Browse files Browse the repository at this point in the history
…/github.com/pagopa/io-app into IOBP-797-hide-total-label-when-not-provided
  • Loading branch information
Hantex9 committed Aug 2, 2024
2 parents 343ee9f + 12677b2 commit f12daff
Show file tree
Hide file tree
Showing 40 changed files with 914 additions and 351 deletions.
1 change: 0 additions & 1 deletion locales/de/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@ profile:
description: "Deine Rechte und Pflichten bei der Nutzung der IO-App"
loading: "Warte ein paar Sekunden, wir überprüfen dein Profil..."
removeAccount:
title: "Dein Konto löschen"
error: "Bei der Anfrage zur Kontolöschung ist ein Fehler aufgetreten. Bitte versuche es erneut."
alert:
cta:
Expand Down
2 changes: 2 additions & 0 deletions locales/en/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1788,10 +1788,12 @@ wallet:
noticeNumber:
title: Inserisci il codice avviso
subtitle: Ha 18 cifre, lo trovi vicino al codice QR.
validationError: It has 18 digits, starts with 0, 1 or 3.
placeholder: Codice avviso
fiscalCode:
title: Inserisci il codice fiscale dell’Ente Creditore
subtitle: Ha 11 cifre, lo trovi vicino al codice QR.
validationError: Enter 11 digits.
placeholder: Codice fiscale Ente Creditore
abortDialog:
title: Vuoi interrompere l'operazione?
Expand Down
4 changes: 3 additions & 1 deletion locales/it/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ profile:
subtitle: Qui trovi informazioni sui tuoi diritti e obblighi e sul trattamento dei dati personali.
loading: Attendi qualche secondo, stiamo verificando il tuo profilo...
removeAccount:
title: Elimina il tuo account
title: Elimina il tuo profilo
description: Elimina il tuo profilo e i tuoi dati personali
error: Si è verificato un errore nella richiesta di rimozione dell'account, riprova.
alert:
Expand Down Expand Up @@ -1788,10 +1788,12 @@ wallet:
noticeNumber:
title: Inserisci il codice avviso
subtitle: Ha 18 cifre, lo trovi vicino al codice QR.
validationError: Ha 18 cifre, inizia con 0, 1 o 3.
placeholder: Codice avviso
fiscalCode:
title: Inserisci il codice fiscale dell’Ente Creditore
subtitle: Ha 11 cifre, lo trovi vicino al codice QR.
validationError: Inserisci 11 cifre.
placeholder: Codice fiscale Ente Creditore
abortDialog:
title: Vuoi interrompere l'operazione?
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"dependencies": {
"@babel/plugin-transform-regenerator": "^7.18.6",
"@gorhom/bottom-sheet": "^4.1.5",
"@pagopa/io-app-design-system": "1.40.1",
"@pagopa/io-app-design-system": "1.43.0",
"@pagopa/io-pagopa-commons": "^3.1.0",
"@pagopa/io-react-native-crypto": "^0.3.0",
"@pagopa/io-react-native-http-client": "1.0.5",
Expand Down
2 changes: 1 addition & 1 deletion ts/components/screens/__tests__/WizardScreen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { WizardScreen, WizardScreenProps } from "../WizardScreen";
const defaultProps: WizardScreenProps = {
title: "This is a title",
description: "This is a description",
pictogram: "abacus",
pictogram: "success",
primaryButton: {
label: "primaryButton",
accessibilityLabel: "accessible primaryButton",
Expand Down
2 changes: 1 addition & 1 deletion ts/features/design-system/core/DSBadges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const renderTag = () => (
</VStack>
</DSComponentViewerBox>
<DSComponentViewerBox name={"Tag · With icon, no text"}>
<Tag variant="attachment" />
<Tag variant="attachment" iconAccessibilityLabel="Allegati" />
</DSComponentViewerBox>
<DSComponentViewerBox name={"Tag · Without icon"}>
<Tag text={"No icon"} variant="noIcon" />
Expand Down
91 changes: 11 additions & 80 deletions ts/features/design-system/core/DSListItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,48 +118,33 @@ export const DSListItems = () => {
const renderListItemNav = () => (
<VStack space={componentMargin}>
<DSComponentViewerBox name="ListItemNav">
<ListItemNav
value={"Value"}
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
<ListItemNav value={"Value"} onPress={onButtonPress} />
<Divider />
<ListItemNav
value={"Value"}
description="Description"
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
<Divider />
<ListItemNav
value="A looong looooong looooooooong looooooooooong title"
description="Description"
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
<Divider />
<ListItemNav
value={"Value"}
icon="gallery"
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
<ListItemNav value={"Value"} icon="gallery" onPress={onButtonPress} />
<Divider />
<ListItemNav
value={"Value"}
description="Description"
icon="gallery"
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
<Divider />
<ListItemNav
value={"Value"}
description="This is a list item nav with badge"
onPress={() => {
alert("Action triggered");
}}
accessibilityLabel="Empty just for testing purposes"
onPress={onButtonPress}
topElement={{
badgeProps: {
text: "Novità",
Expand All @@ -172,20 +157,14 @@ const renderListItemNav = () => (
<ListItemNav
value={"Value"}
description="This is a list item nav without chevron icon"
onPress={() => {
alert("Action triggered");
}}
accessibilityLabel="Empty just for testing purposes"
onPress={onButtonPress}
hideChevron
/>
<Divider />
<ListItemNav
value={"Value"}
description="This is a list item nav with badge without chevron"
onPress={() => {
alert("Action triggered");
}}
accessibilityLabel="Empty just for testing purposes"
onPress={onButtonPress}
topElement={{
badgeProps: {
text: "Novità",
Expand All @@ -196,32 +175,21 @@ const renderListItemNav = () => (
/>
</DSComponentViewerBox>
<DSComponentViewerBox name="ListItemNavAlert">
<ListItemNavAlert
value={"Value"}
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
<ListItemNavAlert value={"Value"} onPress={onButtonPress} />
<Divider />
<ListItemNavAlert
value={"Value"}
description="Description"
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
<Divider />
<ListItemNavAlert
withoutIcon
value={"Value"}
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
<ListItemNavAlert withoutIcon value={"Value"} onPress={onButtonPress} />
<Divider />
<ListItemNavAlert
withoutIcon
value={"Value"}
description="Description"
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
</DSComponentViewerBox>
</VStack>
Expand All @@ -233,30 +201,26 @@ const renderListItemInfoCopy = () => (
label={"Label"}
value="Value"
onPress={onCopyButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
<Divider />
<ListItemInfoCopy
label={"Codice fiscale"}
value="01199250158"
onPress={onCopyButtonPress}
accessibilityLabel="Empty just for testing purposes"
icon="institution"
/>
<Divider />
<ListItemInfoCopy
label={"Carta di credito"}
value="4975 3013 5042 7899"
onPress={onCopyButtonPress}
accessibilityLabel="Empty just for testing purposes"
icon="creditCard"
/>
<Divider />
<ListItemInfoCopy
label={"Indirizzo"}
value={`P.za Colonna, 370\n00186 Roma (RM)`}
onPress={onCopyButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
</DSComponentViewerBox>
);
Expand All @@ -268,81 +232,67 @@ const renderListItemAction = () => (
variant="primary"
label={"Link interno oppure link ad una pagina esterna"}
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
<ListItemAction
variant="primary"
icon="website"
label={"Link interno oppure link ad una pagina esterna"}
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
<ListItemAction
variant="primary"
icon="device"
label={"Scarica l'app"}
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
<ListItemAction
variant="primary"
icon="security"
label={"Informativa sulla privacy"}
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
<ListItemAction
variant="primary"
icon="chat"
label={"Richiedi assistenza"}
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
</DSComponentViewerBox>
<DSComponentViewerBox name="ListItemAction · Danger variant">
<ListItemAction
variant="danger"
label={"Danger action"}
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
<ListItemAction
variant="danger"
icon="trashcan"
label={"Elimina"}
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
<ListItemAction
variant="danger"
icon="logout"
label={"Esci da IO"}
onPress={onButtonPress}
accessibilityLabel="Empty just for testing purposes"
/>
</DSComponentViewerBox>
</VStack>
);

const renderListItemInfo = () => (
<DSComponentViewerBox name="ListItemInfo">
<ListItemInfo
label="Label"
value={"Value"}
accessibilityLabel="Empty just for testing purposes"
/>
<ListItemInfo label="Label" value={"Value"} />
<Divider />
<ListItemInfo
label="Label"
value="A looong looooong looooooooong looooooooooong title"
accessibilityLabel="Empty just for testing purposes"
/>
<Divider />
<ListItemInfo
icon="creditCard"
label="Label"
value="A looong looooong looooooooong looooooooooong title"
accessibilityLabel="Empty just for testing purposes"
endElement={{
type: "buttonLink",
componentProps: {
Expand All @@ -357,7 +307,6 @@ const renderListItemInfo = () => (
icon="psp"
label="Label"
value="A looong looooong looooooooong looooooooooong title"
accessibilityLabel="Empty just for testing purposes"
endElement={{
type: "iconButton",
componentProps: {
Expand All @@ -372,7 +321,6 @@ const renderListItemInfo = () => (
icon="psp"
label="Label"
value="A looong looooong looooooooong looooooooooong title"
accessibilityLabel="Empty just for testing purposes"
endElement={{
type: "badge",
componentProps: {
Expand All @@ -382,12 +330,7 @@ const renderListItemInfo = () => (
}}
/>
<Divider />
<ListItemInfo
label="Label"
value={"Value"}
icon="gallery"
accessibilityLabel="Empty just for testing purposes"
/>
<ListItemInfo label="Label" value={"Value"} icon="gallery" />
</DSComponentViewerBox>
);

Expand All @@ -396,13 +339,9 @@ const renderListItemInfo = () => (
const renderListItemHeader = () => (
<VStack space={componentMargin}>
<DSComponentViewerBox name="ListItemHeader, without icon">
<ListItemHeader label="Label" />
<ListItemHeader
label="Label"
accessibilityLabel="Empty just for testing purposes"
/>
<ListItemHeader
label="Label"
accessibilityLabel="Empty just for testing purposes"
endElement={{
type: "buttonLink",
componentProps: {
Expand All @@ -414,7 +353,6 @@ const renderListItemHeader = () => (
/>
<ListItemHeader
label="Label"
accessibilityLabel="Empty just for testing purposes"
endElement={{
type: "iconButton",
componentProps: {
Expand All @@ -426,15 +364,10 @@ const renderListItemHeader = () => (
/>
</DSComponentViewerBox>
<DSComponentViewerBox name="ListItemHeader, with icon">
<ListItemHeader
label="Label"
iconName="gallery"
accessibilityLabel="Empty just for testing purposes"
/>
<ListItemHeader label="Label" iconName="gallery" />
<ListItemHeader
iconName="creditCard"
label="Label"
accessibilityLabel="Empty just for testing purposes"
endElement={{
type: "buttonLink",
componentProps: {
Expand All @@ -447,7 +380,6 @@ const renderListItemHeader = () => (
<ListItemHeader
iconName="psp"
label="Label"
accessibilityLabel="Empty just for testing purposes"
endElement={{
type: "iconButton",
componentProps: {
Expand All @@ -461,7 +393,6 @@ const renderListItemHeader = () => (
<ListItemHeader
iconName="psp"
label="Label"
accessibilityLabel="Empty just for testing purposes"
endElement={{
type: "badge",
componentProps: {
Expand Down
5 changes: 3 additions & 2 deletions ts/features/design-system/core/DSTextFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,16 @@ const InputComponentWrapper = (
const InputValidationComponentWrapper = (
props: Omit<
React.ComponentProps<typeof TextInputValidation>,
"value" | "onChangeText"
> & { value?: string }
"value" | "onChangeText" | "errorMessage"
> & { value?: string; errorMessage?: string }
) => {
const [inputValue, setInputValue] = React.useState(props.value ?? "");

return (
<TextInputValidation
{...props}
value={inputValue}
errorMessage={props.errorMessage ?? "error"}
onChangeText={setInputValue}
/>
);
Expand Down
Loading

0 comments on commit f12daff

Please sign in to comment.