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

Fix [UI] text overlaps in job Results tab #1578

Merged
merged 1 commit into from
Dec 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 16 additions & 25 deletions src/components/DetailsResults/DetailsResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ const DetailsResults = ({ job }) => {
<div className="results-table__row">
{result.headers.map((item, i) => (
<div className="results-table__header-item" key={i}>
<Tooltip template={<TextTooltipTemplate text={item} />}>
{item}
</Tooltip>
<Tooltip template={<TextTooltipTemplate text={item} />}>{item}</Tooltip>
</div>
))}
</div>
Expand All @@ -58,10 +56,7 @@ const DetailsResults = ({ job }) => {
contentItemValue.match(/completed|running|error/gi)
) {
return (
<div
className="results-table__cell"
key={`${contentItemValue}${idx}`}
>
<div className="results-table__cell" key={`${contentItemValue}${idx}`}>
<Tooltip
template={
<TextTooltipTemplate
Expand All @@ -86,28 +81,17 @@ const DetailsResults = ({ job }) => {
className="results-table__medal results-table__cell"
>
{contentItemValue}
<Tooltip
template={
<TextTooltipTemplate text={'Best iteration'} />
}
>
<Tooltip template={<TextTooltipTemplate text={'Best iteration'} />}>
<BestIteration />
</Tooltip>
</div>
)
} else {
return (
<div
className="results-table__cell"
key={`${contentItemValue}${idx}`}
>
<div className="results-table__cell" key={`${contentItemValue}${idx}`}>
<Tooltip
className="data-ellipsis"
template={
<TextTooltipTemplate
text={contentItemValue.toString()}
/>
}
template={<TextTooltipTemplate text={contentItemValue.toString()} />}
>
{roundFloats(contentItemValue)}
</Tooltip>
Expand All @@ -119,13 +103,20 @@ const DetailsResults = ({ job }) => {
))}
</div>
</>
) : job.iterations?.length === 0 &&
Object.keys(job.results ?? {}).length !== 0 ? (
) : job.iterations?.length === 0 && Object.keys(job.results ?? {}).length !== 0 ? (
Object.keys(job.results).map(key => {
return (
<div key={key} className="results-table__row">
<div className="results-table__cell">{key}</div>
<div className="results-table__cell">{job.results[key]}</div>
<div className="results-table__cell table__cell-wide">
<Tooltip className="data-ellipsis" template={<TextTooltipTemplate text={key} />}>
{key}
</Tooltip>
</div>
<div className="results-table__cell table__cell-wide">
<Tooltip className="data-ellipsis" template={<TextTooltipTemplate text={job.results[key]} />}>
{job.results[key]}
</Tooltip>
</div>
</div>
)
})
Expand Down
5 changes: 5 additions & 0 deletions src/components/DetailsResults/detailsResults.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
padding: 19px 15px 19px 25px;
}

.table__cell-wide {
flex: 0 0 250px;
width: 250px;
}

i {
margin: 0 15px;
}
Expand Down