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: [OI-249] login data status #549

Merged
merged 6 commits into from
Dec 10, 2024
Merged

Conversation

mmoio
Copy link
Collaborator

@mmoio mmoio commented Nov 26, 2024

  • separate api functions
  • separate login data hook
  • separate login buttons
  • adds react-query
  • refactors api
  • refactors data fetching
  • adds spid skeletons
  • reduces code repeatition
    SpidSelection & SpidModal
  • login refactoring
  • improves error handling
  • udated unit tests

image

image

@mmoio mmoio requested a review from sebbalex November 26, 2024 22:02
@mmoio mmoio self-assigned this Nov 26, 2024
@mmoio mmoio requested a review from a team as a code owner November 26, 2024 22:02
@mmoio mmoio marked this pull request as draft November 27, 2024 08:12
@mmoio mmoio force-pushed the feat/OI-249-idps-loading-status branch from 9fe2e4d to 7afb552 Compare November 29, 2024 08:35
@mmoio mmoio force-pushed the feat/OI-249-idps-loading-status branch from 7afb552 to 7d7ec3a Compare November 29, 2024 09:24
@mmoio mmoio marked this pull request as ready for review November 29, 2024 10:01
@sebbalex
Copy link
Contributor

sebbalex commented Dec 2, 2024

I am not particularly convinced about loading the spinner when the page loads. This causes the user to see the loading every time they land on the page when in fact the time it takes the user to click on the “Entra con SPID” button can be used for background loading.
I would move the spinner inside the modal (and dialog) so that this does not happen.
wdyt?

@sebbalex
Copy link
Contributor

sebbalex commented Dec 2, 2024

as a secondary issue, when a client_id is not present in GET I see in console this message, maybe we should think about something more clear

image

@mmoio mmoio force-pushed the feat/OI-249-idps-loading-status branch from 7d7ec3a to 293419c Compare December 6, 2024 08:40
@mmoio mmoio marked this pull request as draft December 6, 2024 08:41
@mmoio mmoio marked this pull request as ready for review December 6, 2024 14:06
@mmoio
Copy link
Collaborator Author

mmoio commented Dec 6, 2024

as a secondary issue, when a client_id is not present in GET I see in console this message, maybe we should think about something more clear

image

I'have changed the error logic, using react-query, but errors should still be handled in some way within the ui/ux. I think it deserves a separate PR

@mmoio mmoio changed the title feat: [OI-249] spinner on idps fetch feat: [OI-249] login data status Dec 6, 2024
sebbalex
sebbalex previously approved these changes Dec 6, 2024
Copy link
Contributor

@sebbalex sebbalex left a comment

Choose a reason for hiding this comment

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

🚀

mmoio added 6 commits December 9, 2024 09:18
- separete api functions
- separet login data hook
- separetd login buttons
- unit test
- adds react-query
- refactors api
- refactors useLoginData
- adds spid skeletons
- reduces code repeatition
  SpidSelection & SpidModal
- login refactoring
- imporeves error handling
@mmoio mmoio force-pushed the feat/OI-249-idps-loading-status branch from 6eda7d2 to 1b28d77 Compare December 9, 2024 08:21
@mmoio mmoio requested a review from sebbalex December 9, 2024 08:56
src={clientData?.logoUri}
alt={clientData?.friendlyName}
src={clientQuery.data?.logoUri}
alt={clientQuery.data?.friendlyName || 'PagoPa Logo'}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
alt={clientQuery.data?.friendlyName || 'PagoPa Logo'}
alt={clientQuery.data?.friendlyName || 'PagoPA Logo'}

@mmoio mmoio merged commit 898a23b into main Dec 10, 2024
8 checks passed
@mmoio mmoio deleted the feat/OI-249-idps-loading-status branch December 10, 2024 11:14
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.

2 participants