diff --git a/CHANGELOG.md b/CHANGELOG.md index 5999ee2f077..b4b86ea1ef7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.md). - Tree groups can now be activated. This allows to rename a tree group analogous to renaming a tree. Also, toggling the visibility of a tree group can now be done by using the shortcuts "1" and "2". [#3066](https://github.com/scalableminds/webknossos/pull/3066) - Added the possibility to upload multiple NML files during task creation, even if they are not in a zip archive - Added the possibility to supply a dedicated "sorting date" for datasets to change the sorting order in the gallery view, by default the creation date is used [#3124](https://github.com/scalableminds/webknossos/pull/3124) +- Added a button to collapse all comments. [#3215](https://github.com/scalableminds/webknossos/pull/3215) - The datasets in the dashboard are now sorted according to their user-specific usage. As a result, relevant datasets should appear at the top of the list. [#3206](https://github.com/scalableminds/webknossos/pull/3206) ### Changed diff --git a/app/assets/javascripts/oxalis/view/components/markdown_modal.js b/app/assets/javascripts/oxalis/view/components/markdown_modal.js index 15be5ba9787..fc7157bce2b 100644 --- a/app/assets/javascripts/oxalis/view/components/markdown_modal.js +++ b/app/assets/javascripts/oxalis/view/components/markdown_modal.js @@ -1,6 +1,6 @@ // @flow import * as React from "react"; -import { Modal, Button, Row, Col } from "antd"; +import { Alert, Modal, Button, Row, Col } from "antd"; import Markdown from "react-remarkable"; import InputComponent from "oxalis/view/components/input_component"; @@ -30,15 +30,7 @@ export function MarkdownModal({ return ( - {`Edit ${label}`} ( - - Markdown enabled - - ) - - } + title={{`Edit ${label}`}} visible={visible} onCancel={onOk} closable={false} @@ -49,6 +41,21 @@ export function MarkdownModal({ , ]} > + + In addition to using{" "} + + Markdown + {" "} + for formatting, you can also create links to nodes and positions by using hashtags. For + example, #123 links to node 123, while #(1,2,3) points to the + position 1,2,3. + + } + type="info" + style={{ marginBottom: 16 }} + /> { })); }; + toggleExpandForAllTrees = () => { + this.setState(prevState => { + const shouldBeCollapsed = !_.values(prevState.collapsedTreeIds).some(bool => bool); + + const collapsedTreeIds = shouldBeCollapsed + ? _.mapValues(this.props.skeletonTracing.trees, () => true) + : {}; + return { + collapsedTreeIds, + }; + }); + }; + toggleExpand = (treeId: number) => { this.setState(prevState => ({ collapsedTreeIds: update(prevState.collapsedTreeIds, { $toggle: [treeId] }), @@ -342,38 +355,43 @@ class CommentTabView extends React.PureComponent { searchKey="content" maxSearchResults={10} > - - - - - + - - - + this.handleChangeInput(evt, true)} onPressEnter={evt => evt.target.blur()} placeholder="Add comment" - style={{ width: "60%" }} + style={{ width: "50%" }} /> this.setMarkdownModalVisibility(true)} disabled={activeNodeMaybe.isNothing} type={isMultilineComment ? "primary" : "button"} - > - Markdown - - - - + icon="edit" + title="Open dialog to edit comment in multi-line mode" + /> + {this.renderSortIcon()} +