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

[#172992641] Check bonus eligibility #1841

Merged
merged 7 commits into from
May 26, 2020

Conversation

fabriziofff
Copy link
Contributor

@fabriziofff fabriziofff commented May 25, 2020

Short description:
This pr adds the screen for the "check bonus eligibility" phase.
This screen have a loading state, displaying the loading view in table below, and an error view, displaying a message explaining the reasons of the error and two button to cancel o retry.

Loading Error

List of changes proposed in this pull request:

  • ts/features/bonusVacanze/components/GenericLoadingErrorScreen.tsx a generic screen that implements the logic required by this screen, without being tied to the application flow of redux.
  • ts/features/bonusVacanze/screens/CheckBonusEligibilityScreen.tsx a specific screen that tie the generic component with the business logic of the application. At the moment, placeholders are provided instead of concrete actions and reducers.

How to test:
In order to test this dummy component, I've just replaced one existing with this one (for example in MessagesNavigator.ts replace screen: MessageHomeScreen with screen: CheckBonusEligibilityScreen).

@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented May 25, 2020

Affected stories

  • 🌟 #172992641: Come CIT quando faccio richiesta per la verifica di idoneità al bonus voglio vedere una schermata di loading

Generated by 🚫 dangerJS

locales/it/index.yml Outdated Show resolved Hide resolved
// TODO: link with the right reducer
isLoading: true,
// TODO: link with the right reducer
errorText: "A text that explains why the operation failed"
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess the error could be a network error, otherwise we should receive a response from our backend.
Could it be a solution to show an error toast informing the user that something went wrong?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we want to have a generic error, I can remove the errorText and use the default message used within the GenericErrorComponent ("Ooops, qualcosa è andato storto! Probabilmente è un errore momentaneo, riprova per piacere!"). In this case we can also avoid a toast that which would repeat the error information. What you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good!

Co-authored-by: Matteo Boschi <[email protected]>
@Undermaken Undermaken merged commit a4b4a5b into master May 26, 2020
@Undermaken Undermaken deleted the 172992641-check-bonus-eligibility branch May 26, 2020 07:50
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