diff --git a/.gitignore b/.gitignore index 9444a55998..44e2d5a4fa 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ npm-debug .DS_Store /dist .vscode +.claude # Logs logs diff --git a/frontend/src/component/changeRequest/ProjectChangeRequests/ChangeRequestsTabs/FeaturesCell.tsx b/frontend/src/component/changeRequest/ProjectChangeRequests/ChangeRequestsTabs/FeaturesCell.tsx index 5ae6448e5f..0e80300546 100644 --- a/frontend/src/component/changeRequest/ProjectChangeRequests/ChangeRequestsTabs/FeaturesCell.tsx +++ b/frontend/src/component/changeRequest/ProjectChangeRequests/ChangeRequestsTabs/FeaturesCell.tsx @@ -5,6 +5,7 @@ import { ConditionallyRender } from 'component/common/ConditionallyRender/Condit import { TooltipLink } from 'component/common/TooltipLink/TooltipLink'; import { useSearchHighlightContext } from 'component/common/Table/SearchHighlightContext/SearchHighlightContext'; import { Highlighter } from 'component/common/Highlighter/Highlighter'; +import { Truncator } from 'component/common/Truncator/Truncator'; const StyledBox = styled(Box)(({ theme }) => ({ display: 'flex', @@ -13,10 +14,7 @@ const StyledBox = styled(Box)(({ theme }) => ({ padding: theme.spacing(1, 0, 1, 2), })); -const StyledLink = styled(Link)(({ theme }) => ({ - overflow: 'hidden', - textOverflow: 'ellipsis', - whiteSpace: 'nowrap', +const StyledLink = styled(Link)(() => ({ textDecoration: 'none', '&:hover, &:focus': { textDecoration: 'underline', @@ -53,12 +51,13 @@ export const FeaturesCell: VFC = ({ value, project }) => { show={featureNames?.map((featureName: string) => ( - - {featureName} - + + + {featureName} + + ))} elseShow={ @@ -69,12 +68,17 @@ export const FeaturesCell: VFC = ({ value, project }) => { {featureNames?.map((featureName: string) => ( - - {featureName} - + + + {featureName} + + ))} diff --git a/frontend/src/component/common/Table/cells/FeatureOverviewCell/FeatureOverviewCell.tsx b/frontend/src/component/common/Table/cells/FeatureOverviewCell/FeatureOverviewCell.tsx index d1368db962..a0ec80e5c3 100644 --- a/frontend/src/component/common/Table/cells/FeatureOverviewCell/FeatureOverviewCell.tsx +++ b/frontend/src/component/common/Table/cells/FeatureOverviewCell/FeatureOverviewCell.tsx @@ -5,7 +5,7 @@ import useFeatureTypes from 'hooks/api/getters/useFeatureTypes/useFeatureTypes'; import { getFeatureTypeIcons } from 'utils/getFeatureTypeIcons'; import { useSearchHighlightContext } from '../../SearchHighlightContext/SearchHighlightContext.tsx'; import { Highlighter } from '../../../Highlighter/Highlighter.tsx'; -import { StyledDescription, StyledTitle } from '../LinkCell/LinkCell.styles'; +import { StyledDescription } from '../LinkCell/LinkCell.styles'; import { Link } from 'react-router-dom'; import { Badge } from '../../../Badge/Badge.tsx'; import { HtmlTooltip } from '../../../HtmlTooltip/HtmlTooltip.tsx'; @@ -15,6 +15,7 @@ import { useLocationSettings } from 'hooks/useLocationSettings'; import { getLocalizedDateString } from '../../../util.ts'; import { Tag } from 'component/common/Tag/Tag'; import { formatTag } from 'utils/format-tag'; +import { Truncator } from 'component/common/Truncator/Truncator'; interface IFeatureNameCellProps { row: { @@ -135,15 +136,20 @@ const FeatureName: FC<{ return ( ({ fontWeight: theme.typography.fontWeightBold })}> - - {feature} - + + + {feature} + + + ); @@ -154,14 +160,18 @@ const ArchivedFeatureName: FC<{ searchQuery: string; }> = ({ feature, searchQuery }) => { return ( - ({ fontWeight: theme.typography.fontWeightBold, color: theme.palette.neutral.main, + overflowWrap: 'anywhere', })} > {feature} - + ); }; diff --git a/frontend/src/component/common/Table/cells/HighlightCell/HighlightCell.tsx b/frontend/src/component/common/Table/cells/HighlightCell/HighlightCell.tsx index 3aa5c699d2..195f64bc0f 100644 --- a/frontend/src/component/common/Table/cells/HighlightCell/HighlightCell.tsx +++ b/frontend/src/component/common/Table/cells/HighlightCell/HighlightCell.tsx @@ -5,6 +5,7 @@ import { useSearchHighlightContext } from 'component/common/Table/SearchHighligh import { Box, styled } from '@mui/material'; import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; import { HtmlTooltip } from 'component/common/HtmlTooltip/HtmlTooltip'; +import { Truncator } from 'component/common/Truncator/Truncator'; interface IHighlightCellProps { value: string; @@ -21,14 +22,7 @@ const StyledContainer = styled(Box)(({ theme }) => ({ padding: theme.spacing(1, 2), })); -const StyledTitle = styled('span')(({ theme }) => ({ - overflow: 'hidden', - textOverflow: 'ellipsis', - display: '-webkit-box', - WebkitBoxOrient: 'vertical', - WebkitLineClamp: '1', - lineClamp: '1', -})); +const StyledTitle = styled('span')(() => ({})); const StyledSubtitle = styled('span')(({ theme }) => ({ color: theme.palette.text.secondary, @@ -73,16 +67,17 @@ export const HighlightCell: FC = ({ return ( - - {value} - {afterTitle} - + + {value} + {afterTitle} + + ({ wordBreak: 'break-all', })); -export const StyledTitle = styled('span')(({ theme }) => ({ - overflow: 'hidden', - textOverflow: 'ellipsis', - display: '-webkit-box', - WebkitBoxOrient: 'vertical', -})); - export const StyledDescription = styled('span')(({ theme }) => ({ color: theme.palette.text.secondary, textDecoration: 'none', diff --git a/frontend/src/component/common/Table/cells/LinkCell/LinkCell.tsx b/frontend/src/component/common/Table/cells/LinkCell/LinkCell.tsx index 7ec25a4390..e59cfcc94e 100644 --- a/frontend/src/component/common/Table/cells/LinkCell/LinkCell.tsx +++ b/frontend/src/component/common/Table/cells/LinkCell/LinkCell.tsx @@ -4,11 +4,11 @@ import { ConditionallyRender } from 'component/common/ConditionallyRender/Condit import { Highlighter } from 'component/common/Highlighter/Highlighter'; import { useSearchHighlightContext } from 'component/common/Table/SearchHighlightContext/SearchHighlightContext'; import { HtmlTooltip } from 'component/common/HtmlTooltip/HtmlTooltip'; +import { Truncator } from 'component/common/Truncator/Truncator'; import { StyledWrapper, StyledLink, StyledContainer, - StyledTitle, StyledDescription, } from './LinkCell.styles'; @@ -51,16 +51,17 @@ export const LinkCell: React.FC = ({ const content = ( - - {title} - {children} - + + {title} + {children} + + - Tag type name + + Tag type name + - Tag type name + + Tag type name + - Tag type name + + Tag type name + - Tag type name + + Tag type name + - Tag type name + + Tag type name +