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
Fix block explorer links #411
Fix block explorer links #411
Conversation
✔️ Preview deployment is ready! 🔨 Explore the source changes: 5744030 😎 Browse the preview at one of these gateways: |
✔️ Storybook deployment is ready! 😎 Browse Storybook: https://bafybeibawkzldkgilc7lnb5ryxxx5lpfk5pxotpqato44onzbmiw6zo6ve.ipfs.cf-ipfs.com |
Hey @rulfo71, is this change applying only on addresses withing expanded Proposal Action on Proposal page? |
hey @Filipv95 ! |
at the moment is finished but missing tests on component BlockExplorerLink |
✔️ Preview deployment is ready! 🔨 Explore the source changes: 7d4996a 😎 Browse the preview at one of these gateways: |
✔️ Storybook deployment is ready! 😎 Browse Storybook: https://bafybeiho3qx2swidyh6jfnmw3kfm3g7fyaxebg4bn5vhrkh5htaaofxxy4.ipfs.cf-ipfs.com |
export const StyledSegmentLink = styled.a` | ||
color: ${({ theme }) => theme.colors.grey}; | ||
margin-right: 0.5rem; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
text-decoration: none; | ||
overflow-wrap: break-word; | ||
&:hover { | ||
cursor: pointer; | ||
color: ${({ theme }) => theme.colors.text}; | ||
} | ||
`; | ||
|
||
export const UnstyledExternalLink = styled.a` | ||
text-decoration: none; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
color: ${({ theme }) => theme.colors.text}; | ||
&:focus, | ||
&:hover, | ||
&:visited, | ||
&:link, | ||
&:active { | ||
text-decoration: none; | ||
} | ||
`; |
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.
Can we unify this in one component, passing the unstyled
prop, and handle the styling logic here?
return ( | ||
<StyledSegmentLink href={href} target="_blank" rel="noopener"> | ||
{children} | ||
<BiLinkExternal /> |
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.
<BiLinkExternal /> | |
<FiLinkExternal /> | |
src/components/ActionsBuilder/SupportedActions/UpdateENSContent/UpdateENSContentSummary.tsx
Outdated
Show resolved
Hide resolved
✔️ Preview deployment is ready! 🔨 Explore the source changes: a3bef3c 😎 Browse the preview at one of these gateways: |
✔️ Preview deployment is ready! 🔨 Explore the source changes: 4bcbe9f 😎 Browse the preview at one of these gateways: |
✔️ Storybook deployment is ready! 😎 Browse Storybook: https://bafybeifxgpbxf7ldl2aa5g7dnjghklqbuczjfjndn76umfgvmiyr4vy6fi.ipfs.cf-ipfs.com |
const blockExplorerUrl = getBlockExplorerUrl(chain, address, 'address'); | ||
|
||
return ( | ||
<FlexContainer> |
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.
We already have a <Flex />
component in components/primitives/Layout/Flex
.
We should use that instead, and also remove the component from the ./style
file
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.
great to know
export const FlexContainer = styled.div` | ||
display: flex; | ||
`; |
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.
export const FlexContainer = styled.div` | |
display: flex; | |
`; | |
export const FlexContainer = styled.div` | |
display: flex; | |
`; | |
Removing this (see comment above)
if (unstyled) { | ||
return ( | ||
<StyledSegmentLink href={href} target="_blank" rel="noopener"> | ||
<LinkDetail>{children}</LinkDetail> | ||
<FiExternalLink /> | ||
</StyledSegmentLink> | ||
); | ||
} | ||
|
||
return ( | ||
<StyledSegmentLink href={href} target="_blank" rel="noopener"> | ||
<LinkDetail>{children}</LinkDetail> | ||
<FiExternalLink /> | ||
</StyledSegmentLink> | ||
); |
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 think this should be only one component and handle the styling logic in the styled component
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.
thanks! yes i didn't realize this is not needed anymore.
✔️ Preview deployment is ready! 🔨 Explore the source changes: 6091606 😎 Browse the preview at one of these gateways: |
✔️ Storybook deployment is ready! 😎 Browse Storybook: https://bafybeifdg6bpwfkkl35g5jbbji5txi476vjx7dzrz5whygaixcwe3jl744.ipfs.cf-ipfs.com |
✔️ Preview deployment is ready! 🔨 Explore the source changes: 74dde67 😎 Browse the preview at one of these gateways: |
✔️ Storybook deployment is ready! 😎 Browse Storybook: https://bafybeibpay3perbqa4ec56fnlg3f64b5y3f2343ral7wcm2mnas25b6rgq.ipfs.cf-ipfs.com |
✔️ Preview deployment is ready! 🔨 Explore the source changes: 8a82894 😎 Browse the preview at one of these gateways: |
✔️ Storybook deployment is ready! 😎 Browse Storybook: https://bafybeidc2ydhxkszblxyy7eokvvw76q726jo6oa7ihrdanni3ifpha5jyi.ipfs.cf-ipfs.com |
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.
Clean! 👍
✔️ Preview deployment is ready! 🔨 Explore the source changes: c5203c9 😎 Browse the preview at one of these gateways: |
✔️ Storybook deployment is ready! 😎 Browse Storybook: https://bafybeid4hgk2dwfjnpdmhin5ztodhskcrrtkjchztycmwu5wkdf3vnw424.ipfs.cf-ipfs.com |
✔️ Preview deployment is ready! 🔨 Explore the source changes: d9c551d 😎 Browse the preview at one of these gateways: |
✔️ Storybook deployment is ready! 😎 Browse Storybook: https://bafybeiep4cjy4icessbo4mdqv62tikmeb4vxkxhg7ymkbmwk6bsqo7h4ti.ipfs.cf-ipfs.com |
Could we also change blockscout to link to gnosis scan https://gnosisscan.io/ |
✔️ Preview deployment is ready! 🔨 Explore the source changes: ca36b6c 😎 Browse the preview at one of these gateways: |
✔️ Storybook deployment is ready! 😎 Browse Storybook: https://bafybeiczcotadzs4rmymjssx3rupa45le32x25vz2bnlcdjd5mcwwjwq6y.ipfs.cf-ipfs.com |
Description
Fixing block explorer links through the app
Closes #338
Type of change
How Has This Been Tested?
Manually for now
Checklist: