Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterate UI for AI job modal #7368

Merged
merged 33 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5640d14
WIP: renew ai job modal
dieknolle3333 Sep 29, 2023
cd6d3d9
trying out radio buttons but probably discarding
dieknolle3333 Sep 30, 2023
eeaf452
style radio button using card
dieknolle3333 Sep 30, 2023
282c56f
update store with new action
dieknolle3333 Oct 2, 2023
9e5faa2
Merge branch 'master' into ai-job-modal
dieknolle3333 Oct 2, 2023
11b9029
not pretty but working: first version of full modal
dieknolle3333 Oct 2, 2023
39a822a
improve code structure
dieknolle3333 Oct 5, 2023
9444b4d
use type for ai job modal state
dieknolle3333 Oct 6, 2023
157c19b
WIP: reintroduce description
dieknolle3333 Oct 6, 2023
ad6e369
style disclaimer
dieknolle3333 Oct 6, 2023
3b0b9ef
WIP: improve spacing
dieknolle3333 Oct 7, 2023
6fd003d
remove dev remnants and style modal some more
dieknolle3333 Oct 9, 2023
29ad42e
refactor code
dieknolle3333 Oct 9, 2023
7d3abc5
improve styling and design
dieknolle3333 Oct 9, 2023
eae3b0d
trying to fix materialize volume modal
dieknolle3333 Oct 9, 2023
93f6407
Merge branch 'master' into ai-job-modal
dieknolle3333 Oct 9, 2023
1ca1565
fix materialize volume annotation
dieknolle3333 Oct 9, 2023
254d395
add changelog and rename
dieknolle3333 Oct 9, 2023
19369ef
improve start modal state, rename classes
dieknolle3333 Oct 10, 2023
313060a
Fix triggering of volume annotation materialization.
daniel-wer Oct 10, 2023
268e3de
address code review
dieknolle3333 Oct 16, 2023
ca8295c
improve select title
dieknolle3333 Oct 16, 2023
7a94d35
diable AI button without color layer and propose whole-layer-bb
dieknolle3333 Oct 17, 2023
013f50f
merge master
dieknolle3333 Oct 17, 2023
6d70123
format code and remove comment
dieknolle3333 Oct 18, 2023
2f92e49
downsample images
dieknolle3333 Oct 18, 2023
be1d657
chnage docs
dieknolle3333 Oct 18, 2023
19e12fd
improve wording in docs and always propose whole layer bounding box
dieknolle3333 Oct 19, 2023
83fc117
Merge branch 'master' into ai-job-modal
dieknolle3333 Oct 19, 2023
985fec0
merge master
dieknolle3333 Oct 23, 2023
b886458
lint
dieknolle3333 Oct 23, 2023
334d9ba
remove wrapper
dieknolle3333 Oct 23, 2023
4725215
Merge branch 'master' into ai-job-modal
dieknolle3333 Oct 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released

