You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/09/30 17:51:12 UTC

[GitHub] [druid] ccaominh commented on a change in pull request #10454: Web console: switch to switches instead of checkboxes

ccaominh commented on a change in pull request #10454:
URL: https://github.com/apache/druid/pull/10454#discussion_r497694299



##########
File path: web-console/src/components/menu-checkbox/menu-checkbox.tsx
##########
@@ -16,15 +16,26 @@
  * limitations under the License.
  */
 
-import { Checkbox, ICheckboxProps } from '@blueprintjs/core';
+import { MenuItem } from '@blueprintjs/core';
+import { IconNames } from '@blueprintjs/icons';
 import React from 'react';
 
-import './menu-checkbox.scss';
+export interface MenuCheckboxProps {
+  text: string;
+  checked: boolean;
+  onChange: () => void;
+}
+
+export function MenuCheckbox(props: MenuCheckboxProps) {
+  const { text, checked, onChange } = props;
 
-export function MenuCheckbox(props: ICheckboxProps) {
   return (
-    <li className="menu-checkbox">
-      <Checkbox {...props} />
-    </li>
+    <MenuItem
+      className="menu-checkbox"
+      icon={checked ? IconNames.TICK : IconNames.BLANK}

Review comment:
       If none of the menu items are checked, there's no visual clue that the menu item has a checkbox since it's blank. Maybe something like the `TICK CIRCLE` / `CIRCLE` icons could be used instead? Or, if this was changed to use the `Switch` component (like the other changes you made in the PR), would it have similar styling issues?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org