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

Add word-wrap in strings in share lists #972

Merged
merged 2 commits into from
Jan 12, 2024
Merged
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
38 changes: 27 additions & 11 deletions frontend/src/modules/Shares/components/ShareBoxListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const ShareBoxListItem = ({ share }) => {
}}
>
<Grid container spacing={0.5} alignItems="center">
<Grid item justifyContent="center" md={2} xs={2}>
<Grid item justifyContent="center" md={2.2} lg={1.5} xl={1.2}>
<Box
sx={{
pt: 2,
Expand All @@ -28,7 +28,7 @@ export const ShareBoxListItem = ({ share }) => {
<ShareStatus status={share.status} />
</Box>
</Grid>
<Grid item justifyContent="flex-end" md={2} xs={2}>
<Grid item justifyContent="flex-end" md={2} lg={2.25} xl={2.25}>
<Box
sx={{
pt: 2,
Expand All @@ -39,12 +39,16 @@ export const ShareBoxListItem = ({ share }) => {
<Typography color="textPrimary" variant="body1">
Request owner
</Typography>
<Typography color="textSecondary" variant="body1">
<Typography
color="textSecondary"
variant="body1"
style={{ wordWrap: 'break-word' }}
>
{`${share.principal.SamlGroupName}`}
</Typography>
</Box>
</Grid>
<Grid item justifyContent="flex-end" md={2} xs={2}>
<Grid item justifyContent="flex-end" md={2} lg={2.25} xl={2.25}>
<Box
sx={{
pt: 2,
Expand All @@ -55,12 +59,16 @@ export const ShareBoxListItem = ({ share }) => {
<Typography color="textPrimary" variant="body1">
IAM role name
</Typography>
<Typography color="textSecondary" variant="body1">
<Typography
color="textSecondary"
variant="body1"
style={{ wordWrap: 'break-word' }}
>
{`${share.principal.principalIAMRoleName}`}
</Typography>
</Box>
</Grid>
<Grid item justifyContent="center" md={2} xs={2}>
<Grid item justifyContent="center" md={2} lg={2.25} xl={2.25}>
<Box
sx={{
pt: 2,
Expand All @@ -71,28 +79,36 @@ export const ShareBoxListItem = ({ share }) => {
<Typography color="textPrimary" variant="body1">
Dataset
</Typography>
<Typography color="textSecondary" variant="body1">
<Typography
color="textSecondary"
variant="body1"
style={{ wordWrap: 'break-word' }}
>
{`${share.dataset.datasetName}`}
</Typography>
</Box>
</Grid>
<Grid item justifyContent="center" md={2} xs={2}>
<Grid item justifyContent="center" md={2} lg={2.25} xl={2.25}>
<Box
sx={{
pt: 2,
pb: 2,
px: 3
}}
>
<Typography color="textPrimary" variant="body1">
<Typography
color="textPrimary"
variant="body1"
style={{ wordWrap: 'break-word' }}
>
Dataset Owner
</Typography>
<Typography color="textSecondary" variant="body1">
{`${share.dataset.SamlAdminGroupName}`}
</Typography>
</Box>
</Grid>
<Grid item justifyContent="flex-end" md={1.3} xs={1.3}>
<Grid item justifyContent="flex-end" md={1.3} lg={1.2} xl={1.4}>
<Button
color="primary"
type="button"
Expand All @@ -103,7 +119,7 @@ export const ShareBoxListItem = ({ share }) => {
Open Share Request
</Button>
</Grid>
<Grid item justifyContent="flex-end" md={0.2} xs={0.2}>
<Grid item justifyContent="flex-end" md={0.2} lg={0.2} xl={0.4}>
{share.statistics.sharedItems > 0 && (
<Tooltip
title={share.statistics.sharedItems + ' shared items'}
Expand Down
Loading