Skip to content
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: redesign (external) links #1241

Merged
merged 4 commits into from
Dec 6, 2022
Merged

feat: redesign (external) links #1241

merged 4 commits into from
Dec 6, 2022

Conversation

schmanu
Copy link
Member

@schmanu schmanu commented Nov 24, 2022

What it solves

Links look the same as normal text making it hard to see what is a clickable link and what is just text.

Resolves #1174 , #1231

How this PR fixes it

  • Redesigns all links to be bold and underlined
  • New ExternalLink component which is similar to Link but always sets a secure rel attribute, the target to_blank and by default appends an external-link icon.
  • Replaces most gnosis-safe.io links by safe.global. For instance links to help articles, policies, etc.

How to test it

Check the various external links in our interface:

  • Settings -> Appearance
  • Settings -> Modules
  • Settings -> TransactionGuard
  • SafeApps -> Add Custom App
  • ....

Analytics changes

None

Screenshots

Screenshot 2022-11-24 at 16 12 21
Screenshot 2022-11-24 at 16 13 54

@schmanu schmanu requested a review from usame-algan November 24, 2022 15:14
@github-actions
Copy link

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 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@@ -488,7 +488,7 @@ const initTheme = (darkMode: boolean) => {
MuiLink: {
styleOverrides: {
root: ({ theme }) => ({
textDecoration: 'none',
Copy link
Member Author

Choose a reason for hiding this comment

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

I talked about this change with lila

@github-actions
Copy link

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.

This looks good but why does the component need to be "external" specific. Surely internal links need to look the same

target="_blank"
sx={{ textDecoration: 'none' }}
>
<ExternalLink href="https://safe.global/terms" sx={{ textDecoration: 'none' }}>
Copy link
Member

Choose a reason for hiding this comment

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

Should we remove the textDecoration now?

@usame-algan
Copy link
Member

Does this also resolve #1231 or are there gnosis-safe.io links left?

@schmanu
Copy link
Member Author

schmanu commented Nov 24, 2022

Does this also resolve #1231 or are there gnosis-safe.io links left?

It should at least I searched for gnosis-safe.io and tried to update all links which should point to safe.global. I left some urls which are pointing to the old app on purpose. I'll edit the PR description. Didnt see that issue :)

* It also always adds the external link icon as end adornment.
*/
const ExternalLink = ({
suppressIcon = false,
Copy link
Member

Choose a reason for hiding this comment

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

nit: I would name this hideIcon for brevity

Copy link
Member

@usame-algan usame-algan left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@francovenica
Copy link
Contributor

francovenica commented Dec 5, 2022

In the old Safe creation flow the links of terms of privacy and policy don't have the new link format. I don't have the new safe creation flow in this PR. can you check if there they have the proper format? if they have then I can close this ticket
EDIT: We could add the format to those links in the old safe creation flow as well, but that flow will be deprecated at some point, so is not that important
image

@github-actions
Copy link

github-actions bot commented Dec 5, 2022

Branch preview

✅ Deploy successful!

https://redesign-external-links--webcore.review-web-core.5afe.dev

@github-actions
Copy link

github-actions bot commented Dec 5, 2022

CLA Assistant Lite All Contributors have signed the CLA.

@schmanu
Copy link
Member Author

schmanu commented Dec 5, 2022

Hey @francovenica,

I merged dev into this branch and fixed multiple links in the old and new safe creation to use the new ExternalLink component.

Good catch. Btw in the old safe creation those two links you found did not even link to any pages.

@github-actions
Copy link

github-actions bot commented Dec 5, 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 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@francovenica
Copy link
Contributor

Looks good.
Those links used to take to "gnosis safe" blogs, probably those were removed, ergo making the links broken. (dunno, im just guessing)

@schmanu schmanu merged commit 27f4f10 into dev Dec 6, 2022
@schmanu schmanu deleted the redesign-external-links branch December 6, 2022 17:27
@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 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.

(External) Links look the same as text
4 participants