From 8fab96f2091cc338250c9526dd5c4d955f4fb0c6 Mon Sep 17 00:00:00 2001 From: John Conroy <62477388+john-conroy@users.noreply.github.com> Date: Mon, 17 Jul 2023 15:53:32 -0400 Subject: [PATCH] John conroy/fix conditional link icon (#3184) * Show icon for link before DUA is agreed upon * Add changelog --------- Co-authored-by: John Conroy --- CHANGELOG-fix-conditional-link-icon.md | 1 + .../detailPage/BulkDataTransfer/FilesConditionalLink.jsx | 6 ++---- .../js/components/detailPage/BulkDataTransfer/style.js | 7 ------- 3 files changed, 3 insertions(+), 11 deletions(-) create mode 100644 CHANGELOG-fix-conditional-link-icon.md diff --git a/CHANGELOG-fix-conditional-link-icon.md b/CHANGELOG-fix-conditional-link-icon.md new file mode 100644 index 0000000000..558ef6d8cd --- /dev/null +++ b/CHANGELOG-fix-conditional-link-icon.md @@ -0,0 +1 @@ +- Fix bug causing the outbound link icon to not display in Globus links before the DUA has been agreed upon. \ No newline at end of file diff --git a/context/app/static/js/components/detailPage/BulkDataTransfer/FilesConditionalLink.jsx b/context/app/static/js/components/detailPage/BulkDataTransfer/FilesConditionalLink.jsx index 4800423d08..8a7bfcd95a 100644 --- a/context/app/static/js/components/detailPage/BulkDataTransfer/FilesConditionalLink.jsx +++ b/context/app/static/js/components/detailPage/BulkDataTransfer/FilesConditionalLink.jsx @@ -4,8 +4,6 @@ import PropTypes from 'prop-types'; import OutboundLink from 'js/shared-styles/Links/OutboundLink'; import OutboundIconLink from 'js/shared-styles/Links/iconLinks/OutboundIconLink'; -import { AlignedLink } from './style'; - function getOutboundLinkComponent(hasIcon) { if (hasIcon) { return OutboundIconLink; @@ -24,7 +22,7 @@ function FilesConditionalLink({ hasAgreedToDUA, openDUA, href, children, hasIcon } return ( - { openDUA(); }} @@ -33,7 +31,7 @@ function FilesConditionalLink({ hasAgreedToDUA, openDUA, href, children, hasIcon {...rest} > {children} - + ); } diff --git a/context/app/static/js/components/detailPage/BulkDataTransfer/style.js b/context/app/static/js/components/detailPage/BulkDataTransfer/style.js index 1a2479b47f..ed4be3777c 100644 --- a/context/app/static/js/components/detailPage/BulkDataTransfer/style.js +++ b/context/app/static/js/components/detailPage/BulkDataTransfer/style.js @@ -6,8 +6,6 @@ import BlockIcon from '@material-ui/icons/Block'; import Box from '@material-ui/core/Box'; import WarningRoundedIcon from '@material-ui/icons/WarningRounded'; -import { LightBlueLink } from 'js/shared-styles/Links'; - const StyledContainer = styled.div` > div { margin-bottom: ${(props) => props.theme.spacing(1.25)}px; @@ -61,10 +59,6 @@ const StyledBlockIcon = styled(BlockIcon)` color: ${(props) => props.theme.palette.warning.main}; `; -const AlignedLink = styled(LightBlueLink)` - vertical-align: baseline; -`; - const ObliqueSpan = styled.span` font-style: oblique 10deg; `; @@ -100,7 +94,6 @@ export { StyledLink, GreenCheckCircleIcon, StyledBlockIcon, - AlignedLink, ObliqueSpan, StyledHeader, StyledDiv,