Skip to content

Commit

Permalink
ui: fix word-wrapping and tooltip spacing on jobs page
Browse files Browse the repository at this point in the history
- Fixed spacing for tooltip copy
- Fixed styling bug that was introduced in cockroachdb#35651: Job description
  previously truncated long job descriptions in collapsed view.

Tooltip copy - before:

<img width="300" alt="jobs before" src="https://user-images.githubusercontent.com/3051672/54454081-0be36e00-472f-11e9-8fc2-7e59b4565d51.png">

Tooltip copy - after:

<img width="300" alt="fix tooltip-spacing" src="https://user-images.githubusercontent.com/3051672/54454082-0be36e00-472f-11e9-9683-3b63490fbfe1.png">

Job description - before:

<img width="400" alt="broken text-wrapping" src="https://user-images.githubusercontent.com/3051672/54454213-58c74480-472f-11e9-81fd-7e075510d96f.png">

Job description - after:

<img width="400" alt="fix text-overflow" src="https://user-images.githubusercontent.com/3051672/54454227-5e248f00-472f-11e9-96b3-2f38a7b6dd6e.png">

Release note: None

Fixes: cockroachdb#35604
  • Loading branch information
celiala committed Mar 15, 2019
1 parent b4b081d commit fa71a3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/ui/src/views/jobs/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
white-space nowrap
max-width 500px
word-wrap break-word
&--sql
.sql
font-family Inconsolata-Regular

&__status-icon
Expand Down
6 changes: 3 additions & 3 deletions pkg/ui/src/views/jobs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ const jobsTableColumns: ColumnDescriptor<Job>[] = [
// If a [SQL] job.statement exists, it means that job.description
// is a human-readable message. Otherwise job.description is a SQL
// statement.
const additionalStyle = (job.statement ? "" : "--sql");
const additionalStyle = (job.statement ? "" : " sql");
return <div className={`jobs-table__cell--description${additionalStyle}`}>{job.description}</div>;
},
sort: job => job.description,
Expand Down Expand Up @@ -244,8 +244,8 @@ interface JobsTableProps {
const titleTooltip = (
<span>
Some jobs can be paused or canceled through SQL. For details, view the docs
on the <a href={docsURL.pauseJob} target="_blank"><code>PAUSE JOB</code></a>
and <a href={docsURL.cancelJob} target="_blank"><code>CANCEL JOB</code></a>
on the <a href={docsURL.pauseJob} target="_blank"><code>PAUSE JOB</code></a>{" "}
and <a href={docsURL.cancelJob} target="_blank"><code>CANCEL JOB</code></a>{" "}
statements.
</span>
);
Expand Down

0 comments on commit fa71a3d

Please sign in to comment.