mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-10 01:16:39 +02:00
fix: long flag names push table to overflow and flag descriptions are not truncated (#9350)
Addresses two issues related to flag names and descriptions overflowing: 1: In the project flag overview, long flag names push the environments off screen. This is handled by setting overflow-wrap: anywhere on the offending text. The text will now use ellipses instead. Before full-width:  Before narrower:  After full-width:  After narrower:  2: On the flag page, long descriptions are rendered in their entirety, even if that's not sensible. They are now truncated after five lines. There is a tooltip that shows the full text, or you can go the flag settings to see the full description. Before:  After:  After (with tooltip):  --- Note, I don't think this is necessarily the perfect solution (it'd be nice to get tooltips for overflowing flag names a "show full description" disclosure button instead of the stupidly long tooltip), but I think it's a step in the right direction.
This commit is contained in:
parent
7ec6c141f3
commit
000ee66692
@ -21,7 +21,6 @@ export const StyledPopover = styled(Popover)(({ theme }) => ({
|
||||
paddingTop: theme.spacing(dropdownPadding),
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
|
||||
gap: theme.spacing(1),
|
||||
maxHeight: '70vh',
|
||||
},
|
||||
|
@ -132,6 +132,7 @@ const FeatureName: FC<{
|
||||
style={{
|
||||
WebkitLineClamp: 1,
|
||||
lineClamp: 1,
|
||||
overflowWrap: 'anywhere',
|
||||
}}
|
||||
>
|
||||
<Highlighter search={searchQuery}>{feature}</Highlighter>
|
||||
|
@ -16,6 +16,7 @@ import { TagRow } from './TagRow';
|
||||
import { capitalizeFirst } from 'utils/capitalizeFirst';
|
||||
import { Collaborators } from './Collaborators';
|
||||
import { EnvironmentVisibilityMenu } from './EnvironmentVisibilityMenu/EnvironmentVisibilityMenu';
|
||||
import { Truncator } from 'component/common/Truncator/Truncator';
|
||||
|
||||
const StyledMetaDataContainer = styled('div')(({ theme }) => ({
|
||||
padding: theme.spacing(3),
|
||||
@ -97,7 +98,9 @@ const FeatureOverviewMetaData: FC<FeatureOverviewMetaDataProps> = ({
|
||||
{description ? (
|
||||
<StyledMetaDataItem data-loading>
|
||||
<StyledMetaDataItemText>
|
||||
{description}
|
||||
<Truncator arrow lines={5} title={description}>
|
||||
{description}
|
||||
</Truncator>
|
||||
</StyledMetaDataItemText>
|
||||
</StyledMetaDataItem>
|
||||
) : null}
|
||||
|
@ -220,9 +220,6 @@ export const ProjectFeatureToggles = ({
|
||||
header: 'Name',
|
||||
cell: FeatureOverviewCell(onTagClick, onFlagTypeClick),
|
||||
enableHiding: false,
|
||||
meta: {
|
||||
width: '50%',
|
||||
},
|
||||
}),
|
||||
columnHelper.accessor('createdAt', {
|
||||
id: 'createdAt',
|
||||
|
Loading…
Reference in New Issue
Block a user