### Changed
- Updated backend code to Scala 2.13, with upgraded Dependencies for optimized performance. [#7327](https://github.com/scalableminds/webknossos/pull/7327)
- Improved user interface to start automatic AI analysis. [#7368](https://github.com/scalableminds/webknossos/pull/7368)

### Fixed
- Fixed that segment statistics were requested in the wrong resolution and without properly considering the dataset scale. [#7355](https://github.com/scalableminds/webknossos/pull/7355)
Expand Down
3 changes: 1 addition & 2 deletions frontend/javascripts/oxalis/default_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,7 @@ const defaultState: OxalisState = {
showVersionRestore: false,
showDownloadModal: false,
showPythonClientModal: false,
showAINucleiSegmentationModal: false,
showAINeuronSegmentationModal: false,
aIJobModalState: "invisible",
showShareModal: false,
storedLayouts: {},
isImportingMesh: false,
Expand Down
22 changes: 6 additions & 16 deletions frontend/javascripts/oxalis/model/actions/ui_actions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { AnnotationTool } from "oxalis/constants";
import type { OxalisState, BorderOpenStatus, Theme } from "oxalis/store";
import { StartAIJobModalState } from "oxalis/view/action-bar/starting_job_modals";

type SetDropzoneModalVisibilityAction = ReturnType<typeof setDropzoneModalVisibilityAction>;
type SetVersionRestoreVisibilityAction = ReturnType<typeof setVersionRestoreVisibilityAction>;
Expand All @@ -15,12 +16,7 @@ type SetDownloadModalVisibilityAction = ReturnType<typeof setDownloadModalVisibi
type SetShareModalVisibilityAction = ReturnType<typeof setShareModalVisibilityAction>;
type SetBusyBlockingInfoAction = ReturnType<typeof setBusyBlockingInfoAction>;
type SetPythonClientModalVisibilityAction = ReturnType<typeof setPythonClientModalVisibilityAction>;
type SetAINucleiSegmentationModalVisibilityAction = ReturnType<
typeof setAINucleiSegmentationModalVisibilityAction
>;
type SetAINeuronSegmentationModalVisibilityAction = ReturnType<
typeof setAINeuronSegmentationModalVisibilityAction
>;
type SetAIJobModalStateAction = ReturnType<typeof setAIJobModalStateAction>;
export type EnterAction = ReturnType<typeof enterAction>;
export type EscapeAction = ReturnType<typeof escapeAction>;
export type SetQuickSelectStateAction = ReturnType<typeof setQuickSelectStateAction>;
Expand All @@ -40,8 +36,7 @@ export type UiAction =
| SetDownloadModalVisibilityAction
| SetPythonClientModalVisibilityAction
| SetShareModalVisibilityAction
| SetAINucleiSegmentationModalVisibilityAction
| SetAINeuronSegmentationModalVisibilityAction
| SetAIJobModalStateAction
| SetBusyBlockingInfoAction
| EnterAction
| EscapeAction
Expand Down Expand Up @@ -108,15 +103,10 @@ export const setShareModalVisibilityAction = (visible: boolean) =>
type: "SET_SHARE_MODAL_VISIBILITY",
visible,
} as const);
export const setAINucleiSegmentationModalVisibilityAction = (visible: boolean) =>
export const setAIJobModalStateAction = (state: StartAIJobModalState) =>
({
type: "SET_AI_NUCLEI_SEGMENTATION_MODAL_VISIBILITY",
visible,
} as const);
export const setAINeuronSegmentationModalVisibilityAction = (visible: boolean) =>
({
type: "SET_AI_NEURON_SEGMENTATION_MODAL_VISIBILITY",
visible,
type: "SET_AI_JOB_MODAL_STATE",
state,
} as const);
export const setBusyBlockingInfoAction = (isBusy: boolean, reason?: string) =>
({
Expand Down
10 changes: 2 additions & 8 deletions frontend/javascripts/oxalis/model/reducers/ui_reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,9 @@ function UiReducer(state: OxalisState, action: Action): OxalisState {
});
}

case "SET_AI_NUCLEI_SEGMENTATION_MODAL_VISIBILITY": {
case "SET_AI_JOB_MODAL_STATE": {
return updateKey(state, "uiInformation", {
showAINucleiSegmentationModal: action.visible,
});
}

case "SET_AI_NEURON_SEGMENTATION_MODAL_VISIBILITY": {
return updateKey(state, "uiInformation", {
showAINeuronSegmentationModal: action.visible,
aIJobModalState: action.state,
});
}

Expand Down
4 changes: 2 additions & 2 deletions frontend/javascripts/oxalis/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ import reduceReducers from "oxalis/model/helpers/reduce_reducers";
import ConnectomeReducer from "oxalis/model/reducers/connectome_reducer";
import { SaveQueueType } from "./model/actions/save_actions";
import OrganizationReducer from "./model/reducers/organization_reducer";
import { StartAIJobModalState } from "./view/action-bar/starting_job_modals";

export type MutableCommentType = {
content: string;
Expand Down Expand Up @@ -511,8 +512,7 @@ type UiInformation = {
readonly showDownloadModal: boolean;
readonly showPythonClientModal: boolean;
readonly showShareModal: boolean;
readonly showAINucleiSegmentationModal: boolean;
readonly showAINeuronSegmentationModal: boolean;
readonly aIJobModalState: StartAIJobModalState;
readonly activeTool: AnnotationTool;
readonly storedLayouts: Record<string, any>;
readonly isImportingMesh: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
BoundingBoxSelection,
getReadableNameOfVolumeLayer,
MagSlider,
} from "oxalis/view/right-border-tabs/starting_job_modals";
} from "oxalis/view/action-bar/starting_job_modals";
import { getUserBoundingBoxesFromState } from "oxalis/model/accessors/tracing_accessor";
import {
getVolumeTracingById,
Expand Down
Loading