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

Fix property value overflow in publisher portal #844

Merged
merged 1 commit into from
Jan 7, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,19 @@ import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
import Typography from '@mui/material/Typography';
import VisibilityIcon from '@mui/icons-material/Visibility';
import Tooltip from '@mui/material/Tooltip';

const PREFIX = 'EditableRow';

const classes = {
link: `${PREFIX}-link`,
checkBoxStyles: `${PREFIX}-checkBoxStyles`,
colorPrimary: `${PREFIX}-colorPrimary`,
cancelButton: `${PREFIX}-cancelButton`
cancelButton: `${PREFIX}-cancelButton`,
tableCellStyles: `${PREFIX}-tableCellStyles`
};

const StyledTableRow = styled(TableRow)(() => ({
const StyledTableRow = styled(TableRow)(({theme}) => ({
[`& .${classes.link}`]: {
cursor: 'pointer',
},
Expand All @@ -62,6 +64,17 @@ const StyledTableRow = styled(TableRow)(() => ({

[`& .${classes.cancelButton}`]: {
marginLeft: 4,
},
[`& .${classes.tableCellStyles}`]: {
display: 'inline-block',
minWidth: '150px',
maxWidth: '600px',
whiteSpace: 'normal',
overflow: 'hidden',
textOverflow: 'ellipsis',
[theme.breakpoints.up('xl')]: {
maxWidth: '1000px',
},
}
}));

Expand Down Expand Up @@ -195,9 +208,15 @@ function EditableRow(props) {
) : (
<>
<TableCell>
<Box display='inline-block' minWidth={150}>
{oldValue}
</Box>
<Tooltip
placement='top'
interactive
title={oldValue}
>
<Box className={classes.tableCellStyles}>
{oldValue}
</Box>
</Tooltip>
</TableCell>
<TableCell>
{isVisibleInStore && (
Expand Down
Loading