Skip to content

Commit 877e457

Browse files
Revert "Command palette (#8392)" (#8446)
This reverts commit 196b946.
1 parent 369630a commit 877e457

20 files changed

+284
-916
lines changed

CHANGELOG.unreleased.md

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
1111
[Commits](https://github.com/scalableminds/webknossos/compare/25.02.1...HEAD)
1212

1313
### Added
14-
- Added a command palette that allows navigating between pages, switching tools and accessing some user settings via Ctrl+K. [#8392](https://github.com/scalableminds/webknossos/pull/8392/)
1514
- Failed jobs may be retried by super-users. [#8377](https://github.com/scalableminds/webknossos/pull/8377)
1615

1716
### Changed

frontend/javascripts/libs/utils.ts

-7
Original file line numberDiff line numberDiff line change
@@ -1300,10 +1300,3 @@ export function generateRandomId(length: number) {
13001300
}
13011301
return result;
13021302
}
1303-
1304-
export function getPhraseFromCamelCaseString(stringInCamelCase: string): string {
1305-
return stringInCamelCase
1306-
.split(/(?=[A-Z])/)
1307-
.map((word) => capitalize(word.replace(/(^|\s)td/, "$13D")))
1308-
.join(" ");
1309-
}

frontend/javascripts/navbar.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function getCollapsibleMenuTitle(
200200
);
201201
}
202202

203-
export function getAdministrationSubMenu(collapse: boolean, activeUser: APIUser) {
203+
function getAdministrationSubMenu(collapse: boolean, activeUser: APIUser) {
204204
const isAdmin = Utils.isUserAdmin(activeUser);
205205
const isAdminOrTeamManager = Utils.isUserAdminOrTeamManager(activeUser);
206206
const organization = activeUser.organization;
@@ -245,7 +245,7 @@ export function getAdministrationSubMenu(collapse: boolean, activeUser: APIUser)
245245

246246
if (isAdmin) {
247247
adminstrationSubMenuItems.push({
248-
key: `/organizations/${organization}`,
248+
key: "/organization",
249249
label: <Link to={`/organizations/${organization}`}>Organization</Link>,
250250
});
251251
}

frontend/javascripts/oxalis/default_state.ts

-3
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,6 @@ const defaultState: OxalisState = {
232232
showDropzoneModal: false,
233233
showVersionRestore: false,
234234
showDownloadModal: false,
235-
showAddScriptModal: false,
236-
showMergeAnnotationModal: false,
237-
showZarrPrivateLinksModal: false,
238235
showPythonClientModal: false,
239236
aIJobModalState: "invisible",
240237
showRenderAnimationModal: false,

frontend/javascripts/oxalis/model/accessors/tool_accessor.ts

-24
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,6 @@ import { reuseInstanceOnEquality } from "./accessor_helpers";
2121
import { getTransformsPerLayer } from "./dataset_layer_transformation_accessor";
2222
import { isSkeletonLayerTransformed } from "./skeletontracing_accessor";
2323

24-
export const TOOL_NAMES = {
25-
MOVE: "Move",
26-
SKELETON: "Skeleton",
27-
BRUSH: "Brush",
28-
ERASE_BRUSH: "Erase (via Brush)",
29-
TRACE: "Trace",
30-
ERASE_TRACE: "Erase",
31-
FILL_CELL: "Fill Tool",
32-
PICK_CELL: "Segment Picker",
33-
QUICK_SELECT: "Quick Select Tool",
34-
BOUNDING_BOX: "Bounding Box Tool",
35-
PROOFREAD: "Proofreading Tool",
36-
LINE_MEASUREMENT: "Measurement Tool",
37-
AREA_MEASUREMENT: "Area Measurement Tool",
38-
};
39-
4024
const zoomInToUseToolMessage =
4125
"Please zoom in further to use this tool. If you want to edit volume data on this zoom level, create an annotation with restricted magnifications from the extended annotation menu in the dashboard.";
4226

@@ -425,11 +409,3 @@ export function adaptActiveToolToShortcuts(
425409

426410
return activeTool;
427411
}
428-
429-
export const getLabelForTool = (tool: AnnotationTool) => {
430-
const toolName = TOOL_NAMES[tool];
431-
if (toolName.endsWith("Tool")) {
432-
return toolName;
433-
}
434-
return `${toolName} Tool`;
435-
};

frontend/javascripts/oxalis/model/actions/ui_actions.ts

-21
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ type SetGlobalProgressAction = ReturnType<typeof setGlobalProgressAction>;
3434
type SetRenderAnimationModalVisibilityAction = ReturnType<
3535
typeof setRenderAnimationModalVisibilityAction
3636
>;
37-
type SetUserScriptsModalVisibilityAction = ReturnType<typeof setUserScriptsModalVisibilityAction>;
38-
type SetZarrLinksModalVisibilityAction = ReturnType<typeof setZarrLinksModalVisibilityAction>;
39-
type SetMergeModalVisibilityAction = ReturnType<typeof setMergeModalVisibilityAction>;
4037

4138
export type UiAction =
4239
| SetDropzoneModalVisibilityAction
@@ -54,9 +51,6 @@ export type UiAction =
5451
| SetShareModalVisibilityAction
5552
| SetAIJobModalStateAction
5653
| SetRenderAnimationModalVisibilityAction
57-
| SetMergeModalVisibilityAction
58-
| SetUserScriptsModalVisibilityAction
59-
| SetZarrLinksModalVisibilityAction
6054
| SetBusyBlockingInfoAction
6155
| SetIsWkReadyAction
6256
| EnterAction
@@ -142,21 +136,6 @@ export const setRenderAnimationModalVisibilityAction = (visible: boolean) =>
142136
type: "SET_CREATE_ANIMATION_MODAL_VISIBILITY",
143137
visible,
144138
}) as const;
145-
export const setMergeModalVisibilityAction = (visible: boolean) =>
146-
({
147-
type: "SET_MERGE_MODAL_VISIBILITY",
148-
visible,
149-
}) as const;
150-
export const setUserScriptsModalVisibilityAction = (visible: boolean) =>
151-
({
152-
type: "SET_USER_SCRIPTS_MODAL_VISIBILITY",
153-
visible,
154-
}) as const;
155-
export const setZarrLinksModalVisibilityAction = (visible: boolean) =>
156-
({
157-
type: "SET_ZARR_LINKS_MODAL_VISIBILITY",
158-
visible,
159-
}) as const;
160139
export const setBusyBlockingInfoAction = (isBusy: boolean, reason?: string) =>
161140
({
162141
type: "SET_BUSY_BLOCKING_INFO_ACTION",

frontend/javascripts/oxalis/model/reducers/ui_reducer.ts

-18
Original file line numberDiff line numberDiff line change
@@ -106,24 +106,6 @@ function UiReducer(state: OxalisState, action: Action): OxalisState {
106106
});
107107
}
108108

109-
case "SET_MERGE_MODAL_VISIBILITY": {
110-
return updateKey(state, "uiInformation", {
111-
showMergeAnnotationModal: action.visible,
112-
});
113-
}
114-
115-
case "SET_USER_SCRIPTS_MODAL_VISIBILITY": {
116-
return updateKey(state, "uiInformation", {
117-
showAddScriptModal: action.visible,
118-
});
119-
}
120-
121-
case "SET_ZARR_LINKS_MODAL_VISIBILITY": {
122-
return updateKey(state, "uiInformation", {
123-
showZarrPrivateLinksModal: action.visible,
124-
});
125-
}
126-
127109
case "SET_CREATE_ANIMATION_MODAL_VISIBILITY": {
128110
return updateKey(state, "uiInformation", {
129111
showRenderAnimationModal: action.visible,

frontend/javascripts/oxalis/store.ts

-3
Original file line numberDiff line numberDiff line change
@@ -538,9 +538,6 @@ type UiInformation = {
538538
readonly showDownloadModal: boolean;
539539
readonly showPythonClientModal: boolean;
540540
readonly showShareModal: boolean;
541-
readonly showMergeAnnotationModal: boolean;
542-
readonly showZarrPrivateLinksModal: boolean;
543-
readonly showAddScriptModal: boolean;
544541
readonly aIJobModalState: StartAIJobModalState;
545542
readonly showRenderAnimationModal: boolean;
546543
readonly activeTool: AnnotationTool;

frontend/javascripts/oxalis/view/action-bar/toolbar_view.tsx

+16-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import {
4040
} from "oxalis/constants";
4141
import { getActiveTree } from "oxalis/model/accessors/skeletontracing_accessor";
4242
import {
43-
TOOL_NAMES,
4443
adaptActiveToolToShortcuts,
4544
getDisabledInfoForTools,
4645
} from "oxalis/model/accessors/tool_accessor";
@@ -832,6 +831,22 @@ function calculateMediumBrushSize(maximumBrushSize: number) {
832831
return Math.ceil((maximumBrushSize - userSettings.brushSize.minimum) / 10) * 5;
833832
}
834833

834+
const TOOL_NAMES = {
835+
MOVE: "Move",
836+
SKELETON: "Skeleton",
837+
BRUSH: "Brush",
838+
ERASE_BRUSH: "Erase (via Brush)",
839+
TRACE: "Trace",
840+
ERASE_TRACE: "Erase",
841+
FILL_CELL: "Fill Tool",
842+
PICK_CELL: "Segment Picker",
843+
QUICK_SELECT: "Quick Select Tool",
844+
BOUNDING_BOX: "Bounding Box Tool",
845+
PROOFREAD: "Proofreading Tool",
846+
LINE_MEASUREMENT: "Measurement Tool",
847+
AREA_MEASUREMENT: "Area Measurement Tool",
848+
};
849+
835850
export default function ToolbarView({ isReadOnly }: { isReadOnly: boolean }) {
836851
const dispatch = useDispatch();
837852
const hasVolume = useSelector((state: OxalisState) => state.tracing?.volumes.length > 0);

0 commit comments

Comments
 (0)