From 1388cbd695d0f37a6e2b80c442fd1af231087b6c Mon Sep 17 00:00:00 2001 From: rlreamy <34109594+rlreamy@users.noreply.github.com> Date: Tue, 21 May 2024 16:02:59 -0400 Subject: [PATCH 1/7] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aa1f4c51..83df7b20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pegasus-web", - "version": "2.3.1", + "version": "2.4.0", "private": true, "homepage": "/", "dependencies": { From d06aa13259e2404f7cc6535cf180e4aacf472d94 Mon Sep 17 00:00:00 2001 From: HaneenT Date: Tue, 4 Jun 2024 16:41:49 -0400 Subject: [PATCH 2/7] KPMP-5402: update styling for dropdown menus --- src/components/ConceptSelect/ConceptSelect.js | 3 ++- src/components/DataViz/DataTypeSelector.js | 2 ++ src/index.scss | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/ConceptSelect/ConceptSelect.js b/src/components/ConceptSelect/ConceptSelect.js index a395773e..fc718e8f 100644 --- a/src/components/ConceptSelect/ConceptSelect.js +++ b/src/components/ConceptSelect/ConceptSelect.js @@ -124,7 +124,8 @@ class ConceptSelect extends Component { if (this.props.smallFormat) { customStyles["menu"] = styles => ({ ...styles, - width: '460px' + width: '460px', + zIndex: '100' }) } diff --git a/src/components/DataViz/DataTypeSelector.js b/src/components/DataViz/DataTypeSelector.js index 993a3003..3be0bedc 100644 --- a/src/components/DataViz/DataTypeSelector.js +++ b/src/components/DataViz/DataTypeSelector.js @@ -228,6 +228,7 @@ class DataTypeSelector extends Component { inputValue={this.getInputValue()} onFocus={() => this.setState({ tissueInputValue: '' })} className='select d-table-cell w-100 ps-2' + classNamePrefix="select" isDisabled={this.state.isDatasetSummaryLoading ? true : false} /> @@ -238,6 +239,7 @@ class DataTypeSelector extends Component { options={this.state.dataTypeOptions} onChange={this.handleInputChange.bind(this)} className='select d-table-cell w-100 ps-2' + classNamePrefix="select" styles={{ menu: provided => ({ ...provided, zIndex: 999 }) }} isDisabled={this.state.isDatasetSummaryLoading ? true : false} /> diff --git a/src/index.scss b/src/index.scss index f1a87175..9c82cf9a 100644 --- a/src/index.scss +++ b/src/index.scss @@ -963,4 +963,9 @@ tr.MuiTableRow-root:nth-child(even) { @media (min-width: 992px) { margin-right: 15px; } +} + +.select__menu { + position: relative !important; + z-index: 100 !important; } \ No newline at end of file From fc85e7c99188d5129c4872afeae462252f7c773f Mon Sep 17 00:00:00 2001 From: rlreamy <34109594+rlreamy@users.noreply.github.com> Date: Fri, 14 Jun 2024 10:44:35 -0400 Subject: [PATCH 3/7] Create changelog.md --- changelog.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 changelog.md diff --git a/changelog.md b/changelog.md new file mode 100644 index 00000000..99ac9711 --- /dev/null +++ b/changelog.md @@ -0,0 +1,14 @@ +# Changelog + +## Release 2.4 [unreleased] +Brief summary of what's in this release: + + +### Breaking changes + +Breaking changes include any database updates needed, if we need to edit any files on system (like .env or certs, etc). Things that are outside of the code itself that need changed for the system to work. + + +### Non-breaking changes + +Just a place to keep track of things that have changed in the code that we may want to pay special attention to when smoke testing, etc. From 678136840e5a0ed701d3aee5001649a4f8c0c73a Mon Sep 17 00:00:00 2001 From: HaneenT Date: Fri, 14 Jun 2024 15:25:47 -0400 Subject: [PATCH 4/7] KPMP-5402: fix dropdown alignment --- src/index.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.scss b/src/index.scss index 9c82cf9a..0be445f2 100644 --- a/src/index.scss +++ b/src/index.scss @@ -966,6 +966,6 @@ tr.MuiTableRow-root:nth-child(even) { } .select__menu { - position: relative !important; + top: auto !important; z-index: 100 !important; } \ No newline at end of file From 5f98a29e424ec324b871df3c9fad586e0e6b783c Mon Sep 17 00:00:00 2001 From: HaneenT Date: Mon, 17 Jun 2024 11:27:07 -0400 Subject: [PATCH 5/7] KPMP-5138: add 'ALL' col to home & explorer tables --- .../Explorer/SamplesByDataTypeTable.js | 21 ++++++++++++------- src/components/Home/AvailableDatasetsTable.js | 18 ++++++++++++++-- src/components/Home/SamplesByDataTypeTable.js | 12 ++++++++++- src/helpers/Utils.js | 6 ++++++ 4 files changed, 47 insertions(+), 10 deletions(-) diff --git a/src/components/Explorer/SamplesByDataTypeTable.js b/src/components/Explorer/SamplesByDataTypeTable.js index ed25d570..8805092d 100644 --- a/src/components/Explorer/SamplesByDataTypeTable.js +++ b/src/components/Explorer/SamplesByDataTypeTable.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { Row, Col } from 'reactstrap'; import { handleGoogleAnalyticsEvent } from '../../helpers/googleAnalyticsHelper'; -import { availableDataVisibilityFilter } from '../../helpers/Utils'; +import { availableDataVisibilityFilter, getAllCount } from '../../helpers/Utils'; import { fetchSummaryData, fetchDataTypeSummaryInformation} from '../../helpers/ApolloClient'; import { Grid, TableHeaderRow, Table, TableColumnResizing} from '@devexpress/dx-react-grid-bootstrap4'; import '@devexpress/dx-react-grid-bootstrap4/dist/dx-react-grid-bootstrap4.css'; @@ -117,7 +117,12 @@ class SamplesByDataTypeTable extends Component { name: 'dmrCount', sortable: false, hideable: false - }, + }, + { + title: 'ALL', + name: 'allCount', + getCellValue: row => getAllCount(row) + } ] }; @@ -129,16 +134,18 @@ class SamplesByDataTypeTable extends Component { { columnName: 'ckdCount', align: 'center' }, { columnName: 'akiCount', align: 'center' }, { columnName: 'dmrCount', align: 'center' }, + { columnName: 'allCount', align: 'center' }, ] } getDefaultColumnWidths() { return [ - { columnName: 'dataType', width: 320 }, - { columnName: 'hrtCount', width: 208 }, - { columnName: 'ckdCount', width: 89 }, - { columnName: 'akiCount', width: 89 }, - { columnName: 'dmrCount', width: 89 }, + { columnName: 'dataType', width: 295 }, + { columnName: 'hrtCount', width: 190 }, + { columnName: 'ckdCount', width: 85 }, + { columnName: 'akiCount', width: 85 }, + { columnName: 'dmrCount', width: 85 }, + { columnName: 'allCount', width: 85 }, ] } diff --git a/src/components/Home/AvailableDatasetsTable.js b/src/components/Home/AvailableDatasetsTable.js index fda9b452..488a9693 100644 --- a/src/components/Home/AvailableDatasetsTable.js +++ b/src/components/Home/AvailableDatasetsTable.js @@ -2,6 +2,7 @@ import React, { Component } from 'react'; import { Grid, TableFixedColumns, TableHeaderRow, Table} from '@devexpress/dx-react-grid-bootstrap4'; import { Row, Col, UncontrolledTooltip } from 'reactstrap'; import { fetchAtlasSummaryRows } from '../../helpers/ApolloClient'; +import { getAllCount } from '../../helpers/Utils'; class AvailableDatasetsTable extends Component { @@ -32,7 +33,10 @@ class AvailableDatasetsTable extends Component { handleDataTypeValueClick(row, tissueType) { let linkType = row.linkInformation.linkType; let linkValue = row.linkInformation.linkValue.replace('&', '%26'); - let mapping = `/repository/?size=n_20_n&filters[0][field]=${linkType}&filters[0][values][0]=${linkValue}&filters[0][type]=any&filters[1][field]=tissue_type&filters[1][values][0]=${tissueType}&filters[1][type]=any` + let mapping = `/repository/?size=n_20_n&filters[0][field]=${linkType}&filters[0][values][0]=${linkValue}&filters[0][type]=any` + if(tissueType){ + mapping += `&filters[1][field]=tissue_type&filters[1][values][0]=${tissueType}&filters[1][type]=any` + } if(linkType && linkValue){ return encodeURI(mapping).replace('%2526', '%26'); } else { @@ -59,6 +63,7 @@ class AvailableDatasetsTable extends Component { { columnName: 'hrtCount', width: 'auto', align: 'center'}, { columnName: 'ckdCount', width: 'auto', align: 'center'}, { columnName: 'dmrCount', width: 'auto', align: 'center'}, + { columnName: 'allCount', width: 'auto', align: 'center'} ] } @@ -132,7 +137,16 @@ class AvailableDatasetsTable extends Component { , getCellValue: row => this.handleEmptyCounts(row.dmrCount, row, "DM-R"), name: 'dmrCount', - } + }, + { + title: + + ALL + + , + name: 'allCount', + getCellValue: row => this.handleEmptyCounts(getAllCount(row), row, null), + } ] }; diff --git a/src/components/Home/SamplesByDataTypeTable.js b/src/components/Home/SamplesByDataTypeTable.js index 9b59b3fe..77b4fef3 100644 --- a/src/components/Home/SamplesByDataTypeTable.js +++ b/src/components/Home/SamplesByDataTypeTable.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { Grid, TableFixedColumns, TableHeaderRow, Table} from '@devexpress/dx-react-grid-bootstrap4'; -import { availableDataVisibilityFilter } from '../../helpers/Utils'; +import { availableDataVisibilityFilter, getAllCount } from '../../helpers/Utils'; import { fetchSummaryData, fetchDataTypeSummaryInformation} from '../../helpers/ApolloClient'; import { Row, Col, UncontrolledTooltip } from 'reactstrap'; import { handleGoogleAnalyticsEvent } from '../../helpers/googleAnalyticsHelper'; @@ -153,6 +153,15 @@ class SamplesByDataTypeTable extends Component { , name: 'dmrCount', + }, + { + title: + + ALL + + , + name: 'allCount', + getCellValue: row => getAllCount(row) } ] }; @@ -165,6 +174,7 @@ class SamplesByDataTypeTable extends Component { { columnName: 'ckdCount', width: 'auto', align: 'center' }, { columnName: 'akiCount', width: 'auto', align: 'center' }, { columnName: 'dmrCount', width: 'auto', align: 'center' }, + { columnName: 'allCount', width: 'auto', align: 'center' }, ] } diff --git a/src/helpers/Utils.js b/src/helpers/Utils.js index e6de33be..96319350 100644 --- a/src/helpers/Utils.js +++ b/src/helpers/Utils.js @@ -175,3 +175,9 @@ export const availableDataVisibilityFilter = (data) => { } return undefined; } + + +export const getAllCount = (row) => { + let allCount = row.akiCount + row.ckdCount + row.hrtCount + row.dmrCount; + return allCount ? allCount : ""; +} \ No newline at end of file From c147333e20012edb0b553b6aff9533ab6ac94e75 Mon Sep 17 00:00:00 2001 From: HaneenT Date: Mon, 1 Jul 2024 09:05:46 -0400 Subject: [PATCH 6/7] KPMP-5138: fetch totals from backend --- .../Explorer/SamplesByDataTypeTable.js | 11 +++++----- src/components/Home/AvailableDatasetsTable.js | 20 ++++++++++++----- src/components/Home/SamplesByDataTypeTable.js | 22 ++++++++++++------- src/helpers/ApolloClient.js | 3 +++ src/helpers/Utils.js | 6 ----- 5 files changed, 37 insertions(+), 25 deletions(-) diff --git a/src/components/Explorer/SamplesByDataTypeTable.js b/src/components/Explorer/SamplesByDataTypeTable.js index 8805092d..517657c8 100644 --- a/src/components/Explorer/SamplesByDataTypeTable.js +++ b/src/components/Explorer/SamplesByDataTypeTable.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { Row, Col } from 'reactstrap'; import { handleGoogleAnalyticsEvent } from '../../helpers/googleAnalyticsHelper'; -import { availableDataVisibilityFilter, getAllCount } from '../../helpers/Utils'; +import { availableDataVisibilityFilter } from '../../helpers/Utils'; import { fetchSummaryData, fetchDataTypeSummaryInformation} from '../../helpers/ApolloClient'; import { Grid, TableHeaderRow, Table, TableColumnResizing} from '@devexpress/dx-react-grid-bootstrap4'; import '@devexpress/dx-react-grid-bootstrap4/dist/dx-react-grid-bootstrap4.css'; @@ -120,8 +120,9 @@ class SamplesByDataTypeTable extends Component { }, { title: 'ALL', - name: 'allCount', - getCellValue: row => getAllCount(row) + name: 'totalCount', + sortable: false, + hideable: false } ] }; @@ -134,7 +135,7 @@ class SamplesByDataTypeTable extends Component { { columnName: 'ckdCount', align: 'center' }, { columnName: 'akiCount', align: 'center' }, { columnName: 'dmrCount', align: 'center' }, - { columnName: 'allCount', align: 'center' }, + { columnName: 'totalCount', align: 'center' }, ] } @@ -145,7 +146,7 @@ class SamplesByDataTypeTable extends Component { { columnName: 'ckdCount', width: 85 }, { columnName: 'akiCount', width: 85 }, { columnName: 'dmrCount', width: 85 }, - { columnName: 'allCount', width: 85 }, + { columnName: 'totalCount', width: 85 }, ] } diff --git a/src/components/Home/AvailableDatasetsTable.js b/src/components/Home/AvailableDatasetsTable.js index 488a9693..e511907c 100644 --- a/src/components/Home/AvailableDatasetsTable.js +++ b/src/components/Home/AvailableDatasetsTable.js @@ -2,7 +2,6 @@ import React, { Component } from 'react'; import { Grid, TableFixedColumns, TableHeaderRow, Table} from '@devexpress/dx-react-grid-bootstrap4'; import { Row, Col, UncontrolledTooltip } from 'reactstrap'; import { fetchAtlasSummaryRows } from '../../helpers/ApolloClient'; -import { getAllCount } from '../../helpers/Utils'; class AvailableDatasetsTable extends Component { @@ -63,7 +62,7 @@ class AvailableDatasetsTable extends Component { { columnName: 'hrtCount', width: 'auto', align: 'center'}, { columnName: 'ckdCount', width: 'auto', align: 'center'}, { columnName: 'dmrCount', width: 'auto', align: 'center'}, - { columnName: 'allCount', width: 'auto', align: 'center'} + { columnName: 'totalCount', width: 'auto', align: 'center'} ] } @@ -140,12 +139,21 @@ class AvailableDatasetsTable extends Component { }, { title: - + + ALL - + + + Repository files including KPMP and non-KPMP data + + + + , - name: 'allCount', - getCellValue: row => this.handleEmptyCounts(getAllCount(row), row, null), + name: 'totalCount', + getCellValue: row => this.handleEmptyCounts(row.totalCount, row, null), } ] }; diff --git a/src/components/Home/SamplesByDataTypeTable.js b/src/components/Home/SamplesByDataTypeTable.js index 77b4fef3..41bdbf54 100644 --- a/src/components/Home/SamplesByDataTypeTable.js +++ b/src/components/Home/SamplesByDataTypeTable.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { Grid, TableFixedColumns, TableHeaderRow, Table} from '@devexpress/dx-react-grid-bootstrap4'; -import { availableDataVisibilityFilter, getAllCount } from '../../helpers/Utils'; +import { availableDataVisibilityFilter } from '../../helpers/Utils'; import { fetchSummaryData, fetchDataTypeSummaryInformation} from '../../helpers/ApolloClient'; import { Row, Col, UncontrolledTooltip } from 'reactstrap'; import { handleGoogleAnalyticsEvent } from '../../helpers/googleAnalyticsHelper'; @@ -18,11 +18,11 @@ class SamplesByDataTypeTable extends Component { async componentDidMount(){ let spatialSummary = await fetchSummaryData("spatialViewerSummary"); - spatialSummary = spatialSummary.sort(this.compare) + spatialSummary = [...spatialSummary].sort(this.compare) spatialSummary = spatialSummary.filter(availableDataVisibilityFilter) let explorerSummary = await fetchDataTypeSummaryInformation(); - explorerSummary = explorerSummary.sort(this.compare) + explorerSummary = [...explorerSummary].sort(this.compare) explorerSummary = explorerSummary.filter(availableDataVisibilityFilter) // adding lines to separate the sections in the table @@ -156,12 +156,18 @@ class SamplesByDataTypeTable extends Component { }, { title: - - ALL + + + ALL + + + Repository files including KPMP and non-KPMP data + , - name: 'allCount', - getCellValue: row => getAllCount(row) + name: 'totalCount' } ] }; @@ -174,7 +180,7 @@ class SamplesByDataTypeTable extends Component { { columnName: 'ckdCount', width: 'auto', align: 'center' }, { columnName: 'akiCount', width: 'auto', align: 'center' }, { columnName: 'dmrCount', width: 'auto', align: 'center' }, - { columnName: 'allCount', width: 'auto', align: 'center' }, + { columnName: 'totalCount', width: 'auto', align: 'center' }, ] } diff --git a/src/helpers/ApolloClient.js b/src/helpers/ApolloClient.js index a568b6b4..2e851d3c 100644 --- a/src/helpers/ApolloClient.js +++ b/src/helpers/ApolloClient.js @@ -149,6 +149,7 @@ export const fetchDataTypeSummaryInformation = async (fetchPolicy = 'no-cache') akiCount ckdCount dmrCount + totalCount participantCount } }`; @@ -438,6 +439,7 @@ export const fetchSummaryData = async (dataType) => { akiCount ckdCount dmrCount + totalCount participantCount } }`; @@ -485,6 +487,7 @@ export const fetchAtlasSummaryRows = async () => { ckdCount hrtCount dmrCount + totalCount omicsType linkInformation { linkType diff --git a/src/helpers/Utils.js b/src/helpers/Utils.js index 96319350..e6de33be 100644 --- a/src/helpers/Utils.js +++ b/src/helpers/Utils.js @@ -175,9 +175,3 @@ export const availableDataVisibilityFilter = (data) => { } return undefined; } - - -export const getAllCount = (row) => { - let allCount = row.akiCount + row.ckdCount + row.hrtCount + row.dmrCount; - return allCount ? allCount : ""; -} \ No newline at end of file From e2506631540ec0ecacd63ad4ec37ec333a67fb3e Mon Sep 17 00:00:00 2001 From: HaneenT Date: Mon, 1 Jul 2024 10:32:44 -0400 Subject: [PATCH 7/7] KPMP-5138: update tooltip text for homepage tables --- src/components/Home/AvailableDatasetsTable.js | 5 +---- src/components/Home/SamplesByDataTypeTable.js | 9 ++++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/components/Home/AvailableDatasetsTable.js b/src/components/Home/AvailableDatasetsTable.js index e511907c..41a30a7f 100644 --- a/src/components/Home/AvailableDatasetsTable.js +++ b/src/components/Home/AvailableDatasetsTable.js @@ -148,10 +148,7 @@ class AvailableDatasetsTable extends Component { target="AllHeader"> Repository files including KPMP and non-KPMP data - - - - , + , name: 'totalCount', getCellValue: row => this.handleEmptyCounts(row.totalCount, row, null), } diff --git a/src/components/Home/SamplesByDataTypeTable.js b/src/components/Home/SamplesByDataTypeTable.js index 41bdbf54..6c8e143c 100644 --- a/src/components/Home/SamplesByDataTypeTable.js +++ b/src/components/Home/SamplesByDataTypeTable.js @@ -157,16 +157,15 @@ class SamplesByDataTypeTable extends Component { { title: - + ALL - Repository files including KPMP and non-KPMP data + target="AllParticipantsHeader"> + All Participants - - , + , name: 'totalCount' } ]