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

simplify "pinned" / "starred" language in UI #757

Open
wants to merge 1 commit into
base: feat/character-local-storage
Choose a base branch
from
Open
Show file tree
Hide file tree
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
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 @@ -78,7 +77,6 @@ const emptyArray = [];

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

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

Expand Down Expand Up @@ -217,15 +215,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
Loading