-
Notifications
You must be signed in to change notification settings - Fork 153
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: add new oca branding 1.1 for credential list, proof request and verifier credential card #1405
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: fc-santos <[email protected]>
Signed-off-by: fc-santos <[email protected]>
Signed-off-by: fc-santos <[email protected]>
Signed-off-by: fc-santos <[email protected]>
Signed-off-by: fc-santos <[email protected]>
Signed-off-by: fc-santos <[email protected]>
Signed-off-by: fc-santos <[email protected]>
Signed-off-by: fc-santos <[email protected]>
Signed-off-by: fc-santos <[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.
Is this going to conflict with this PR: 1320
credName={credName} | ||
credDefId={credDefId} | ||
schemaId={schemaId} | ||
credential={credential as CredentialExchangeRecord} | ||
handleAltCredChange={handleAltCredChange} | ||
hasAltCredentials={hasAltCredentials} | ||
proof | ||
proof={isBranding10} |
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.
Is a credential with a branding type 1.0 always a proof?
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.
@al-rosenthal we want the new branding to have the same look as the one from the CredentialList screen. The prop was already true in the beginning since we are inside the if block:
if (proof) {
return (
<CredentialCard11
displayItems={displayItems}
style={isBranding10 ? { backgroundColor: ColorPallet.brand.secondaryBackground } : undefined}
credName={credName}
credDefId={credDefId}
schemaId={schemaId}
credential={credential as CredentialExchangeRecord}
handleAltCredChange={handleAltCredChange}
hasAltCredentials={hasAltCredentials}
proof={isBranding10} // before it was just proof
elevated
credentialErrors={credentialErrors ?? []}
brandingOverlayType={bundleResolver.getBrandingOverlayType()}
/>
)
}
@@ -112,6 +114,7 @@ const CredentialCard11: React.FC<CredentialCard11Props> = ({ | |||
]) | |||
const [helpAction, setHelpAction] = useState<GenericFn>() | |||
const [overlay, setOverlay] = useState<CredentialOverlay<BrandingOverlay>>({}) | |||
const { styles, borderRadius, logoHeight } = useCredentialCardStyles(overlay, brandingOverlayType) |
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.
should probably pass proof boolean into this
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.
@al-rosenthal resolved!
@@ -1250,3 +1255,16 @@ export function generateRandomWalletName() { | |||
|
|||
return name | |||
} | |||
|
|||
export function getSecondaryBackgroundColor( |
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.
nit: this feels like it should be in theme file with other style related things
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.
@al-rosenthal not really sure how to move this function to the theme.ts file since it takes some params (overlay and proof). I could rename the function though to be more clear its for use in the CredentialCard.
Signed-off-by: fc-santos <[email protected]>
Quality Gate passedIssues Measures |
@al-rosenthal I've just requested that PR to be closed, this PR should be easier to review compared to the other one. |
Summary of Changes
This PR is part 1 out of 2 for the new OCA branding (1.1). It covers the credential card displayed in the ListCredentials Screen, in the Proof Request Screen and in the VerifierCredentialCard component.
This introduces a breaking change for anyone using the new Branding:
A PR is on progress at the RFC repository related to this new branding: hyperledger/aries-rfcs#864
Screenshots, videos, or gifs
ListCredentials Screen (with/without oca bundle):
ProofRequest Screen:
VerifierCrendentialCard (with/without oca bundle):
Breaking change guide
The following interface has two new properties. These are the values for the two new props:
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)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 🤓