Skip to content

Commit

Permalink
simplify "pinned" / "starred" language in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon committed Oct 1, 2024
1 parent 82b129e commit 569dbe4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export default function SavedResultManager({ isOpen, setOpen }) {

<DialogContent sx={{ padding: 2 }} dividers>
<Typography sx={{ fontWeight: 200 }}>
<Trans>Temporary saved builds</Trans>{' '}
<Trans>Current pinned builds</Trans>{' '}
<HelperIcon
text={t('These builds will be deleted after you leave or refresh this page.')}
size="small"
Expand Down Expand Up @@ -343,7 +343,7 @@ export default function SavedResultManager({ isOpen, setOpen }) {
</IconButton>
</Tooltip>

<Tooltip title={t('Copy build to temporary saved builds')}>
<Tooltip title={t('Load as pinned build')}>
<IconButton onClick={handleCopyToTemporary(character)}>
<ArrowCircleUpIcon fontSize="small" />
</IconButton>
Expand Down
14 changes: 4 additions & 10 deletions src/components/sections/results/table/ResultTable.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { HelperIcon } from '@discretize/react-discretize-components';
import ManageAccountsIcon from '@mui/icons-material/ManageAccounts';
import SaveAsIcon from '@mui/icons-material/SaveAs';
import { Box, IconButton, Typography } from '@mui/material';
import Table from '@mui/material/Table';
import TableBody from '@mui/material/TableBody';
import TableContainer from '@mui/material/TableContainer';
import TableHead from '@mui/material/TableHead';
import React from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { Trans } from 'react-i18next';
import { useSelector } from 'react-redux';
import { makeStyles } from 'tss-react/mui';
import {
Expand Down Expand Up @@ -79,7 +78,6 @@ const emptyArray = [];

const StickyHeadTable = () => {
const { classes, cx } = useStyles();
const { t } = useTranslation();

const [managerOpen, setManagerOpen] = React.useState(false);

Expand Down Expand Up @@ -227,15 +225,11 @@ const StickyHeadTable = () => {

<Box className={classes.tablehead} sx={{ display: 'flex', alignItems: 'center' }}>
<Typography sx={{ flexGrow: 1, ml: 2, fontWeight: 600, fontFamily: 'Raleway' }}>
<Trans>Saved Results</Trans>{' '}
<HelperIcon
text={t('Click the star icon to save a result for comparison.')}
fontSize="1rem"
/>
<Trans>Pinned Results</Trans>{' '}
</Typography>

<IconButton size="small" sx={{ margin: 1 }} onClick={() => setManagerOpen(true)}>
<ManageAccountsIcon />
<SaveAsIcon />
</IconButton>
<SavedResultManager isOpen={managerOpen} setOpen={setManagerOpen} />
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ const ResultTableHeaderRow = ({
return (
<TableRow>
<TableCell className={classes.tablehead} align="center" padding="none">
<HelperIcon
text={t('Click the star icon to save a result for comparison.')}
fontSize="1rem"
/>
<HelperIcon text={t('Pin results for comparison between calculations.')} fontSize="1rem" />
</TableCell>
<TableCell className={classes.tablehead}>
{t('priorityGoal', {
Expand Down
8 changes: 4 additions & 4 deletions src/components/sections/results/table/ResultTableRow.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Item, Profession } from '@discretize/gw2-ui-new';
import CloseIcon from '@mui/icons-material/Close';
import StarRoundedIcon from '@mui/icons-material/StarRounded';
import PushPinIcon from '@mui/icons-material/PushPin';
import { Typography } from '@mui/material';
import TableCell from '@mui/material/TableCell';
import TableRow from '@mui/material/TableRow';
Expand Down Expand Up @@ -82,17 +82,17 @@ const ResultTableRow = ({
}}
/>
) : (
<StarRoundedIcon
<PushPinIcon
sx={
saved
? {
color: 'star',
color: 'primary.main',
}
: {
opacity: '0.2',
'&:hover': {
opacity: '1',
color: 'star',
color: 'primary.main',
},
}
}
Expand Down

0 comments on commit 569dbe4

Please sign in to comment.