Skip to content

Commit

Permalink
Make the vessel historical profile comparison dots more visible
Browse files Browse the repository at this point in the history
  • Loading branch information
satellitestudiodesign committed Aug 7, 2024
1 parent 84cd15a commit 6b40f28
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
align-items: center;
justify-content: center;
height: 3.2rem;
background-color: var(--color-terthiary-blue);
background-color: rgba(var(--primary-blue-rgb), 0.4);
border-radius: 1.6rem;
transition: all 250ms ease-out;
cursor: pointer;
Expand All @@ -21,9 +21,10 @@
grid-template-columns: 0fr;
}

.icon:hover {
border: 0.5rem solid white;
.icon:hover,
.icon.selected {
grid-template-columns: 1fr;
border: 0.5rem solid white;
}

.icon:hover,
Expand All @@ -34,18 +35,12 @@
.dates {
font: var(--font-XS);
color: var(--color-white);
opacity: 0;
white-space: nowrap;
width: 100%;
overflow: hidden;
transition: opacity 150ms ease-in;
}

.icon:hover .dates {
opacity: 1;
transition: opacity 150ms ease-in 200ms;
}

.error {
color: var(--color-danger-red);
text-align: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import cx from 'classnames'
import { useTranslation } from 'react-i18next'
import { DateTime } from 'luxon'
import { VesselIdentitySourceEnum } from '@globalfishingwatch/api-types'
import { Tooltip } from '@globalfishingwatch/ui-components'
import {
selectVesselIdentityId,
selectVesselIdentitySource,
Expand Down Expand Up @@ -76,17 +77,19 @@ const VesselIdentitySelector = () => {
const end = formatI18nDate(identity.transmissionDateTo)
const identityId = getVesselIdentityId(identity)
return (
<li
key={identityId}
className={cx(styles.icon, {
[styles.selected]: identityId === getVesselIdentityId(currentIdentity),
})}
onClick={() => setIdentityId(identityId)}
>
<span className={styles.dates}>
{start} - {end}
</span>
</li>
<Tooltip content={t('vessel.selectIdentity', 'See the identity for this dates')}>
<li
key={identityId}
className={cx(styles.icon, {
[styles.selected]: identityId === getVesselIdentityId(currentIdentity),
})}
onClick={() => setIdentityId(identityId)}
>
<span className={styles.dates}>
{start} - {end}
</span>
</li>
</Tooltip>
)
})}
</ul>
Expand Down
1 change: 1 addition & 0 deletions apps/fishing-map/public/locales/source/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,7 @@
"registryGeartype": "Registry Gear Type",
"registrySources": "registry sources",
"removeAllVessels": "Remove all vessels",
"selectIdentity": "See the identity for this dates",
"sectionActivity": "Activity",
"sectionAreas": "Areas",
"sectionInsights": "Insights",
Expand Down

0 comments on commit 6b40f28

Please sign in to comment.