Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes various padding issues in the viewer panel #2307

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions react/Viewer/Footer/BottomSheetContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const BottomSheetContent = ({ file }) => {
key={index}
disableGutters
disableElevation={index === panelBlocks.length - 1}
className="u-pv-1"
>
<PanelBlock file={file} />
</BottomSheetItem>
Expand Down
6 changes: 3 additions & 3 deletions react/Viewer/Panel/Certifications.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { withViewerLocales } from '../hoc/withViewerLocales'

const Certification = ({ icon, title, caption }) => {
return (
<div className={'u-ph-2 u-pv-1'}>
<div className="u-ph-1 u-pv-half">
<Media className="u-mb-half" align="top">
<Img className="u-mr-half">
<Icon icon={icon} />
Expand All @@ -36,7 +36,7 @@ const Certifications = ({ file, t }) => {
const hasElectronicSafe = has(file, 'metadata.electronicSafe')

return (
<>
<div className="u-flex u-flex-column" style={{ rowGap: '.5rem' }}>
{hasCarbonCopy && (
<Certification
icon={CarbonCopyIcon}
Expand All @@ -51,7 +51,7 @@ const Certifications = ({ file, t }) => {
caption={t('Viewer.panel.certifications.electronicSafe.caption')}
/>
)}
</>
</div>
)
}

Expand Down
6 changes: 2 additions & 4 deletions react/Viewer/Panel/PanelContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ const PanelContent = ({ file, t }) => {
{panelBlocks.map((PanelBlock, index) => (
<Paper
key={index}
className={cx({
className={cx('u-p-1', {
'u-flex-grow-1': index === panelBlocks.length - 1
})}
elevation={2}
square
>
<Typography variant="h4" className={'u-pv-1'}>
<PanelBlock file={file} />
</Typography>
<PanelBlock file={file} />
</Paper>
))}
</Stack>
Expand Down
6 changes: 3 additions & 3 deletions react/Viewer/Panel/Qualification.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ const Qualification = ({ file }) => {
}, [formatedMetadataQualification])

return (
<>
<div className="u-flex u-flex-column" style={{ rowGap: '1rem' }}>
{isExpiringSoon(file) && !isExpirationAlertHidden(file) && (
<ExpirationAlert file={file} />
)}
<List className={'u-pv-1'}>
<List className="u-pv-0">
{formatedMetadataQualification.map((meta, idx) => {
const { name } = meta
const QualificationListItemComp = makeQualificationListItemComp(name)
Expand All @@ -101,7 +101,7 @@ const Qualification = ({ file }) => {
/>
)}
</List>
</>
</div>
)
}

Expand Down
4 changes: 2 additions & 2 deletions react/Viewer/Panel/QualificationListItemContact.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const QualificationListItemContact = ({ file }) => {

if (isLoadingContacts) {
return (
<ListItem className={'u-pl-2 u-pr-3'}>
<ListItem className="u-ph-1">
<Spinner color="var(--secondaryTextColor)" />
</ListItem>
)
Expand All @@ -43,7 +43,7 @@ const QualificationListItemContact = ({ file }) => {

return (
<>
<ListItem className={'u-ph-2'}>
<ListItem>
<QualificationListItemText
primary={t('Viewer.panel.qualification.contact')}
secondary={contactName}
Expand Down
2 changes: 1 addition & 1 deletion react/Viewer/Panel/QualificationListItemDate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const QualificationListItemDate = forwardRef(
: t('Viewer.panel.qualification.noInfo')

return (
<ListItem className={'u-pl-2 u-pr-3'}>
<ListItem>
<QualificationListItemText
primary={t(`Viewer.panel.qualification.date.title.${name}`)}
secondary={
Expand Down
2 changes: 1 addition & 1 deletion react/Viewer/Panel/QualificationListItemInformation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const QualificationListItemInformation = forwardRef(
const currentValue = makeInformationValue(name, value, t)

return (
<ListItem className={'u-pl-2 u-pr-3'}>
<ListItem>
<QualificationListItemText
primary={t(`Viewer.panel.qualification.information.title.${name}`)}
secondary={currentValue}
Expand Down
2 changes: 1 addition & 1 deletion react/Viewer/Panel/QualificationListItemOther.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const QualificationListItemOther = forwardRef(
: t(`Viewer.panel.qualification.${value}`)

return (
<ListItem className={'u-pl-2 u-pr-3'}>
<ListItem>
<QualificationListItemText
primary={t(`Viewer.panel.qualification.${name}`)}
secondary={<MidEllipsis text={currentValueTranslated} />}
Expand Down
2 changes: 1 addition & 1 deletion react/Viewer/components/ExpirationAlert.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const ExpirationAlert = ({ file }) => {
onClick={handleClose}
/>
}
className="u-mt-1 u-mh-1"
className="u-mh-1-m"
>
<Typography component="span" variant="inherit">
<Typography component="span" variant="inherit">
Expand Down