Skip to content
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
16 changes: 12 additions & 4 deletions src/inputs/RoleEditor/RoleEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT license.
import React from 'react';
import PropTypes from 'prop-types';
import { Grid2 as Grid, Typography, Avatar } from '@mui/material';
import { Grid2 as Grid, Typography, Avatar, Tooltip } from '@mui/material';
import makeStyles from '@mui/styles/makeStyles';
import { DefaultAvatar } from '../../misc';
import { getIdentifierFromUserEmail } from '../../utils';
Expand All @@ -15,6 +15,11 @@ const useStyles = makeStyles((theme) => ({
gap: '15px',
marginLeft: 0,
},
agentName: {
overflow: 'hidden',
textOverflow: 'ellipsis',
textWrap: 'nowrap',
},
rolesEditor: {
display: 'flex',
alignItems: 'center',
Expand All @@ -23,6 +28,7 @@ const useStyles = makeStyles((theme) => ({
nameGroup: {
display: 'flex',
flexDirection: 'column',
maxWidth: '80%',
},
}));
export const RoleEditor = ({
Expand All @@ -42,9 +48,11 @@ export const RoleEditor = ({
<Grid className={classes.agentGroup} size={7}>
{avatar}
<div className={classes.nameGroup}>
<Typography data-cy="role-editor-agent-name" variant="body1">
{agentName}
</Typography>
<Tooltip title={agentName} arrow>
<Typography className={classes.agentName} data-cy="role-editor-agent-name" variant="body1">
{agentName}
</Typography>
</Tooltip>
{helperText != null && (
<Typography data-cy="role-editor-helper-text" variant="body2" color="textSecondary">
{helperText[agentAccess]}
Expand Down