Skip to content
Closed
Show file tree
Hide file tree
Changes from 6 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
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ describe('FlagsTable', () => {
const flags = await screen.findByText('Flags')
expect(flags).toBeInTheDocument()

const coverage = await screen.findByText('Coverage %')
const coverage = await screen.findByText('Average coverage %')
expect(coverage).toBeInTheDocument()

const trend = await screen.findByText('Trend')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import A from 'ui/A'
import CoverageProgress from 'ui/CoverageProgress'
import Icon from 'ui/Icon'
import Spinner from 'ui/Spinner'
import { Tooltip } from 'ui/Tooltip'

import DeleteFlagModal from './DeleteFlagModal'
import useRepoFlagsTable from './hooks'
Expand All @@ -38,7 +39,31 @@ const columns = [
cell: ({ renderValue }) => renderValue(),
}),
columnHelper.accessor('coverage', {
header: () => 'Coverage %',
header: () => (
<div className="flex items-center gap-1">
Average coverage %
<Tooltip delayDuration={0} skipDelayDuration={100}>
<Tooltip.Root>
<Tooltip.Trigger>
<div className="text-ds-gray-tertiary dark:text-ds-gray-quinary">
<Icon name="informationCircle" size="sm" />
</div>
</Tooltip.Trigger>
<Tooltip.Portal>
<Tooltip.Content
side="right"
className="w-64 rounded-md bg-ds-gray-primary p-3 text-xs text-ds-gray-octonary"
>
This is the average flag coverage over the selected time period.
To view current coverage % for a given flag, navigate to the
Overview tab and filter by flag.
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional, not sure if a link to the overview tab would be helpful here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably

<Tooltip.Arrow className="size-4 fill-gray-100" />
</Tooltip.Content>
</Tooltip.Portal>
</Tooltip.Root>
</Tooltip>
</div>
),
cell: ({ renderValue }) => renderValue(),
enableSorting: false,
}),
Expand Down