Skip to content

Commit

Permalink
chore(IT Wallet): [SIW-1869] Add fiscal code full screen modal (#6456)
Browse files Browse the repository at this point in the history
## Short description
This PR adds a feature that allows users to view their fiscal code in a
full-screen modal. Users can access it by tapping the fiscal code on the
TS credential details screen.

## List of changes proposed in this pull request
- Updated `react-native-screen-brightness` package patch removing
unnecessary changes
- Updated locales
- Added `given_name` and `family_name` ids to the `WellKnowClaim`
enumerator
- Added `extractClaim` utility function, which takes a claim id and an
optional decoder, and returns a function which takes a
`ParsedCredential` and tries to extract a claim value from it. Very
useful when used in `fp-ts` contexts.
- Added `getFirstNameFromCredential` and `getFamilyNameFromCredential`
functions
- Added `selectNameSurnameFromEid` selector, which extracts (if
available) name and surname from the stored eID
- Updated `ItwPresentationFiscalCode` look and feel with a `Pressable`,
including all the style and animations of a `Button`
- Added `ItwPresentationCredentialFiscalCodeModal` screen
- Fixed an issue with `useMaxBrightness` hook on Android, which was
causing unwanted flashes during a brightness transition

## How to test
To test this PR you need to have an active and valid Wallet instance on
your device and aTS credential.
1. Navigate to the TS details screen and verify that the Fiscal Code
button is correctly displayed.
2. Tap on the Fiscal code button and verify that the fiscal code is
correctly shown in a full screen modal.
3. Verify that the screen brightness is smoothly increased to the
maximum when entering the full screen modal and then reverted back to
the initial value when exiting. On Android, try different starting
brightness levels and check that the transition is still working.

## Preview

| iOS | Android |
| --- | --- |
| <video
src="https://github.com/user-attachments/assets/f1a0bb69-07a4-4b3e-8749-8651978265ef"
/> | <video
src="https://github.com/user-attachments/assets/2548e485-6a21-47db-9723-1613268c9304"
/> |
  • Loading branch information
mastro993 authored Nov 26, 2024
1 parent 785882d commit 3293ed3
Show file tree
Hide file tree
Showing 11 changed files with 450 additions and 3,593 deletions.
5 changes: 3 additions & 2 deletions locales/en/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3534,8 +3534,9 @@ features:
true:
false: No
hiddenClaim: "Hidden"
fiscalCode: Fiscal code
fiscalCodeBarcode: Barcode of your fiscal code
fiscalCode:
label: Your Fiscal Code
action: Press to enlarge and display the barcode on the entire screen
status:
valid: Valid
invalid: Not valid
Expand Down
6 changes: 3 additions & 3 deletions locales/it/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,6 @@ wallet:
title: Non abbiamo trovato alcun BANCOMAT Pay attivo
subtitle: "Contatta la tua Banca per attivare il servizio."
primaryAction: Chiudi

alert:
supportedCardPageLinkError: Si è verificato un errore durante l'apertura della pagina di riferimento per le carte supportate.
msgErrorUpdateApp: "Si è verificato un errore durante l'apertura dello store delle app"
Expand Down Expand Up @@ -3535,8 +3534,9 @@ features:
true:
false: No
hiddenClaim: "Nascosto"
fiscalCode: Il tuo Codice Fiscale
fiscalCodeBarcode: Codice a barre del tuo Codice Fiscale
fiscalCode:
label: Il tuo Codice Fiscale
action: Premi per ingrandire e visualizzare il codice a barre a tutto schermo
status:
valid: Valida
invalid: Non valida
Expand Down
Loading

0 comments on commit 3293ed3

Please sign in to comment.