Skip to content

Commit

Permalink
Merge pull request desktop#13272 from desktop/Stop-ugly-jumping-for-l…
Browse files Browse the repository at this point in the history
…ong-check-run-names

Clip long check run names so we don't have wonkiness on hover.
  • Loading branch information
tidy-dev authored Nov 8, 2021
2 parents 1413b36 + 49e947c commit df785ba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
15 changes: 11 additions & 4 deletions app/src/ui/check-runs/ci-check-run-list-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { getClassNameForCheck, getSymbolForCheck } from '../branches/ci-status'
import classNames from 'classnames'
import { CICheckRunLogs } from './ci-check-run-logs'
import * as OcticonSymbol from '../octicons/octicons.generated'
import { TooltippedContent } from '../lib/tooltipped-content'

interface ICICheckRunListItemProps {
/** The check run to display **/
Expand Down Expand Up @@ -86,10 +87,16 @@ export class CICheckRunListItem extends React.PureComponent<
/>
</div>
<div className="ci-check-list-item-detail">
<div className="ci-check-name">{checkRun.name}</div>
<div className="ci-check-description" title={checkRun.description}>
{checkRun.description}
</div>
<TooltippedContent
className="ci-check-name"
tooltip={checkRun.name}
onlyWhenOverflowed={true}
tagName="div"
>
{checkRun.name}
</TooltippedContent>

<div className="ci-check-description">{checkRun.description}</div>
</div>
<div
className={classNames('view-on-github', {
Expand Down
4 changes: 4 additions & 0 deletions app/styles/ui/check-runs/_ci-check-run-list-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
.ci-check-list-item-detail {
flex: 1;
margin: auto;
overflow-x: hidden;
}

.ci-check-name {
font-weight: var(--font-weight-semibold);
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}

.ci-check-description {
Expand Down

0 comments on commit df785ba

Please sign in to comment.