Skip to content

Commit

Permalink
feat: middle-truncate long file names (view mode)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulschreiber committed Nov 30, 2023
1 parent 81783ec commit df6637a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sharedData/components/SharedDataEntryBase.js
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@ import { daysSince } from 'timeUtils';

import ConfirmButton from 'common/components/ConfirmButton';
import EditableText from 'common/components/EditableText';
import MiddleEllipsis from 'common/components/MiddleEllipsis';
import { formatDate } from 'localization/utils';
import { useAnalytics } from 'monitoring/analytics';
import Restricted from 'permissions/components/Restricted';
@@ -146,7 +147,11 @@ const SharedDataEntryBase = props => {
<Restricted
permission="sharedData.edit"
resource={permissionsResource}
FallbackComponent={() => <Typography>{dataEntry.name}</Typography>}
FallbackComponent={() => (
<MiddleEllipsis>
<Typography component="span">{dataEntry.name}</Typography>
</MiddleEllipsis>
)}
>
<EditableText
id={`name-${dataEntry.id}`}

0 comments on commit df6637a

Please sign in to comment.