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: added person credential loading screen #2094

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

wadeking98
Copy link
Contributor

Added loading screen to person credential flow instead of button activity indicator

personLoading.mp4

Signed-off-by: wadeking98 <wkingnumber2@gmail.com>
Copy link
Member

@jleach jleach left a comment

Choose a reason for hiding this comment

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

Some thoughts on dependencies in the useEffect. LMK if I'm misunderstanding the docs I ref in the first comment.

@@ -0,0 +1,53 @@
import { useTheme } from '@hyperledger/aries-bifold-core'
Copy link
Member

Choose a reason for hiding this comment

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

Curious if there was a component in Bifold that could just be modified to take in a different graphic?

app/src/screens/PersonCredentialLoading.tsx Show resolved Hide resolved
setDidCompleteAttestationProofRequest(true)
}
}, attestationProofRequestWaitTimeout)
}, [remoteAgentDetails])
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
}, [remoteAgentDetails])
}, [remoteAgentDetails, receivedProofRequests, attestationProofRequestWaitTimeout, logger]);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

attestationProofRequestWaitTimeout and logger should be constant for the duration of the screen no? I don't think its possible for either of them to change without reloading the app

return () => {
subscriptions.forEach((subscription) => subscription.remove())
}
}, [])
Copy link
Member

Choose a reason for hiding this comment

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

I think in this one you may need:

  • The navigation object is included in the dependencies array to ensure that the effect re-runs if navigation changes.
  • DeviceEventEmitter, BifoldEventTypes, or AttestationEventTypes are constants and do not change, they don't need to be in the dependencies array. If they can change, they should be added to the array as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not quite sure what you mean with adding the navigation object to the dependancy array. The navigation object should only change when we trigger a navigation event like navigating to a new screen, in which case we wouldn't want to re-run the useEffect because we'd be leaving this screen right?

goToCredentialOffer(credential.id)
}
}
}, [receivedCredentialOffers, remoteAgentDetails])
Copy link
Member

Choose a reason for hiding this comment

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

store?

Copy link
Contributor Author

@wadeking98 wadeking98 Jul 29, 2024

Choose a reason for hiding this comment

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

maybe store.developer.environment.iasPortalUrl so we're not reacting to every change that happens on the store object? IMHO iasPortalUrl shouldn't be changing while we're on this screen so should we even just treat it as a constant?

Signed-off-by: wadeking98 <wkingnumber2@gmail.com>
Copy link

sonarcloud bot commented Jul 29, 2024

@wadeking98 wadeking98 requested a review from jleach July 29, 2024 22:28
@wadeking98 wadeking98 merged commit 05e9a23 into main Jul 30, 2024
12 checks passed
@wadeking98 wadeking98 deleted the feat-person-loading-screen branch July 30, 2024 16:04
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