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

[IOBP-563, IOBP-612] Add empty states and navigation events to PaymentsHomeScreen #5663

Merged
merged 62 commits into from
Apr 12, 2024

Conversation

mastro993
Copy link
Contributor

@mastro993 mastro993 commented Apr 3, 2024

Warning

This PR depends on #5659

Short description

This PR introduces empty states and navigation events within the new payments landing screen

List of changes proposed in this pull request

  • Simplified PaymentCardSmall and PaymentCardCarousel components
  • Added empty states to PaymentHomeScreen
  • Added store reducer, actions and migration to manage empty methods banner visibility persistence
  • Added navigation events to PaymentHomeScreen components
  • Added unit tests
  • Added missing locale keys
  • Added payload to paymentsDeleteMethodAction.success in order to remove the wallet from the list once deleted successfully

How to test

Static check should solve correctly.
With the io-dev-api-server, enable te New wallet section from the Profile screen.
Try to simulate different states by mocking api-server responses (GET /ecommerce/wallets and GET /wallet/v1/transactions). Check that the screen is rendered like in the previews below.

Preview

w/o payment methods w/ payment methods
w/o transactions
w/ transactions

@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Apr 3, 2024

Warnings
⚠️ Please include a Jira ticket at the beginning of the PR title

Example of PR titles that include Jira tickets:

  • single story: [PROJID-123] my PR title
  • multiple stories: [PROJID-1,PROJID-2,PROJID-3] my PR title

Generated by 🚫 dangerJS against 7fd0298

@mastro993 mastro993 added the IO-Bonus e pagamenti IO - Bonus e pagamenti label Apr 3, 2024
@mastro993 mastro993 marked this pull request as ready for review April 3, 2024 16:38
@mastro993 mastro993 requested review from dmnplb, a team and thisisjp as code owners April 3, 2024 16:38
…g-screen' into IOBP-563-add-payments-screen-empty-states
Copy link

dpulls bot commented Apr 11, 2024

🎉 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. Tested on iOS simulator. All cases works as expected.

@mastro993 mastro993 merged commit fbe4f88 into master Apr 12, 2024
11 checks passed
@mastro993 mastro993 deleted the IOBP-563-add-payments-screen-empty-states branch April 12, 2024 09:29
CrisTofani pushed a commit that referenced this pull request Apr 12, 2024
…ntsHomeScreen` (#5663)

> [!WARNING]
> This PR depends on #5659

This PR introduces empty states and navigation events within the new
payments landing screen

- Simplified `PaymentCardSmall` and `PaymentCardCarousel` components
- Added empty states to `PaymentHomeScreen`
- Added store reducer, actions and migration to manage empty methods
banner visibility persistence
- Added navigation events to `PaymentHomeScreen` components
- Added unit tests
- Added missing locale keys
- Added payload to `paymentsDeleteMethodAction.success` in order to
remove the wallet from the list once deleted successfully

Static check should solve correctly.
With the `io-dev-api-server`, enable te **New wallet section** from the
**Profile** screen.
Try to simulate different states by mocking api-server responses (`GET
/ecommerce/wallets` and `GET /wallet/v1/transactions`). Check that the
screen is rendered like in the previews below.

| | **w/o payment methods** | **w/ payment methods** |

|----------------------|--------------------------|-------------------------|
| **w/o transactions** | <img
src="https://github.com/pagopa/io-app/assets/6160324/58057e3e-ef51-4f02-bc3a-4bbbf24cc199"
width="150" /> | <img
src="https://github.com/pagopa/io-app/assets/6160324/afd1c408-5d9a-48a6-a13e-e5967e2817a2"
width="150" /> |
| **w/ transactions** | <img
src="https://github.com/pagopa/io-app/assets/6160324/b4c5e6b8-3b7e-42fc-b6a5-03f8a907616d"
width="150" /> | <img
src="https://github.com/pagopa/io-app/assets/6160324/9881b73f-a7b2-415c-b3ca-512ee80a3ab0"
width="150" /> |

---------

Co-authored-by: Martino Cesari Tomba <60693085+forrest57@users.noreply.github.com>
Co-authored-by: Mario Perrotta <mario.perrotta@pagopa.it>
dhinterlechner added a commit to dhinterlechner/io-app that referenced this pull request Apr 14, 2024
mastro993 added a commit that referenced this pull request Apr 15, 2024
> [!WARNING]
> This PR depends on #5663,
pagopa/io-dev-api-server#361

## Short description
This PR adds the error state to payment cards which are expired.

## List of changes proposed in this pull request
- Removed `isError` from `PaymentCardSmallProps`, which is now based on
payment expiry date.

## How to test
With the` io-dev-api-server`, checkout this PR
pagopa/io-dev-api-server#361, enable the **New
wallet section** FF from the profile screen in the IO app.
Check that in the payments landing screen you can see an error card.

## Preview

<img
src="https://github.com/pagopa/io-app/assets/6160324/4888a16a-1ce5-4b83-a440-41f73908c593"
width="250" />

---------

Co-authored-by: Martino Cesari Tomba <60693085+forrest57@users.noreply.github.com>
Co-authored-by: Mario Perrotta <mario.perrotta@pagopa.it>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO-Bonus e pagamenti IO - Bonus e pagamenti
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants