-
Notifications
You must be signed in to change notification settings - Fork 14
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: credential overview #4
Conversation
Signed-off-by: Jan <[email protected]>
Co-authored-by: Timo Glastra <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Really like the recently added vs all credentials. it seems like a good way to clear the clutter! Maybe it could even be a favourites, or frequently used list in the future |
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.
Nice!
@@ -12,7 +12,7 @@ import * as React from 'react' | |||
|
|||
type W3cCredentialRecordState = { | |||
w3cCredentialRecords: Array<W3cCredentialRecord> | |||
loading: boolean | |||
isLoading: boolean |
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.
I agree with this change. Reason I kept it loading
as that's the pattern used by the react-hooks AFJ extension and if we start using more types from there it will be inconsistent.
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]> Signed-off-by: Timo Glastra <[email protected]> Co-authored-by: Timo Glastra <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Maybe we can add some gradient to the button. But this is just a random thought so please ignore this if I'm saying something stupid |
Also, seems there's merge confilcts |
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
Whats the trick for the CI? :) @TimoGlastra |
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Pushed some changs to fix the CI @janrxyz. This was the issue:
|
Signed-off-by: Jan <[email protected]>
<YStack g="lg" width="100%"> | ||
<Heading variant="h3" textAlign="left"> | ||
Recently added | ||
</Heading> | ||
<ZStack | ||
f={0} | ||
flexBasis="auto" | ||
height={ | ||
BASE_CREDENTIAL_CARD_HEIGHT + records.slice(0, 3).length * CREDENTIAL_TOP_INFO_OFFSET | ||
} | ||
> | ||
{records.slice(0, 3).map((x, idx) => { | ||
const credential = x.credential | ||
return ( | ||
<XStack | ||
key={x.id} | ||
mt={72 * idx} | ||
br={borderRadiusSizes.xl} | ||
borderColor="$lightTranslucent" | ||
borderWidth={0.5} | ||
> | ||
<CredentialCard | ||
onPress={() => navigateToCredentialDetail(x.id)} | ||
iconUrl={credential.issuer.iconUrl} | ||
name={credential.name} | ||
issuerName={credential.issuer.name} | ||
subtitle={credential.description} | ||
bgColor={credential?.credentialBranding?.backgroundColor} | ||
shadow={false} | ||
/> | ||
</XStack> | ||
) | ||
})} | ||
</ZStack> | ||
</YStack> |
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.
Not for now, but I think we should extract this to a spearate component in the future. That will make it cleaner IMO:
<CredentialCardsList
title="Recently Added"
credentials={record.slice(0 ,3)}
onPressCredential={(credential) => navigateToCredentialDetail(credential.id)}
/>
And the implementation:
const CredentialCardsList = ({ credentials }) => {
const height = BASE_CREDENTIAL_CARD_HEIGHT + credentials.length * CREDENTIAL_TOP_INFO_OFFSET
return (
<YStack g="lg" width="100%">
<Heading variant="h3" textAlign="left">
Recently added
</Heading>
<ZStack
f={0}
flexBasis="auto"
height={height}
>
{credentials.map((c, idx) => {
const credential = x.credential
return (
<XStack
key={x.id}
mt={72 * idx}
br={borderRadiusSizes.xl}
borderColor="$lightTranslucent"
borderWidth={0.5}
>
<CredentialCard
onPress={() => navigateToCredentialDetail(x.id)}
iconUrl={credential.issuer.iconUrl}
name={credential.name}
issuerName={credential.issuer.name}
subtitle={credential.description}
bgColor={credential?.credentialBranding?.backgroundColor}
shadow={false}
/>
</XStack>
)
})}
</ZStack>
</YStack>
)
}
return ( | ||
<XStack | ||
key={x.id} | ||
mt={72 * idx} |
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.
another magic number. Is the overlap 100PX and we render 72PX?
RPReplay_Final1685371507.mov