[ARVADOS-WORKBENCH2] updated: 1.1.4-47-g488c558

Git user git at public.curoverse.com
Wed Jun 13 03:21:18 EDT 2018


Summary of changes:
 src/components/breadcrumbs/breadcrumbs.tsx            |  9 ++-------
 .../main-app-bar/dropdown-menu/dropdown-menu.tsx      |  7 ++-----
 src/components/main-app-bar/main-app-bar.tsx          |  2 +-
 src/components/main-app-bar/search-bar/search-bar.tsx | 19 +++++++++----------
 4 files changed, 14 insertions(+), 23 deletions(-)

       via  488c558be1f9b4a9aa48a06d43b97db0d8ff9101 (commit)
      from  040d25dbcc9ec46c4c21c945ccf02dcf1bf44c26 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 488c558be1f9b4a9aa48a06d43b97db0d8ff9101
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Wed Jun 13 09:10:11 2018 +0200

    Clean up main app bar and breadcrumbs code
    
    Feature #13590
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/components/breadcrumbs/breadcrumbs.tsx b/src/components/breadcrumbs/breadcrumbs.tsx
index a3f9462..7fa85ca 100644
--- a/src/components/breadcrumbs/breadcrumbs.tsx
+++ b/src/components/breadcrumbs/breadcrumbs.tsx
@@ -11,17 +11,12 @@ export interface Breadcrumb {
     label: string;
 }
 
-interface BreadcrumbsDataProps {
+interface BreadcrumbsProps {
     items: Breadcrumb[];
-}
-
-interface BreadcrumbsActionProps {
     onClick: (breadcrumb: Breadcrumb) => any;
 }
 
-type BreadcrumbsProps = BreadcrumbsDataProps & BreadcrumbsActionProps & WithStyles<CssRules>;
-
-class Breadcrumbs extends React.Component<BreadcrumbsProps> {
+class Breadcrumbs extends React.Component<BreadcrumbsProps & WithStyles<CssRules>> {
 
     render() {
         const { classes, onClick } = this.props;
diff --git a/src/components/main-app-bar/dropdown-menu/dropdown-menu.tsx b/src/components/main-app-bar/dropdown-menu/dropdown-menu.tsx
index 4ce2f59..4f2b83a 100644
--- a/src/components/main-app-bar/dropdown-menu/dropdown-menu.tsx
+++ b/src/components/main-app-bar/dropdown-menu/dropdown-menu.tsx
@@ -3,18 +3,15 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from 'react';
-import { Button, Grid, StyleRulesCallback, WithStyles, Menu, MenuItem, IconButton } from '@material-ui/core';
+import { Menu, IconButton } from '@material-ui/core';
 import { PopoverOrigin } from '@material-ui/core/Popover';
 
 
-interface DropdownMenuDataProps {
+interface DropdownMenuProps {
     id: string;
     icon: React.ComponentType;
 }
 
-
-type DropdownMenuProps = DropdownMenuDataProps;
-
 class DropdownMenu extends React.Component<DropdownMenuProps> {
 
     state = {
diff --git a/src/components/main-app-bar/main-app-bar.tsx b/src/components/main-app-bar/main-app-bar.tsx
index eb18fd1..4beea60 100644
--- a/src/components/main-app-bar/main-app-bar.tsx
+++ b/src/components/main-app-bar/main-app-bar.tsx
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from "react";
-import { AppBar, Toolbar, Typography, Grid, IconButton, Badge, Paper, Input, StyleRulesCallback, withStyles, WithStyles, Button, MenuItem } from "@material-ui/core";
+import { AppBar, Toolbar, Typography, Grid, IconButton, Badge, StyleRulesCallback, withStyles, WithStyles, Button, MenuItem } from "@material-ui/core";
 import NotificationsIcon from "@material-ui/icons/Notifications";
 import PersonIcon from "@material-ui/icons/Person";
 import HelpIcon from "@material-ui/icons/Help";
diff --git a/src/components/main-app-bar/search-bar/search-bar.tsx b/src/components/main-app-bar/search-bar/search-bar.tsx
index f9e93d6..62c8cc3 100644
--- a/src/components/main-app-bar/search-bar/search-bar.tsx
+++ b/src/components/main-app-bar/search-bar/search-bar.tsx
@@ -29,7 +29,7 @@ class SearchBar extends React.Component<SearchBarProps> {
         value: ""
     };
 
-    timeout: NodeJS.Timer;
+    timeout: number;
 
     render() {
         const { classes } = this.props;
@@ -71,7 +71,7 @@ class SearchBar extends React.Component<SearchBarProps> {
     handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
         clearTimeout(this.timeout);
         this.setState({ value: event.target.value });
-        this.timeout = setTimeout(
+        this.timeout = window.setTimeout(
             () => this.props.onSearch(this.state.value),
             this.props.debounce || DEFAULT_SEARCH_DEBOUNCE
         );
@@ -83,7 +83,6 @@ class SearchBar extends React.Component<SearchBarProps> {
 type CssRules = 'container' | 'input' | 'button';
 
 const styles: StyleRulesCallback<CssRules> = theme => {
-    const { unit } = theme.spacing;
     return {
         container: {
             position: 'relative',
@@ -91,18 +90,18 @@ const styles: StyleRulesCallback<CssRules> = theme => {
         },
         input: {
             border: 'none',
-            borderRadius: unit / 4,
+            borderRadius: theme.spacing.unit / 4,
             boxSizing: 'border-box',
-            padding: unit,
-            paddingRight: unit * 4,
+            padding: theme.spacing.unit,
+            paddingRight: theme.spacing.unit * 4,
             width: '100%',
         },
         button: {
             position: 'absolute',
-            top: unit / 2,
-            right: unit / 2,
-            width: unit * 3,
-            height: unit * 3
+            top: theme.spacing.unit / 2,
+            right: theme.spacing.unit / 2,
+            width: theme.spacing.unit * 3,
+            height: theme.spacing.unit * 3
         }
     };
 };

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list