From 0541a32ccefcb03d76523835603977a886f91b71 Mon Sep 17 00:00:00 2001 From: alex-krasn <64093224+alex-krasn@users.noreply.github.com> Date: Wed, 24 Jun 2020 11:37:37 -0700 Subject: [PATCH] disable selectionMark feature (#337) * disable selectionMark feature * refactor: normalizeFieldType - no need to comment it since it will never trigger --- .../components/common/tagInput/tagInput.scss | 7 ++++++- .../components/common/tagInput/tagInput.tsx | 7 +++++-- .../pages/editorPage/canvasCommandBar.tsx | 17 +++++++++-------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/react/components/common/tagInput/tagInput.scss b/src/react/components/common/tagInput/tagInput.scss index 483d414f..0a9235c7 100644 --- a/src/react/components/common/tagInput/tagInput.scss +++ b/src/react/components/common/tagInput/tagInput.scss @@ -275,5 +275,10 @@ div.circle-picker-container { } .loading-tag { - height: 100%; + height: 100%; +} + +// * temp disabling SelectionMark feature +.hidden { + display: none; } diff --git a/src/react/components/common/tagInput/tagInput.tsx b/src/react/components/common/tagInput/tagInput.tsx index cf6dea7b..95ae869c 100644 --- a/src/react/components/common/tagInput/tagInput.tsx +++ b/src/react/components/common/tagInput/tagInput.tsx @@ -503,8 +503,9 @@ export class TagInput extends React.Component { private getTagCategory = (tagType: string) => { switch (tagType) { - case FieldType.SelectionMark: - return "checkbox"; + // * temp disabling SelectionMark feature + // case FieldType.SelectionMark: + // return "checkbox"; default: return "text"; } @@ -665,6 +666,8 @@ export class TagInput extends React.Component { isChecked: type === tag.type, onClick: this.onTypeSelect, disabled: !isCompatible, + // * temp disabling SelectionMark feature + className: type === FieldType.SelectionMark ? "hidden" : "", } as IContextualMenuItem; }); } diff --git a/src/react/components/pages/editorPage/canvasCommandBar.tsx b/src/react/components/pages/editorPage/canvasCommandBar.tsx index d88f3068..e86ddde9 100644 --- a/src/react/components/pages/editorPage/canvasCommandBar.tsx +++ b/src/react/components/pages/editorPage/canvasCommandBar.tsx @@ -44,14 +44,15 @@ export const CanvasCommandBar: React.FunctionComponent = isChecked: props.layers["tables"], onClick: () => props.handleLayerChange("tables"), }, - { - key: "selectionMark", - text: strings.editorPage.canvas.canvasCommandBar.items.layers.subMenuItems.selectionMarks, - canCheck: true, - iconProps: { iconName: "CheckboxComposite" }, - isChecked: props.layers["checkboxes"], - onClick: () => props.handleLayerChange("checkboxes"), - }, + // * temp disabling SelectionMark feature + // { + // key: "selectionMark", + // text: strings.editorPage.canvas.canvasCommandBar.items.layers.subMenuItems.selectionMarks, + // canCheck: true, + // iconProps: { iconName: "CheckboxComposite" }, + // isChecked: props.layers["checkboxes"], + // onClick: () => props.handleLayerChange("checkboxes"), + // }, { key: "Label", text: strings.editorPage.canvas.canvasCommandBar.items.layers.subMenuItems.labels,