From 5e043d5c9f4dbc6dae48c2203d782cf419290209 Mon Sep 17 00:00:00 2001 From: Shawn O'Connor Date: Tue, 18 Jun 2024 10:10:05 -0500 Subject: [PATCH 01/11] VADC-1158: Update Team Projects Modal for use case where user does not have teams available (#1553) --- .../TeamProjectModal/TeamProjectModal.jsx | 108 +++++++++++------- .../TeamProjectModal.stories.jsx | 3 + 2 files changed, 71 insertions(+), 40 deletions(-) diff --git a/src/Analysis/SharedUtils/TeamProject/TeamProjectModal/TeamProjectModal.jsx b/src/Analysis/SharedUtils/TeamProject/TeamProjectModal/TeamProjectModal.jsx index f8f64037ff..54ce5fbeea 100644 --- a/src/Analysis/SharedUtils/TeamProject/TeamProjectModal/TeamProjectModal.jsx +++ b/src/Analysis/SharedUtils/TeamProject/TeamProjectModal/TeamProjectModal.jsx @@ -5,6 +5,7 @@ import { } from 'antd'; import LoadingErrorMessage from '../../LoadingErrorMessage/LoadingErrorMessage'; import './TeamProjectModal.css'; +import { useHistory } from 'react-router-dom'; const TeamProjectModal = ({ isModalOpen, @@ -15,32 +16,18 @@ const TeamProjectModal = ({ selectedTeamProject, setSelectedTeamProject, }) => { + const history = useHistory(); const closeAndUpdateTeamProject = () => { setIsModalOpen(false); setBannerText(selectedTeamProject); localStorage.setItem('teamProject', selectedTeamProject); }; - - let modalContent = ( - -
- Retrieving the list of team projects. -
- Please wait... -
-
- ); + const redirectToHomepage = () => { + history.push('/'); + }; if (status === 'error') { - modalContent = ( + return ( 0) { + return ( + setIsModalOpen(false)} + closable={localStorage.getItem('teamProject')} + maskClosable={localStorage.getItem('teamProject')} + keyboard={localStorage.getItem('teamProject')} + footer={[ + , + ]} + > +
+ Please select your team. +
+ setSelectedTeamProject(e.value)} - placeholder='-select one of the team projects below-' - fieldNames={{ label: 'teamName', value: 'teamName' }} - options={data.teams} - dropdownStyle={{ width: '100%' }} - />
); } - return {modalContent}; + return ( + +
+ Retrieving the list of team projects. +
+ Please wait... +
+
+ ); }; TeamProjectModal.propTypes = { diff --git a/src/Analysis/SharedUtils/TeamProject/TeamProjectModal/TeamProjectModal.stories.jsx b/src/Analysis/SharedUtils/TeamProject/TeamProjectModal/TeamProjectModal.stories.jsx index b89572567b..075c6142f3 100644 --- a/src/Analysis/SharedUtils/TeamProject/TeamProjectModal/TeamProjectModal.stories.jsx +++ b/src/Analysis/SharedUtils/TeamProject/TeamProjectModal/TeamProjectModal.stories.jsx @@ -40,3 +40,6 @@ MockedLoading.args = { ...successArgs, status: 'loading', data: null }; export const MockedError = Template.bind({}); MockedError.args = { ...successArgs, status: 'error', data: null }; + +export const MockedNoTeams = Template.bind({}); +MockedNoTeams.args = { ...successArgs, data: {teams: []} }; From 378bb2f4f7ccd5a096f9d4e2ff5255163cd2abe4 Mon Sep 17 00:00:00 2001 From: Shawn O'Connor Date: Thu, 20 Jun 2024 11:43:40 -0500 Subject: [PATCH 02/11] VADC-293: Refactor use of inline SVG to use SVG utils for Chart Icons in GWAS --- .../AttritionTable/AttritionTableRow.jsx | 8 +++---- .../ChartIcons/EulerDiagram.jsx | 22 ------------------- .../icons/gwas-icons/barChart.svg} | 9 ++------ src/img/icons/gwas-icons/eulerDiagram.svg | 16 ++++++++++++++ src/img/icons/index.jsx | 8 +++++++ 5 files changed, 30 insertions(+), 33 deletions(-) delete mode 100644 src/Analysis/GWASApp/Components/AttritionTableWrapper/ChartIcons/EulerDiagram.jsx rename src/{Analysis/GWASApp/Components/AttritionTableWrapper/ChartIcons/BarChart.jsx => img/icons/gwas-icons/barChart.svg} (93%) create mode 100644 src/img/icons/gwas-icons/eulerDiagram.svg diff --git a/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTableRow.jsx b/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTableRow.jsx index e33cf873ce..74f2a013c6 100644 --- a/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTableRow.jsx +++ b/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTableRow.jsx @@ -4,8 +4,8 @@ import { useQuery } from 'react-query'; import { Spin } from 'antd'; import { fetchConceptStatsByHareSubset } from '../../../Utils/cohortMiddlewareApi'; import queryConfig from '../../../../SharedUtils/QueryConfig'; -import BarChart from '../ChartIcons/BarChart'; -import EulerDiagram from '../ChartIcons/EulerDiagram'; +import IconComponent from '../../../../../components/Icon'; +import dictIcons from '../../../../../img/icons/index'; import { useSourceContext } from '../../../Utils/Source'; const AttritionTableRow = ({ @@ -87,10 +87,10 @@ const AttritionTableRow = ({ const determineChartIcon = () => { if (rowType === 'Covariate' || rowType === 'Outcome') { if (rowObject.variable_type === 'concept') { - return ; + return ; } if (rowObject.variable_type === 'custom_dichotomous') { - return ; + return ; } throw new Error( `Invalid Row Type: ${rowType} and rowObject.variable_type ${JSON.stringify( diff --git a/src/Analysis/GWASApp/Components/AttritionTableWrapper/ChartIcons/EulerDiagram.jsx b/src/Analysis/GWASApp/Components/AttritionTableWrapper/ChartIcons/EulerDiagram.jsx deleted file mode 100644 index 73d5715e8b..0000000000 --- a/src/Analysis/GWASApp/Components/AttritionTableWrapper/ChartIcons/EulerDiagram.jsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; - -const EulerDiagram = () => ( - - An icon of a Euler Diagram - - -); - -export default EulerDiagram; diff --git a/src/Analysis/GWASApp/Components/AttritionTableWrapper/ChartIcons/BarChart.jsx b/src/img/icons/gwas-icons/barChart.svg similarity index 93% rename from src/Analysis/GWASApp/Components/AttritionTableWrapper/ChartIcons/BarChart.jsx rename to src/img/icons/gwas-icons/barChart.svg index f571633b47..a705e488f1 100644 --- a/src/Analysis/GWASApp/Components/AttritionTableWrapper/ChartIcons/BarChart.jsx +++ b/src/img/icons/gwas-icons/barChart.svg @@ -1,7 +1,4 @@ -import React from 'react'; - -const BarChart = () => ( - ( /> -); - -export default BarChart; + \ No newline at end of file diff --git a/src/img/icons/gwas-icons/eulerDiagram.svg b/src/img/icons/gwas-icons/eulerDiagram.svg new file mode 100644 index 0000000000..a08ab3b73d --- /dev/null +++ b/src/img/icons/gwas-icons/eulerDiagram.svg @@ -0,0 +1,16 @@ + +An icon of a Euler Diagram + + diff --git a/src/img/icons/index.jsx b/src/img/icons/index.jsx index f1a9769ada..6e847e3f1c 100644 --- a/src/img/icons/index.jsx +++ b/src/img/icons/index.jsx @@ -43,8 +43,16 @@ import IcoAcctPlanning from './acct-icons/acct-planning.svg'; import IcoAcctAccess from './acct-icons/acct-access.svg'; import IcoAcctExplore from './acct-icons/acct-explore.svg'; import IcoAcctAnalyze from './acct-icons/acct-analyze.svg'; +import GWASBarChart from './gwas-icons/barChart.svg'; +import GWASEulerDiagram from './gwas-icons/eulerDiagram.svg'; const dictIcons = { + 'gwas-barChart': (height, customedStyles) => ( + + ), + 'gwas-eulerDiagram': (height, customedStyles) => ( + + ), analysis: (height, customedStyles) => ( Date: Thu, 20 Jun 2024 17:11:32 -0500 Subject: [PATCH 03/11] VADC-293: Refactor use of inline SVG to use CSS --- .../AtlasDataDictionary.css | 24 ++++++++++++++----- .../Components/ColumnHeaders/Header.tsx | 10 ++------ .../Components/Icons/CaretDown.tsx | 18 -------------- .../Components/Icons/CaretUp.tsx | 18 -------------- 4 files changed, 20 insertions(+), 50 deletions(-) delete mode 100644 src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/CaretDown.tsx delete mode 100644 src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/CaretUp.tsx diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionary.css b/src/Analysis/AtlasDataDictionary/AtlasDataDictionary.css index d3da98cd8c..c097335d64 100644 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionary.css +++ b/src/Analysis/AtlasDataDictionary/AtlasDataDictionary.css @@ -103,14 +103,26 @@ margin-top: 4px; } -.atlas-data-dictionary-container .table-column-sorter-down svg path, -.atlas-data-dictionary-container .table-column-sorter-up svg path { - fill: #ccc; +.atlas-data-dictionary-container .table-column-sorter-down, +.atlas-data-dictionary-container .table-column-sorter-up { + width: 0; + height: 0; + border-left: 5px solid transparent; + border-right: 5px solid transparent; +} + +.atlas-data-dictionary-container .table-column-sorter-down { + border-top: 5px solid #ccc; +} +.atlas-data-dictionary-container .table-column-sorter-down.active { + border-top-color: #1890ff; } -.atlas-data-dictionary-container .table-column-sorter-down.active svg path, -.atlas-data-dictionary-container .table-column-sorter-up.active svg path { - fill: #1890ff; +.atlas-data-dictionary-container .table-column-sorter-up { + border-bottom: 5px solid #ccc; +} +.atlas-data-dictionary-container .table-column-sorter-up.active { + border-bottom-color: #1890ff; } /* Expandable rows */ diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/ColumnHeaders/Header.tsx b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/ColumnHeaders/Header.tsx index 5d21d4de12..902f1b1763 100644 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/ColumnHeaders/Header.tsx +++ b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/ColumnHeaders/Header.tsx @@ -1,7 +1,5 @@ import React from 'react'; import { ISortConfig } from '../../Interfaces/Interfaces'; -import CaretUp from '../Icons/CaretUp'; -import CaretDown from '../Icons/CaretDown'; interface IHeaderProps { handleSort: Function; @@ -47,18 +45,14 @@ const Header = ({ className={`table-column-sorter-up ${ getSortDirectionForCurrentColumn() === 'ascending' && 'active' }`} - > - - + /> - - + /> diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/CaretDown.tsx b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/CaretDown.tsx deleted file mode 100644 index 20ad334dea..0000000000 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/CaretDown.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; - -const CaretDown = (): JSX.Element => ( - - - -); - -export default CaretDown; diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/CaretUp.tsx b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/CaretUp.tsx deleted file mode 100644 index d0dd910f9f..0000000000 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/CaretUp.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; - -const CaretUp = (): JSX.Element => ( - - - -); - -export default CaretUp; From cc2760013d033de1374c2ae7170106405b0be3cb Mon Sep 17 00:00:00 2001 From: Shawn O'Connor Date: Fri, 21 Jun 2024 12:19:48 -0500 Subject: [PATCH 04/11] VADC-293: Refactor use of inline SVG to use CSS --- .../AtlasDataDictionary.css | 16 ++++++++++++ .../Components/Icons/CollapseIcon.tsx | 24 ----------------- .../Components/Icons/ExpandIcon.tsx | 26 ------------------- .../Components/TableRow/TableRow.tsx | 8 +++--- 4 files changed, 20 insertions(+), 54 deletions(-) delete mode 100644 src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/CollapseIcon.tsx delete mode 100644 src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/ExpandIcon.tsx diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionary.css b/src/Analysis/AtlasDataDictionary/AtlasDataDictionary.css index c097335d64..ea7da6b678 100644 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionary.css +++ b/src/Analysis/AtlasDataDictionary/AtlasDataDictionary.css @@ -173,6 +173,22 @@ background: none; } +.arrow-icon { + display: block; + width: 9px; + height: 9px; + margin: 5px; + border-top: 2px solid #2e77b8; + border-left: 2px solid #2e77b8; +} + +.arrow-icon-right { + transform: rotate(135deg); +} +.arrow-icon-down { + transform: rotate(225deg); +} + .atlas-data-dictionary-container .search-highlight, table > tbody > tr > td.search-highlight:last-of-type { background: #fcefe4; diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/CollapseIcon.tsx b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/CollapseIcon.tsx deleted file mode 100644 index e95001b5d2..0000000000 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/CollapseIcon.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; - -const CollapseIcon = () => ( - - - - - - - -); - -export default CollapseIcon; diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/ExpandIcon.tsx b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/ExpandIcon.tsx deleted file mode 100644 index 06c5c5e7dc..0000000000 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/ExpandIcon.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; - -const ExpandIcon = () => ( - - - - - - - - - -); - -export default ExpandIcon; diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/TableRow/TableRow.tsx b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/TableRow/TableRow.tsx index 9e670525a0..7f95aaf753 100644 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/TableRow/TableRow.tsx +++ b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/TableRow/TableRow.tsx @@ -5,8 +5,6 @@ import { IRowData, IColumnManagementData, } from '../../Interfaces/Interfaces'; -import ExpandIcon from '../Icons/ExpandIcon'; -import CollapseIcon from '../Icons/CollapseIcon'; import { checkIfCellContainsSearchTerm, checkIfHiddenCellsContainSearchTerm, @@ -63,8 +61,9 @@ const TableRow = ({ size='xs' compact onClick={() => handleTableChange('openDropdown', rowObject.rowID)} + aria-label='expand' > - + )} {currentDropdownShouldBeOpen && ( @@ -73,8 +72,9 @@ const TableRow = ({ size='xs' compact onClick={() => handleTableChange('closeDropdown', rowObject.rowID)} + aria-label='collapse' > - + )} From 128c875d090997ab0352c6dc90dd1b6b365919be Mon Sep 17 00:00:00 2001 From: Shawn O'Connor Date: Fri, 21 Jun 2024 12:22:06 -0500 Subject: [PATCH 05/11] Empty-Commit From b8d3f460ef32204edf469d7f5bae75e6502ec1b8 Mon Sep 17 00:00:00 2001 From: Shawn O'Connor Date: Tue, 9 Jul 2024 16:23:59 -0500 Subject: [PATCH 06/11] VADC-293: add eyeIcon to icons --- .../Components/Icons/EyeIcon.tsx | 12 ------------ .../SearchBar/SearchBarMessage/SearchBarMessage.tsx | 5 +++-- src/img/icons/gwas-icons/eyeIcon.svg | 6 ++++++ src/img/icons/index.jsx | 4 ++++ 4 files changed, 13 insertions(+), 14 deletions(-) delete mode 100644 src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/EyeIcon.tsx create mode 100644 src/img/icons/gwas-icons/eyeIcon.svg diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/EyeIcon.tsx b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/EyeIcon.tsx deleted file mode 100644 index e4f5c24c33..0000000000 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/EyeIcon.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react'; - -const EyeIcon = () => ( - -); - -export default EyeIcon; diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/SearchBar/SearchBarMessage/SearchBarMessage.tsx b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/SearchBar/SearchBarMessage/SearchBarMessage.tsx index b10a2dd615..69223f6980 100644 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/SearchBar/SearchBarMessage/SearchBarMessage.tsx +++ b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/SearchBar/SearchBarMessage/SearchBarMessage.tsx @@ -1,7 +1,8 @@ import { Button } from '@mantine/core'; import React from 'react'; -import EyeIcon from '../../Icons/EyeIcon'; import InfoIcon from '../../Icons/InfoIcon'; +import IconComponent from '../../../../../../components/Icon'; +import dictIcons from '../../../../../../img/icons/index'; import showSearchBarMessage from './showSearchBarMessage'; import { IColumnManagementData, IRowData } from '../../../Interfaces/Interfaces'; @@ -21,7 +22,7 @@ const SearchBarMessage = ({ Matches found in hidden columns. diff --git a/src/Analysis/GWASResults/Views/Home/ManageColumns/ManageColumnsIcons/HolderIcon.jsx b/src/Analysis/GWASResults/Views/Home/ManageColumns/ManageColumnsIcons/HolderIcon.jsx deleted file mode 100644 index ea25dc1a74..0000000000 --- a/src/Analysis/GWASResults/Views/Home/ManageColumns/ManageColumnsIcons/HolderIcon.jsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; - -const HolderIcon = () => ( - - - -); - -export default HolderIcon; diff --git a/src/Analysis/GWASResults/Views/Home/ManageColumns/ManageColumnsIcons/ManageColumnsIcon.jsx b/src/Analysis/GWASResults/Views/Home/ManageColumns/ManageColumnsIcons/ManageColumnsIcon.jsx deleted file mode 100644 index 8b961ed0f9..0000000000 --- a/src/Analysis/GWASResults/Views/Home/ManageColumns/ManageColumnsIcons/ManageColumnsIcon.jsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from 'react'; - -const ManageColumnsIcon = () => ( - - - - - - - -); - -export default ManageColumnsIcon; diff --git a/src/img/icons/gwas-icons/holderIcon.svg b/src/img/icons/gwas-icons/holderIcon.svg new file mode 100644 index 0000000000..e66e2386f3 --- /dev/null +++ b/src/img/icons/gwas-icons/holderIcon.svg @@ -0,0 +1,12 @@ + + + diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/ManageColumnsIcon.tsx b/src/img/icons/gwas-icons/manageColumnsIcon.svg similarity index 76% rename from src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/ManageColumnsIcon.tsx rename to src/img/icons/gwas-icons/manageColumnsIcon.svg index 8b961ed0f9..cd8d52d3c4 100644 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/ManageColumnsIcon.tsx +++ b/src/img/icons/gwas-icons/manageColumnsIcon.svg @@ -1,6 +1,3 @@ -import React from 'react'; - -const ManageColumnsIcon = () => ( ( className='manage-columns-icon' > - - + - + + /> - -); - -export default ManageColumnsIcon; + diff --git a/src/img/icons/index.jsx b/src/img/icons/index.jsx index 345bbe30a2..874874f526 100644 --- a/src/img/icons/index.jsx +++ b/src/img/icons/index.jsx @@ -47,6 +47,8 @@ import GWASBarChart from './gwas-icons/barChart.svg'; import GWASEulerDiagram from './gwas-icons/eulerDiagram.svg'; import GWASEyeIcon from './gwas-icons/eyeIcon.svg'; import InfoIcon from './gwas-icons/infoIcon.svg'; +import HolderIcon from './gwas-icons/holderIcon.svg'; +import ManageColumnsIcon from './gwas-icons/manageColumnsIcon.svg'; const dictIcons = { 'gwas-barChart': (height, customedStyles) => ( @@ -61,6 +63,12 @@ const dictIcons = { info: (height, customedStyles) => ( ), + 'gwas-holderIcon': (height, customedStyles) => ( + + ), + 'gwas-manageColumnsIcon': (height, customedStyles) => ( + + ), analysis: (height, customedStyles) => ( Date: Thu, 11 Jul 2024 16:12:52 -0500 Subject: [PATCH 09/11] VADC-293: add restoreIcon and SearchIcon to icons --- .../Components/ManageColumns/ManageColumns.tsx | 3 +-- .../Components/SearchBar/SearchBar.tsx | 5 +++-- .../Views/Home/ManageColumns/ManageColumns.jsx | 3 +-- .../ManageColumnsIcons/RestoreIcon.jsx | 18 ------------------ .../icons/gwas-icons/restoreIcon.svg} | 10 ++-------- .../icons/gwas-icons/searchIcon.svg} | 7 +------ src/img/icons/index.jsx | 8 ++++++++ 7 files changed, 16 insertions(+), 38 deletions(-) delete mode 100644 src/Analysis/GWASResults/Views/Home/ManageColumns/ManageColumnsIcons/RestoreIcon.jsx rename src/{Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/RestoreIcon.tsx => img/icons/gwas-icons/restoreIcon.svg} (79%) rename src/{Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/SearchIcon.jsx => img/icons/gwas-icons/searchIcon.svg} (81%) diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/ManageColumns/ManageColumns.tsx b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/ManageColumns/ManageColumns.tsx index dea4c69856..c8c19db026 100644 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/ManageColumns/ManageColumns.tsx +++ b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/ManageColumns/ManageColumns.tsx @@ -8,7 +8,6 @@ import { Grid, Space, } from '@mantine/core'; -import RestoreIcon from '../Icons/RestoreIcon'; import { IColumnManagementData } from '../../Interfaces/Interfaces'; import './ManageColumns.css'; import ColumnsItems from '../../Utils/ColumnItems'; @@ -84,7 +83,7 @@ const ManageColumns = ({ > - + Restore Defaults diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/SearchBar/SearchBar.tsx b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/SearchBar/SearchBar.tsx index c8a075d715..c17a26ec4d 100644 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/SearchBar/SearchBar.tsx +++ b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/SearchBar/SearchBar.tsx @@ -1,10 +1,11 @@ import React, { useEffect } from 'react'; import { Input } from '@mantine/core'; import { debounce } from 'lodash'; -import SearchIcon from '../Icons/SearchIcon'; import { IColumnManagementData, IRowData } from '../../Interfaces/Interfaces'; import SearchBarMessage from './SearchBarMessage/SearchBarMessage'; import filterTableData from './filterTableData'; +import IconComponent from '../../../../../components/Icon'; +import dictIcons from '../../../../../img/icons/index'; interface ISearchBarProps { columnsShown: number; @@ -62,7 +63,7 @@ const SearchBar = ({ x ) : ( - + ) } placeholder='Search' diff --git a/src/Analysis/GWASResults/Views/Home/ManageColumns/ManageColumns.jsx b/src/Analysis/GWASResults/Views/Home/ManageColumns/ManageColumns.jsx index 4bc5bb5074..a0e07a94cf 100644 --- a/src/Analysis/GWASResults/Views/Home/ManageColumns/ManageColumns.jsx +++ b/src/Analysis/GWASResults/Views/Home/ManageColumns/ManageColumns.jsx @@ -3,7 +3,6 @@ import { Button, Dropdown, Switch, message, } from 'antd'; import SharedContext from '../../../Utils/SharedContext'; -import RestoreIcon from './ManageColumnsIcons/RestoreIcon'; import DefaultColumnManagement from '../HomeTableState/DefaultColumnManagement'; import UpdateColumnManagement from '../HomeTableState/UpdateColumnManagement'; import './ManageColumns.css'; @@ -83,7 +82,7 @@ const ManageColumns = () => { restoreDefaults(); }} > - Restore Defaults + Restore Defaults ), key: '0', diff --git a/src/Analysis/GWASResults/Views/Home/ManageColumns/ManageColumnsIcons/RestoreIcon.jsx b/src/Analysis/GWASResults/Views/Home/ManageColumns/ManageColumnsIcons/RestoreIcon.jsx deleted file mode 100644 index cc546222b0..0000000000 --- a/src/Analysis/GWASResults/Views/Home/ManageColumns/ManageColumnsIcons/RestoreIcon.jsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; - -const RestoreIcon = () => ( - - - -); - -export default RestoreIcon; diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/RestoreIcon.tsx b/src/img/icons/gwas-icons/restoreIcon.svg similarity index 79% rename from src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/RestoreIcon.tsx rename to src/img/icons/gwas-icons/restoreIcon.svg index cc546222b0..957c9ba7c3 100644 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/RestoreIcon.tsx +++ b/src/img/icons/gwas-icons/restoreIcon.svg @@ -1,7 +1,4 @@ -import React from 'react'; - -const RestoreIcon = () => ( - ( transform='translate(-1.5 -4.5)' fill='#2e77b8' /> - -); - -export default RestoreIcon; + diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/SearchIcon.jsx b/src/img/icons/gwas-icons/searchIcon.svg similarity index 81% rename from src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/SearchIcon.jsx rename to src/img/icons/gwas-icons/searchIcon.svg index 42ffd6d92a..9f079d62a4 100644 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/Icons/SearchIcon.jsx +++ b/src/img/icons/gwas-icons/searchIcon.svg @@ -1,6 +1,3 @@ -import React from 'react'; - -const SearchIcon = () => ( ( d='M13.75,12.054,11.036,9.339a.653.653,0,0,0-.463-.191h-.444a5.661,5.661,0,1,0-.98.98v.444a.653.653,0,0,0,.191.463l2.715,2.715a.651.651,0,0,0,.923,0l.771-.771A.657.657,0,0,0,13.75,12.054ZM5.663,9.149A3.485,3.485,0,1,1,9.149,5.663,3.483,3.483,0,0,1,5.663,9.149Z' fill='#9a9a9a' /> - -); -export default SearchIcon; + diff --git a/src/img/icons/index.jsx b/src/img/icons/index.jsx index 874874f526..f45620de34 100644 --- a/src/img/icons/index.jsx +++ b/src/img/icons/index.jsx @@ -49,6 +49,8 @@ import GWASEyeIcon from './gwas-icons/eyeIcon.svg'; import InfoIcon from './gwas-icons/infoIcon.svg'; import HolderIcon from './gwas-icons/holderIcon.svg'; import ManageColumnsIcon from './gwas-icons/manageColumnsIcon.svg'; +import RestoreIcon from './gwas-icons/restoreIcon.svg'; +import SearchIcon from './gwas-icons/searchIcon.svg'; const dictIcons = { 'gwas-barChart': (height, customedStyles) => ( @@ -69,6 +71,12 @@ const dictIcons = { 'gwas-manageColumnsIcon': (height, customedStyles) => ( ), + 'gwas-restoreIcon': (height, customedStyles) => ( + + ), + search: (height, customedStyles) => ( + + ), analysis: (height, customedStyles) => ( Date: Thu, 11 Jul 2024 16:14:28 -0500 Subject: [PATCH 10/11] VADC-293: run eslint fix spacing --- .../Components/ManageColumns/ManageColumns.tsx | 6 +++--- .../Components/SearchBar/SearchBar.tsx | 2 +- .../SearchBar/SearchBarMessage/SearchBarMessage.tsx | 4 ++-- .../GWASResults/Views/Home/ManageColumns/ManageColumns.jsx | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/ManageColumns/ManageColumns.tsx b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/ManageColumns/ManageColumns.tsx index c8c19db026..3e83b62554 100644 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/ManageColumns/ManageColumns.tsx +++ b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/ManageColumns/ManageColumns.tsx @@ -64,7 +64,7 @@ const ManageColumns = ({ ) : ( - + ) } placeholder='Search' diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/SearchBar/SearchBarMessage/SearchBarMessage.tsx b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/SearchBar/SearchBarMessage/SearchBarMessage.tsx index 8a0636ac45..8ba956aeee 100644 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/SearchBar/SearchBarMessage/SearchBarMessage.tsx +++ b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/SearchBar/SearchBarMessage/SearchBarMessage.tsx @@ -18,10 +18,10 @@ const SearchBarMessage = ({ if (showSearchBarMessage(searchTerm, paginatedData, columnManagementData)) { return (
- + Matches found in hidden columns. ), key: '0', @@ -135,7 +135,7 @@ const ManageColumns = () => { trigger={['click']} > From b4b931d6a028dbeb88dba05f72828cb7d9880062 Mon Sep 17 00:00:00 2001 From: Shawn O'Connor Date: Thu, 11 Jul 2024 16:24:50 -0500 Subject: [PATCH 11/11] VADC-293: fix tableRow test --- .../AtlasDataDictionaryTable/Components/TableRow/TableRow.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/TableRow/TableRow.tsx b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/TableRow/TableRow.tsx index 7f95aaf753..b1394b3c37 100644 --- a/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/TableRow/TableRow.tsx +++ b/src/Analysis/AtlasDataDictionary/AtlasDataDictionaryTable/Components/TableRow/TableRow.tsx @@ -63,7 +63,7 @@ const TableRow = ({ onClick={() => handleTableChange('openDropdown', rowObject.rowID)} aria-label='expand' > - + )} {currentDropdownShouldBeOpen && (