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

feat(Carta Giovani Nazionale): [#176456924,#176655324,#176655351,#176655437,#176655260,#176655162,#176456839] Adds UI on CGN activation workflow #2758

Merged
merged 135 commits into from
Feb 24, 2021

Conversation

CrisTofani
Copy link
Contributor

@CrisTofani CrisTofani commented Jan 28, 2021

THIS PR DEPENDS ON #2773

Short description

This PR introduces UI on screens for CGN Activation flow

How to test

Change response on io-dev-server based this PR

Loading and Timeout

Registrazione.schermo.2021-01-28.alle.15.36.08.mov

Already Active

Pending

Ineligible

Error Loading

CrisTofani and others added 30 commits January 12, 2021 17:53
Undermaken and others added 23 commits February 11, 2021 11:41
…b.com:pagopa/io-app into 176715047-request-cgn-status
);

const mapStateToProps = (_: GlobalState) => ({});
const mapStateToProps = (state: GlobalState) => ({
isLoading: isCgnActivationLoading(state)
Copy link
Contributor

Choose a reason for hiding this comment

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

With this condition, after the first error, if the user choose to retry it will not see the loading screen because the value in the store always remains the same (in the store section bonus.cgn.activation.status value will be ERROR).

Registrazione.schermo.2021-02-23.alle.18.57.00.mov

in the attached video I added a consistent delay to the dev server and made the api return error.
How about making the loading condition based on a section of the store that takes into account the start of a new request and its outcome?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok I got the point, this store section is yet used only for Activation progress state, after the implementation of #2812 we have another API for the CGN activation status polling

What about setting the activation state to

      {
        ...state,
        status: CgnActivationProgressEnum.PROGRESS
      };

when we dispatch the cgnRequestActivation.request action?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushed this solution in ff0cff3

And now it shows back the loader when retrying the activation

@fabriziofff fabriziofff merged commit eb6cd28 into master Feb 24, 2021
@CrisTofani CrisTofani deleted the 176456924-activation-loading-screen branch March 23, 2021 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants