From fe57dea91e10bfdaad38efb4872bcc31e3093777 Mon Sep 17 00:00:00 2001 From: Arkajyoti Mukherjee <32966391+arkajyotiMukherjee@users.noreply.github.com> Date: Mon, 14 Sep 2020 23:28:08 +0530 Subject: [PATCH] validation bug fix, css fixes for release (#2069) - Bug fixes in multiple components - workflow name validation bug fixed Signed-off-by: arkajyotiMukherjee --- .../frontend/public/icons/LitmusLogo.svg | 12 ++++ .../frontend/public/icons/community.png | Bin 503 -> 0 bytes .../frontend/public/icons/setting.png | Bin 405 -> 0 bytes .../frontend/public/icons/workflows.png | Bin 598 -> 0 bytes .../src/components/InputField/index.tsx | 18 +++++- .../src/components/InputField/styles.ts | 4 +- .../frontend/src/components/SideBar/index.tsx | 21 +++--- .../frontend/src/components/SideBar/styles.ts | 4 +- .../frontend/src/components/Tabs/index.tsx | 4 +- .../frontend/src/pages/Community/index.tsx | 12 ++-- .../frontend/src/pages/Community/styles.ts | 7 +- .../frontend/src/pages/LoginPage/index.tsx | 2 +- .../frontend/src/pages/Settings/index.tsx | 16 +++-- .../frontend/src/pages/Settings/styles.ts | 8 +-- .../frontend/src/pages/Workflows/index.tsx | 14 ++-- .../frontend/src/pages/Workflows/styles.ts | 5 +- litmus-portal/frontend/src/svg/community.svg | 3 + litmus-portal/frontend/src/svg/home.svg | 3 + litmus-portal/frontend/src/svg/hub.svg | 7 ++ litmus-portal/frontend/src/svg/settings.svg | 5 ++ litmus-portal/frontend/src/svg/target.svg | 11 ++++ litmus-portal/frontend/src/svg/workflows.svg | 6 ++ litmus-portal/frontend/src/theme/index.tsx | 10 ++- litmus-portal/frontend/src/utils/validate.ts | 9 +++ .../ChaosWorkflows/BrowseWorkflow/styles.ts | 2 +- .../ChaosWorkflows/CustomStatus/Status.tsx | 5 +- .../CreateWorkflow/ChooseWorkflow/index.tsx | 60 +++++++++++------- .../AccountsTab/AccountSettings/styles.ts | 2 - .../TeammingTab/InviteNew/Invite/index.tsx | 4 +- .../TeammingTab/InviteNew/Invite/styles.ts | 4 +- .../Settings/TeammingTab/InviteNew/styles.ts | 1 - .../src/views/Settings/TeammingTab/styles.ts | 1 + .../UserManagement/index.tsx | 3 - .../UserManagement/styles.ts | 3 +- 34 files changed, 182 insertions(+), 84 deletions(-) create mode 100644 litmus-portal/frontend/public/icons/LitmusLogo.svg delete mode 100644 litmus-portal/frontend/public/icons/community.png delete mode 100644 litmus-portal/frontend/public/icons/setting.png delete mode 100644 litmus-portal/frontend/public/icons/workflows.png create mode 100644 litmus-portal/frontend/src/svg/community.svg create mode 100644 litmus-portal/frontend/src/svg/home.svg create mode 100644 litmus-portal/frontend/src/svg/hub.svg create mode 100644 litmus-portal/frontend/src/svg/settings.svg create mode 100644 litmus-portal/frontend/src/svg/target.svg create mode 100644 litmus-portal/frontend/src/svg/workflows.svg diff --git a/litmus-portal/frontend/public/icons/LitmusLogo.svg b/litmus-portal/frontend/public/icons/LitmusLogo.svg new file mode 100644 index 000000000..396007f94 --- /dev/null +++ b/litmus-portal/frontend/public/icons/LitmusLogo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/litmus-portal/frontend/public/icons/community.png b/litmus-portal/frontend/public/icons/community.png deleted file mode 100644 index 9dfe12aaa63aace19cfa794dfa5f6bf38fdfd658..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 503 zcmVA(!vB)jel7Ysr6 z@D98C?a#O0LpZQb=e>#u4kMI+&>svMU+|Bid78~(*|zNkrw;y3K!pmailALUpk)@g2e$$PM2%ivXN#GuyPb8L z7u<88Y9KkTH(3GEGK!M*Xw(YQ&J0+Z&+Fk4@NMdW!dU{a)heoJq`L7NZrbg!lXjMo zk2<>U_z{quey?$z3Hidqn$i9guI`mUH)gy)DX2Y-Q9W-J!vn|#?4s={WW31k2|(L4 z>4X{PQFyRK6lFxba@}bSAlV8H(wTqYjIrcdqNaeEDg@fs#;N!L&j7pKSt+I@%+2eV zvn1Th6UKhE$sKB_soc^6M5Pu+eR*Lb3gq^eCnrn=A_Zi*wcL86fl5L~%}^qrCXi21 tJ-1#uqDaX>hL9P2%Zh_IwjD$+{{nI2w2{j_4b%Vt002ovPDHLkV1f<+*bV>y diff --git a/litmus-portal/frontend/public/icons/setting.png b/litmus-portal/frontend/public/icons/setting.png deleted file mode 100644 index 4fede81844f4517fc03aa03a24ffb8152b921230..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 405 zcmV;G0c!q diff --git a/litmus-portal/frontend/public/icons/workflows.png b/litmus-portal/frontend/public/icons/workflows.png deleted file mode 100644 index 96af12e7f85cb38fc8cc6b226f9efd21a06b7a9a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 598 zcmV-c0;&CpP)27tqdnXzU?k1u*gUT?DFQ)iU^m^Z$#K8oLIjc&OKoOWuj|;D^#`piA znVZ(=CrHm&ghC~$tD=5+`J?Xg-ELIv^={vTQ1|!e*ygQ?H4@b!m5C_&R?Fp8%AmQz zWRNaZ^^c`$r1S>Rg%W)X_^A~|UpEdzhcs`yAeyKYtrR`jN27~nz|tmuol=E5)-e$~yY~XD zPEPXr&N~k@SBW__t(iOLxpjlA;^BGAMzUmo_OWqwHidKt9>wR4A}<<5&X}E|559=d z6j4vpj5{@1tvI%i9&7IP$G;#LI*ra%pyE5`!U?1py5)$kKfNvMgMBc$;XC@Gjp%wi zj%PnY;>x|Kga`HIgIfR&I3d*;h&wix%oscvlbRB$B_qkDeRK2Kdqe&HxMNAbVfzc< z+&6QQ3K#ZnTU;&@DK=I=V{A&h kKdPg!u9?Xi*gvuO3yBr{F42XBA^-pY07*qoM6N<$g1%}A5&!@I diff --git a/litmus-portal/frontend/src/components/InputField/index.tsx b/litmus-portal/frontend/src/components/InputField/index.tsx index d212a1286..b660a55a4 100644 --- a/litmus-portal/frontend/src/components/InputField/index.tsx +++ b/litmus-portal/frontend/src/components/InputField/index.tsx @@ -1,10 +1,10 @@ -import { TextField, OutlinedInputProps } from '@material-ui/core'; -import React, { useState } from 'react'; +import { OutlinedInputProps, TextField } from '@material-ui/core'; import IconButton from '@material-ui/core/IconButton'; import InputAdornment from '@material-ui/core/InputAdornment'; +import AccountCircle from '@material-ui/icons/AccountCircle'; import Visibility from '@material-ui/icons/Visibility'; import VisibilityOff from '@material-ui/icons/VisibilityOff'; -import AccountCircle from '@material-ui/icons/AccountCircle'; +import React, { useState } from 'react'; import { useStyles, useStylesLitmus } from './styles'; interface InputFieldProps { @@ -17,6 +17,7 @@ interface InputFieldProps { value: string; required?: boolean; iconType?: string | undefined; + styles?: Object; handleChange?: (event: React.ChangeEvent) => void; } @@ -27,6 +28,7 @@ const InputField: React.FC = ({ disabled, helperText, validationError, + styles, success, required, iconType, @@ -60,6 +62,7 @@ const InputField: React.FC = ({ required={required} onChange={handleChange} variant="filled" + style={styles} InputProps={ { classes, @@ -91,6 +94,7 @@ const InputField: React.FC = ({ type={showPassword ? 'text' : 'password'} required={required} onChange={handleChange} + style={styles} variant="filled" InputProps={ { @@ -123,6 +127,7 @@ const InputField: React.FC = ({ value={value} type={type} required={required} + style={styles} onChange={handleChange} variant="filled" InputProps={ @@ -148,6 +153,7 @@ const InputField: React.FC = ({ helperText={helperText} value={value} type={type} + style={styles} required={required} onChange={handleChange} variant="filled" @@ -173,6 +179,7 @@ const InputField: React.FC = ({ helperText={helperText} value={value} type={type} + style={styles} required={required} onChange={handleChange} variant="filled" @@ -203,6 +210,7 @@ const InputField: React.FC = ({ value={value} type={type} required={required} + style={styles} onChange={handleChange} variant="filled" InputProps={ @@ -228,6 +236,7 @@ const InputField: React.FC = ({ helperText={helperText} value={value} type={type} + style={styles} required={required} onChange={handleChange} variant="filled" @@ -253,6 +262,7 @@ const InputField: React.FC = ({ helperText={helperText} value={value} type={type} + style={styles} required={required} onChange={handleChange} variant="filled" @@ -284,6 +294,7 @@ const InputField: React.FC = ({ helperText={helperText} value={value} type={type} + style={styles} required={required} onChange={handleChange} variant="filled" @@ -317,6 +328,7 @@ const InputField: React.FC = ({ helperText={helperText} value={value} type={type} + style={styles} required={required} onChange={handleChange} variant="filled" diff --git a/litmus-portal/frontend/src/components/InputField/styles.ts b/litmus-portal/frontend/src/components/InputField/styles.ts index 2a9318276..5f3b02ef9 100644 --- a/litmus-portal/frontend/src/components/InputField/styles.ts +++ b/litmus-portal/frontend/src/components/InputField/styles.ts @@ -1,4 +1,4 @@ -import { makeStyles, createStyles, Theme, fade } from '@material-ui/core'; +import { createStyles, fade, makeStyles, Theme } from '@material-ui/core'; const useStylesLitmus = makeStyles((theme: Theme) => createStyles({ @@ -9,7 +9,6 @@ const useStylesLitmus = makeStyles((theme: Theme) => : `1px solid ${theme.palette.primary.dark}`, overflow: 'hidden', borderRadius: 4, - margin: '0 1rem', backgroundColor: theme.palette.common.white, transition: theme.transitions.create(['border-color', 'box-shadow']), '&$error': { @@ -81,6 +80,7 @@ const useStyles = makeStyles((theme) => ({ inputArea: { width: theme.spacing(45), marginTop: theme.spacing(1), + paddingLeft: theme.spacing(2), textDecoration: 'none', borderRadius: 3, }, diff --git a/litmus-portal/frontend/src/components/SideBar/index.tsx b/litmus-portal/frontend/src/components/SideBar/index.tsx index b5b277f64..47e2c782c 100644 --- a/litmus-portal/frontend/src/components/SideBar/index.tsx +++ b/litmus-portal/frontend/src/components/SideBar/index.tsx @@ -10,6 +10,10 @@ import { useSelector } from 'react-redux'; import { Link } from 'react-router-dom'; import { history } from '../../redux/configureStore'; import { RootState } from '../../redux/reducers'; +import { ReactComponent as CommunityIcon } from '../../svg/community.svg'; +import { ReactComponent as HomeIcon } from '../../svg/home.svg'; +import { ReactComponent as SettingsIcon } from '../../svg/settings.svg'; +import { ReactComponent as WorkflowsIcon } from '../../svg/workflows.svg'; import useStyles from './styles'; interface CustomisedListItemProps { @@ -66,7 +70,7 @@ const SideBar: React.FC = () => { }} label="Home" > - home + { }} label="Workflows" > - workflow + - {/* { - history.push('/404'); - }} - label="My Hub" - > - hub - */} { @@ -93,7 +88,7 @@ const SideBar: React.FC = () => { }} label="Community" > - community + {userRole === 'Owner' && ( { }} label="Settings" > - settings + )} diff --git a/litmus-portal/frontend/src/components/SideBar/styles.ts b/litmus-portal/frontend/src/components/SideBar/styles.ts index 867394c42..9164d660f 100644 --- a/litmus-portal/frontend/src/components/SideBar/styles.ts +++ b/litmus-portal/frontend/src/components/SideBar/styles.ts @@ -39,12 +39,14 @@ const useStyles = makeStyles((theme: Theme) => ({ '&:hover': { backgroundColor: theme.palette.secondary.light, color: theme.palette.getContrastText(theme.palette.primary.contrastText), + '& path': { + fill: theme.palette.common.white, + }, }, }, listIcon: { paddingLeft: theme.spacing(2), - alignSelf: 'center', }, listText: { marginLeft: theme.spacing(0), diff --git a/litmus-portal/frontend/src/components/Tabs/index.tsx b/litmus-portal/frontend/src/components/Tabs/index.tsx index 22195cc2f..e58f59d33 100644 --- a/litmus-portal/frontend/src/components/Tabs/index.tsx +++ b/litmus-portal/frontend/src/components/Tabs/index.tsx @@ -10,7 +10,7 @@ const TabPanel: React.FC = ({ children, index, value }) => { return (