-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multiple custom layouts for tracing views (#3299)
* added UI support, moving layout into store * made reset layout items in action bar into an own component; added active layout as state to action bar; reworked layout persistence to match new layout schema * moved layout into less file, moved persisting methods * changed layout, goldenlayout adapter no gets layout via a method, and active layout is resetable * added resetting, deleting, adding a new layout; added modal to enter new layout name * added modal * fixed import errors and added saving in local storage aber deleting and adding * corrected adding, deleting and resetting the layout * fixed linter error * fixed flow errors * using lodash to create deepcopy of stored layouts * v1.10.1 * modified yarn.lock -> added checksum? * removed unused comment; removed useless emit * Update CHANGELOG.md * Update CHANGELOG.md * applied requested feedback * removed lastActive from filtering layout names * fixed linting error * changed ui to indicate that layout are stored separately * fix default layout bug * some visual tweaks * made the code pretty * fixed typos and change toast to thrown error message * renamed labels for layout sub menu * fixed visual bug with the icons * removed bullet points from layout list
- Loading branch information
1 parent
b673829
commit 3c762e9
Showing
14 changed files
with
2,238 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
app/assets/javascripts/oxalis/view/action-bar/add_new_layout_modal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// @flow | ||
|
||
import * as React from "react"; | ||
import { Input, Modal } from "antd"; | ||
|
||
type Props = { | ||
addLayout: string => void, | ||
visible: boolean, | ||
onCancel: () => void, | ||
}; | ||
|
||
type State = { | ||
value: string, | ||
}; | ||
|
||
class AddNewLayoutModal extends React.PureComponent<Props, State> { | ||
state = { | ||
value: "", | ||
}; | ||
|
||
render() { | ||
return ( | ||
<Modal | ||
title="Add a new layout" | ||
visible={this.props.visible} | ||
onOk={() => { | ||
const value = this.state.value; | ||
this.setState({ value: "" }); | ||
this.props.addLayout(value); | ||
}} | ||
onCancel={this.props.onCancel} | ||
> | ||
<Input | ||
placeholder="Layout Name" | ||
value={this.state.value} | ||
onChange={evt => { | ||
this.setState({ value: evt.target.value }); | ||
}} | ||
/> | ||
</Modal> | ||
); | ||
} | ||
} | ||
|
||
export default AddNewLayoutModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.