-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drag'n'drop import of multiple NML files (#2908)
* allow uploading multiple nmls via drag'n'drop into the tracing view * allow auto-grouping of nmls during import * merge old import-nml-button with new drag'n'drop flow; parallelize parsing * minor styling * update changelog * make code a bit more readable * improve error-handling for import of multiple NMLs; incorporate PR feedback * rewrite error-handling for nml import to satisfy flow * fix linting * rename variable
- Loading branch information
1 parent
6f6fb3a
commit fe1ca84
Showing
19 changed files
with
538 additions
and
63 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// @flow | ||
/* eslint-disable import/prefer-default-export */ | ||
|
||
type SetDropzoneModalVisibilityActionType = { | ||
type: "SET_DROPZONE_MODAL_VISIBILITY_ACTION_TYPE", | ||
visible: boolean, | ||
}; | ||
|
||
export type UiActionType = SetDropzoneModalVisibilityActionType; | ||
|
||
export const setDropzoneModalVisibilityAction = ( | ||
visible: boolean, | ||
): SetDropzoneModalVisibilityActionType => ({ | ||
type: "SET_DROPZONE_MODAL_VISIBILITY_ACTION_TYPE", | ||
visible, | ||
}); |
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
22 changes: 22 additions & 0 deletions
22
app/assets/javascripts/oxalis/model/reducers/ui_reducer.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,22 @@ | ||
// @flow | ||
|
||
import update from "immutability-helper"; | ||
import type { OxalisState } from "oxalis/store"; | ||
import type { ActionType } from "oxalis/model/actions/actions"; | ||
|
||
function UiReducer(state: OxalisState, action: ActionType): OxalisState { | ||
switch (action.type) { | ||
case "SET_DROPZONE_MODAL_VISIBILITY_ACTION_TYPE": { | ||
return update(state, { | ||
uiInformation: { | ||
showDropzoneModal: { $set: action.visible }, | ||
}, | ||
}); | ||
} | ||
|
||
default: | ||
return state; | ||
} | ||
} | ||
|
||
export default UiReducer; |
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
Oops, something went wrong.