Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(IT Wallet): [SIW-740] Refactor claims list #5321

Merged
merged 21 commits into from
Dec 18, 2023

Conversation

LazyAfternoons
Copy link
Contributor

@LazyAfternoons LazyAfternoons commented Dec 11, 2023

Short description

Depends on #5310, #5315 and #5321.

This PR introduces a refactors in how we render the claims list. The general idea behind this refactor is that we are parsing the unknown value of a claim with io-ts decoders to known which kind of claim we are manipulating, thus rendering an appropriate component to display it.

List of changes proposed in this pull request

  • Defines a set of decoders for our claims;
  • Adds a itwCredentialClaim.tsx which decodes the claim and renders the appropriate component;
  • Align ItwCredentialClaimsList.tsx to the new changes;
  • Moves every claim related util to ItwClaimsUtils.

How to test

Test the available credentials, each claim should be render properly formatted.

@LazyAfternoons LazyAfternoons changed the base branch from master to bundle/it-wallet December 11, 2023 11:48
@pagopa-github-bot pagopa-github-bot changed the title [SIW-740] Refactor claims list chore(IT Wallet): [SIW-740] Refactor claims list Dec 12, 2023
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Dec 12, 2023

Affected stories

  • ⚙️ SIW-740: [APP] Refactor componente ItwCredentialClaimsList

Generated by 🚫 dangerJS against f6ee544

Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Merging #5321 (f6ee544) into bundle/it-wallet (15b6a49) will decrease coverage by 0.01%.
Report is 6 commits behind head on bundle/it-wallet.
The diff coverage is 27.63%.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##           bundle/it-wallet    #5321      +/-   ##
====================================================
- Coverage             46.36%   46.36%   -0.01%     
====================================================
  Files                  1637     1638       +1     
  Lines                 33976    34010      +34     
  Branches               8237     8245       +8     
====================================================
+ Hits                  15754    15769      +15     
- Misses                18171    18190      +19     
  Partials                 51       51              
Files Coverage Δ
.../it-wallet/store/reducers/itwCredentialsReducer.ts 34.61% <ø> (ø)
ts/features/it-wallet/saga/new/itwIssuanceSaga.ts 0.00% <0.00%> (ø)
...it-wallet/screens/presentation/ItwPrPidDetails.tsx 4.76% <0.00%> (ø)
ts/features/it-wallet/utils/itwClaimsUtils.ts 91.66% <91.66%> (ø)
ts/features/it-wallet/utils/pid.ts 26.66% <0.00%> (ø)
...eatures/it-wallet/components/ItwCredentialCard.tsx 35.48% <0.00%> (ø)
ts/features/it-wallet/utils/mocks.ts 37.50% <0.00%> (-5.36%) ⬇️
...s/it-wallet/components/ItwCredentialClaimsList.tsx 11.53% <13.33%> (+1.01%) ⬆️
...atures/it-wallet/components/ItwCredentialClaim.tsx 20.00% <20.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 84e55db...f6ee544. Read the comment docs.

LazyAfternoons added a commit that referenced this pull request Dec 14, 2023
## Short description
This PR introduces the health card issuance issuance.

Note: there's an issue with the place of birth claim which is going to
addressed in a separate issue
([SIW-681](https://pagopa.atlassian.net/jira/software/projects/SIW/boards/222?selectedIssue=SIW-740)).
Since the component which renders the claims list needs a substantial
refactor I decided to leave it out of the scope of this PR. See #5321.

## List of changes proposed in this pull request
- Updates the mock data required to obtain a display the credential;
- Rename the card front asset according to the name of the credential.

## How to test
With an valid wallet test the health card issuance flow.


[SIW-681]:
https://pagopa.atlassian.net/browse/SIW-681?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
LazyAfternoons added a commit that referenced this pull request Dec 14, 2023
## Short description
This PR adds the mobile driving license issuing. 
Some claims might not be rendered properly. Since the component which
renders the claims list needs a substantial refactor I decided to leave
it out of the scope of this PR.
See #5321.

## List of changes proposed in this pull request
- Updates the mock data required to obtain and display the credential.

## How to test
Test the mDL issuing flow.
Copy link

dpulls bot commented Dec 18, 2023

🎉 All dependencies have been resolved !

Copy link
Contributor

@hevelius hevelius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. It works as expected.

@hevelius hevelius merged commit e207bff into bundle/it-wallet Dec 18, 2023
6 checks passed
@hevelius hevelius deleted the SIW-740-refactor-claims-list branch December 18, 2023 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants