-
Notifications
You must be signed in to change notification settings - Fork 155
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: export connection alert modal #1408
feat: export connection alert modal #1408
Conversation
Signed-off-by: ZouidiSamih <[email protected]>
Signed-off-by: ZouidiSamih <[email protected]>
Signed-off-by: ZouidiSamih <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very small nit pick but changes look good
@@ -715,7 +715,7 @@ const ProofRequest: React.FC<ProofRequestProps> = ({ navigation, proofId }) => { | |||
</InfoTextBox> | |||
)} | |||
{!loading && proofConnectionLabel && goalCode === 'aries.vc.verify' ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we're looking at this, it would be a little cleaner to modify the check to:
{(!loading && proofConnectionLabel && goalCode === 'aries.vc.verify') ?? (
connectionAlert({ connectionID: proofConnectionLabel })
)}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the feedback! I've implemented the suggested changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting a small adjustment, but overall nice work
@@ -75,6 +74,7 @@ const CredentialOffer: React.FC<CredentialOfferProps> = ({ navigation, credentia | |||
const { start } = useTour() | |||
const screenIsFocused = useIsFocused() | |||
const goalCode = useOutOfBandByConnectionId(credential?.connectionId ?? '')?.outOfBandInvitation?.goalCode | |||
const [connectionAlert] = useServices([TOKENS.COMPONENT_CONNECTION_ALERT]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we opt to use capitalized components and JSX for injectables like this? Following something like PINCreateHeader
for example, ie.
const [ConnectionAlert] = useServices([TOKENS.COMPONENT_CONNECTION_ALERT])
...
{credentialConnectionLabel && goalCode === 'aries.vc.issue' ? (
<ConnectionAlert connectionID={credentialConnectionLabel} />
) : null}
It makes it easier to identify what is being rendered at a glance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the feedback! I've implemented the suggested changes
@@ -279,7 +279,7 @@ const CredentialOffer: React.FC<CredentialOfferProps> = ({ navigation, credentia | |||
> | |||
{loading ? <RecordLoading /> : null} | |||
{credentialConnectionLabel && goalCode === 'aries.vc.issue' ? ( | |||
<ConnectionAlert connectionID={credentialConnectionLabel} /> | |||
connectionAlert({ connectionID: credentialConnectionLabel }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the second part of the suggested change referenced in comment above
…ConnectionAlert Signed-off-by: ZouidiSamih <[email protected]>
Signed-off-by: ZouidiSamih <[email protected]>
Signed-off-by: ZouidiSamih <[email protected]>
Quality Gate passedIssues Measures |
@ZouidiSamih nicely done! |
Summary of Changes
Exported the connection alert model to improve its reusability across components/modules.
Screenshots, videos, or gifs
N/A
Breaking change guide
N/A
Related Issues
N/A
Pull Request Checklist
Tick all boxes below to demonstrate that you have completed the respective task. If the item does not apply to your this PR check it anyway to make it apparent that there's nothing to do.
Signed-off-by
line (we use the DCO GitHub app to enforce this)