-
Notifications
You must be signed in to change notification settings - Fork 152
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: unify UI for DIDComm and OpenID flows for Offer and details screens #1365
feat: unify UI for DIDComm and OpenID flows for Offer and details screens #1365
Conversation
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
import { credentialTextColor } from '../../utils/credential' | ||
import { testIdWithKey } from '../../utils/testable' | ||
|
||
type Props = { |
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.
Able to rename to CredentialDetailPrimaryHeaderProps
to follow the app convetion?
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.
done
import { toImageSource } from '../../utils/credential' | ||
import { testIdWithKey } from '../../utils/testable' | ||
|
||
type Props = { |
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.
CredentialDetailSecondaryHeaderProps
to follow convention.
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.
done
|
||
useEffect(() => { | ||
const resolveOverlay = async () => { | ||
if (!credentialDisplay || !bundleResolver || !i18n || !credentialDisplay.display) { |
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.
In the above two useEffect
you put the guard clause if (x) return
outside of the async function. Able to move this out or the other two in for consistency?
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.
done
) | ||
} | ||
|
||
const screenEdges: Edge[] = ['left', 'right'] |
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 var seems orphaned down here. Can it be moved up with the others for readability?
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.
done
|
||
useEffect(() => { | ||
const resolveOverlay = async () => { | ||
if (!credentialDisplay || !bundleResolver || !i18n || !credentialDisplay.display) { |
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.
outside for consistency?
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.
done
} | ||
|
||
resolveOverlay() | ||
// eslint-disable-next-line react-hooks/exhaustive-deps |
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.
Why "disable"?
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.
For some reason, including 'credentialDisplay' in the dept array, causes infinite rendering loop. I spent enough time trying to dig deeper but couldn't figure out the reason. Removing this from the dept array makes rendering more stable.
{credential && ( | ||
<View style={{ marginHorizontal: 15, marginBottom: 16 }}> | ||
<OpenIDCredentialCard credentialDisplay={display} /> | ||
{/* <OpenIDCredentialCard credentialDisplay={display} /> */} |
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.
Remove dead code?
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.
done
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Quality Gate passedIssues Measures |
Checked out and tested. LGTM. |
Summary of Changes
Unify UI for OpenID flow and Didcomm in regards to the following
Introducing OCA by adding mapping functions to map W3C credential metadata to default OCA branding overlay
Re-using Card components and creating some other re-usable components for both flows
Screenshots, videos, or gifs
UI Screens for OpenID Creds along with Didcomm, all look identical
DBC DIIP is W3C Cred, while the rest is Anoncreds
Breaking change guide
No breaking changes
Related Issues
Replace this text with issue #'s that are relevant to this PR. If there are none, simply enter 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)If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!
Pro Tip 🤓