Skip to content

Commit

Permalink
Add column description to table viz (#4831)
Browse files Browse the repository at this point in the history
* Add column description to table viz

* Fix: misplaced super long titles tooltip.
  • Loading branch information
arikfr authored Apr 24, 2020
1 parent ea8a075 commit 60f92a2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions client/app/visualizations/table/Editor/ColumnEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ export default function ColumnEditor({ column, onChange }) {
</Checkbox>
</Section>

<Section>
<Input
label="Description"
defaultValue={column.description}
onChange={event => handleChangeDebounced({ description: event.target.value })}
/>
</Section>

<Section>
<Select
label="Display as:"
Expand Down
7 changes: 7 additions & 0 deletions client/app/visualizations/table/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ export function prepareColumns(columns, searchInput, orderBy, onOrderByChange) {
align: column.alignContent,
title: (
<React.Fragment>
{column.description && (
<Tooltip placement="top" title={column.description} className="p-r-5">
<div className="table-visualization-heading">
<i className="fa fa-info-circle" aria-hidden="true"></i>
</div>
</Tooltip>
)}
<Tooltip placement="top" title={column.title}>
<div className="table-visualization-heading" data-sort-column-index={sortColumnIndex}>
{column.title}
Expand Down

0 comments on commit 60f92a2

Please sign in to comment.