Skip to content

Commit 93607e1

Browse files
committed
text overlaping the resourse sharing
1 parent 79253f6 commit 93607e1

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/inputs/RoleEditor/RoleEditor.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT license.
33
import React from 'react';
44
import PropTypes from 'prop-types';
5-
import { Grid2 as Grid, Typography, Avatar } from '@mui/material';
5+
import { Grid2 as Grid, Typography, Avatar, Tooltip } from '@mui/material';
66
import makeStyles from '@mui/styles/makeStyles';
77
import { DefaultAvatar } from '../../misc';
88
import { getIdentifierFromUserEmail } from '../../utils';
@@ -15,6 +15,11 @@ const useStyles = makeStyles((theme) => ({
1515
gap: '15px',
1616
marginLeft: 0,
1717
},
18+
agentName: {
19+
overflow: 'hidden',
20+
textOverflow: 'ellipsis',
21+
textWrap: 'nowrap',
22+
},
1823
rolesEditor: {
1924
display: 'flex',
2025
alignItems: 'center',
@@ -23,6 +28,7 @@ const useStyles = makeStyles((theme) => ({
2328
nameGroup: {
2429
display: 'flex',
2530
flexDirection: 'column',
31+
maxWidth: '80%',
2632
},
2733
}));
2834
export const RoleEditor = ({
@@ -42,9 +48,11 @@ export const RoleEditor = ({
4248
<Grid className={classes.agentGroup} size={7}>
4349
{avatar}
4450
<div className={classes.nameGroup}>
45-
<Typography data-cy="role-editor-agent-name" variant="body1">
46-
{agentName}
47-
</Typography>
51+
<Tooltip title={agentName} arrow>
52+
<Typography className={classes.agentName} data-cy="role-editor-agent-name" variant="body1">
53+
{agentName}
54+
</Typography>
55+
</Tooltip>
4856
{helperText != null && (
4957
<Typography data-cy="role-editor-helper-text" variant="body2" color="textSecondary">
5058
{helperText[agentAccess]}

0 commit comments

Comments
 (0)