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

Add links to test descriptions on measurement pages #469

Merged
merged 1 commit into from
Jun 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions components/measurement/DetailsHeader.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React from 'react'
import PropTypes from 'prop-types'
import prettyMs from 'pretty-ms'
import { Flex, Box } from 'ooni-components'
import { Flex, Box, Link } from 'ooni-components'
// FIXME: Include 'fontWeight' to ooni-components/atoms/Text
// Using Text from rebass directly for now
import { Text } from 'rebass'
import { FormattedMessage } from 'react-intl'
import { MdOpenInNew } from 'react-icons/lib/md'

import { getTestMetadata } from '../utils'
import Badge from '../Badge'
Expand Down Expand Up @@ -43,7 +44,13 @@ const DetailsHeader = ({testName, runtime, notice}) => {
/>
</Box>
<Box ml={2}>
<Text fontSize={20}>{metadata.name}</Text>
<Link href={metadata.info} target='_blank'>
Copy link
Member

Choose a reason for hiding this comment

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

I now realised that the behaviour is that of opening it in a new window.

I don't think we should be doing that. If the user wants to open it in a new window they can alt-click on the link.

Copy link
Member

Choose a reason for hiding this comment

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

Opened this PR for it: #471

<Text fontSize={20}>
{metadata.name}
&nbsp;
<small><MdOpenInNew /></small>
</Text>
</Link>
</Box>
</Flex>
<Box mx='auto'>
Expand Down