Skip to content

Commit

Permalink
fix: Add a mid ellipsis to the filename in the qualification list
Browse files Browse the repository at this point in the history
This allows to see the start and the end of the filename without any overflow.
  • Loading branch information
PolariTOON committed Sep 5, 2022
1 parent 57b95fb commit 4f30229
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions react/Viewer/Panel/Qualification.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import List from '../../MuiCozyTheme/List'
import ListItem from '../../MuiCozyTheme/ListItem'
import QualificationListItemText from './QualificationListItemText'
import { withViewerLocales } from '../withViewerLocales'
import MidEllipsis from '../../MidEllipsis'

const {
document: {
Expand Down Expand Up @@ -53,9 +54,13 @@ const Qualification = ({ file = {}, contactsFullname, t, f, lang }) => {
<QualificationListItemText
primary={t('Viewer.panel.qualification.label.title')}
secondary={
pageLabel
? t(`Viewer.panel.qualification.label.${pageLabel}`)
: filename
<MidEllipsis
text={
pageLabel
? t(`Viewer.panel.qualification.label.${pageLabel}`)
: filename
}
/>
}
/>
</ListItem>
Expand Down

0 comments on commit 4f30229

Please sign in to comment.