Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

feat: New safe app card design #3804

Merged
merged 13 commits into from
May 2, 2022

Conversation

DaniSomoza
Copy link
Contributor

@DaniSomoza DaniSomoza commented Apr 21, 2022

What it solves

Resolves #413

Figma

Screenshots

Captura de pantalla 2022-04-20 a las 17 35 39
Captura de pantalla 2022-04-20 a las 17 38 44
Captura de pantalla 2022-04-20 a las 17 39 25
Captura de pantalla 2022-04-20 a las 17 50 39
Captura de pantalla 2022-04-20 a las 19 05 04
Captura de pantalla 2022-04-20 a las 19 17 58

@github-actions
Copy link

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented Apr 21, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 1 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@github-actions
Copy link

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

Base automatically changed from share-safe-app-button to safe-app-landing-page April 26, 2022 08:50
Copy link
Member

@iamacook iamacook left a comment

Choose a reason for hiding this comment

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

Really nice improvement dude!

Comment on lines +43 to +47
const safeAddress = extractSafeAddress()
const appsPath = generateSafeRoute(SAFE_ROUTES.APPS, {
shortName: getShortName(),
safeAddress,
})
Copy link
Member

Choose a reason for hiding this comment

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

Before merging, let's use this hook (#3826) or I'll merge main into that PR and edit it there (depending on which one makes it through QA first).

Please leave this comment unresolved.

Comment on lines 60 to 76
<SafeAppContainer size={size} layout initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }}>
<StyledAppCard size={size}>
<LogoContainer size={size}>
<SafeAppLogoSK size={size} />
</LogoContainer>
<DescriptionContainer size={size}>
<SafeAppTitleSK />
<SafeAppDescriptionSK />
<SafeAppDescriptionSK />
</DescriptionContainer>
</StyledAppCard>
</SafeAppContainer>
)
}

return (
<SafeAppContainer size={size} layout initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }}>
Copy link
Member

Choose a reason for hiding this comment

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

Apart from size, you're using the same values on both SafeAppContainer components. Are we using this container elsewhere or can we abstract them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

mmm what do you mean with abstract them?

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps just have them fixed in the component so we don't have to pass them via props at all, or create a safeContainProps and spread them onto both. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that the best option here is to keep it as it is now. The size prop is needed to render the correct card design:

Captura de pantalla 2022-04-28 a las 16 28 21

Copy link
Member

Choose a reason for hiding this comment

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

For size, yes, but I meant the others. Can we not just hardcode those to the component itself? They are the same values for both.

Copy link
Contributor Author

@DaniSomoza DaniSomoza Apr 28, 2022

Choose a reason for hiding this comment

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

do you mean this?

const SafeAppContainer = styled(motion.div).attrs({
  layout: true,
  initial: { opacity: 0 },
  animate: { opacity: 1 },
  exit: { opacity: 0 },
})`
  position: relative;
  display: flex;

instead of this?

      <SafeAppContainer size={size} layout initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }}>

Copy link
Member

Choose a reason for hiding this comment

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

Yes, exactly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

Comment on lines 98 to 99
<IconBtn onClick={shareSafeApp} aria-label={`copy ${safeApp.name} Safe App share link to clipboard`}>
<Icon size="md" type="share" tooltip="copy share link to clipboard" />
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
<IconBtn onClick={shareSafeApp} aria-label={`copy ${safeApp.name} Safe App share link to clipboard`}>
<Icon size="md" type="share" tooltip="copy share link to clipboard" />
<IconBtn onClick={shareSafeApp} aria-label={`Copy shareable ${safeApp.name} Safe App link to clipboard`}>
<Icon size="md" type="share" tooltip="Copy shareable link to clipboard" />

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, @liliiaorlenko what is the best label for these tooltips?

Captura de pantalla 2022-04-27 a las 18 59 11
Captura de pantalla 2022-04-27 a las 18 59 19
Captura de pantalla 2022-04-27 a las 18 59 23

Choose a reason for hiding this comment

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

“Copy share link”
“Unpin from the Safe Apps”
“Remove Custom Safe App”
Lets keep it short

Copy link
Member

Choose a reason for hiding this comment

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

Unpin Safe App :)

@github-actions
Copy link

github-actions bot commented Apr 28, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 1 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@DaniSomoza DaniSomoza merged commit 5fa8991 into safe-app-landing-page May 2, 2022
@DaniSomoza DaniSomoza deleted the new-safe-app-card-design branch May 2, 2022 10:24
@github-actions github-actions bot locked and limited conversation to collaborators May 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants