diff --git a/CHANGELOG.md b/CHANGELOG.md index adb74791171..b45094e8572 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.md). - Added two new properties to mapping json files. The `colors: [, , ...]` property can be used to specify up to 256 custom colors for the first 256 equivalence classes of the mapping. The `hideUnmappedIds: ` property indicates whether segments that were not mapped should be rendered transparently or not. [#2965](https://github.com/scalableminds/webknossos/pull/2965) - Added a button for refreshing the dataset in the backend cache. [#2975](https://github.com/scalableminds/webknossos/pull/2975) +- Added the possibility to see the description of a tracing within the dashboard. [#3035](https://github.com/scalableminds/webknossos/pull/3035) - Comments of tracing trees can now be cycled through by keeping n and p pressed. [#3041](https://github.com/scalableminds/webknossos/pull/3041) - All dates in webknossos will be shown in the browser's timezone. On hover, a tooltip will show the date in UTC. [#2916](https://github.com/scalableminds/webknossos/pull/2916) ![image](https://user-images.githubusercontent.com/2486553/42888385-74c82bc0-8aa8-11e8-9c3e-7cfc90ce93bc.png) - When merging datasets within a tracing via the merge-modal, the user can choose whether the merge should be executed directly in the currently opened tracing. Alternatively, a new annotation can be created which is accessible via the dashboard (as it has been before). diff --git a/app/assets/javascripts/dashboard/explorative_annotations_view.js b/app/assets/javascripts/dashboard/explorative_annotations_view.js index 263687474c9..eeab471dec4 100644 --- a/app/assets/javascripts/dashboard/explorative_annotations_view.js +++ b/app/assets/javascripts/dashboard/explorative_annotations_view.js @@ -5,7 +5,7 @@ import _ from "lodash"; import * as React from "react"; import { Link, withRouter } from "react-router-dom"; import { AsyncLink } from "components/async_clickables"; -import { Spin, Input, Table, Button, Modal, Tag, Icon } from "antd"; +import { Spin, Input, Table, Button, Modal, Tag, Icon, Popover, Tooltip } from "antd"; import FormatUtils from "libs/format_utils"; import Toast from "libs/toast"; import Utils from "libs/utils"; @@ -336,6 +336,33 @@ class ExplorativeAnnotationsView extends React.PureComponent { ); } + renderNameWithDescription(tracing: APIAnnotationTypeCompact) { + return ( + + this.renameTracing(tracing, newName)} + /> + Show description } placement="bottom"> + + {tracing.description && tracing.description !== "" + ? tracing.description + : "No description"} + + } + > + +
+ + + + ); + } + renderTable() { return ( { title="Name" dataIndex="name" sorter={Utils.localeCompareBy(typeHint, "name")} - render={(name: string, tracing: APIAnnotationTypeCompact) => ( - this.renameTracing(tracing, newName)} - /> - )} + render={(name: string, tracing: APIAnnotationTypeCompact) => + this.renderNameWithDescription(tracing) + } />