Skip to content

Commit

Permalink
Merge branch 'IPAD-480_async-linkouts' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
paulnordlund committed Feb 23, 2024
2 parents b9af50d + a1f2714 commit da685c5
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 74 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "omicnavigatorwebapp",
"version": "1.9.1",
"version": "1.9.3",
"private": true,
"dependencies": {
"@observablehq/stdlib": "^5.6.1",
Expand Down
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"short_name": "OmicNavigator",
"name": "OmicNavigator",
"version": "1.9.1",
"version": "1.9.3",
"icons": [
{
"src": "favicon.ico",
Expand Down
14 changes: 10 additions & 4 deletions src/components/Differential/Differential.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,16 @@ class Differential extends Component {
visible: false,
multisetButttonActiveDifferential: false,
});
if (
changes.differentialModel !== '' &&
changes.differentialModel !== this.props.differentialModel
) {
// get favicons before anything else
this.getResultsLinkouts(
changes.differentialStudy,
changes.differentialModel,
);
}
if (scChange) {
this.resetOverlay();
if (resetSelectedFeatures) {
Expand All @@ -406,10 +416,6 @@ class Differential extends Component {
changes.differentialStudy,
changes.differentialModel,
);
this.getResultsLinkouts(
changes.differentialStudy,
changes.differentialModel,
);
this.getMultisetColsDifferential(
changes.differentialStudy,
changes.differentialModel,
Expand Down
7 changes: 5 additions & 2 deletions src/components/Differential/DifferentialSearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class DifferentialSearch extends Component {
window.removeEventListener('resize');
}

populateDropdowns = () => {
populateDropdowns = async () => {
const {
allStudiesMetadata,
differentialStudy,
Expand Down Expand Up @@ -220,7 +220,10 @@ class DifferentialSearch extends Component {
this.getReportLink(differentialStudy, 'default');
} else {
this.props.onDoMetaFeaturesExist(differentialStudy, differentialModel);
this.props.onGetResultsLinkouts(differentialStudy, differentialModel);
await this.props.onGetResultsLinkouts(
differentialStudy,
differentialModel,
);
this.props.onGetMultisetColsDifferential(
differentialStudy,
differentialModel,
Expand Down
73 changes: 12 additions & 61 deletions src/components/Enrichment/Enrichment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ class Enrichment extends Component {
changes.enrichmentAnnotation !== '' &&
changes.enrichmentAnnotation !== this.props.enrichmentAnnotation
) {
// get favicons before anything else
this.getEnrichmentsLinkouts(
changes.enrichmentStudy,
changes.enrichmentAnnotation,
Expand Down Expand Up @@ -676,34 +677,10 @@ class Enrichment extends Component {
{
enrichmentsFavicons: favicons,
},
function () {
let columns = this.state.enrichmentColumnsUnfiltered || [];
if (
this.state.enrichmentResults?.length
// && !this.enrichmentColumnsConfigured
) {
columns = this.getConfigCols(this.state.enrichmentResults);
this.setState({
enrichmentColumnsUnfiltered: columns,
});
this.enrichmentColumnsConfigured = true;
}
if (this.state.multisetTestsFilteredOut.length > 0) {
const self = this;
columns = columns.filter(function (col) {
return !self.state.MultisetTestsFilteredOut.includes(
col?.title,
);
});
}
this.setState({
enrichmentColumns: columns,
});
sessionStorage.setItem(
`EnrichmentsFavicons-${enrichmentStudy}_${enrichmentAnnotation}`,
JSON.stringify(favicons),
);
},
sessionStorage.setItem(
`EnrichmentsFavicons-${enrichmentStudy}_${enrichmentAnnotation}`,
JSON.stringify(favicons),
),
);
});
}
Expand All @@ -723,42 +700,16 @@ class Enrichment extends Component {
`EnrichmentsLinkouts-${enrichmentStudy}_${enrichmentAnnotation}`,
JSON.stringify(linkouts),
);
const self = this;
omicNavigatorService
.getFavicons(getEnrichmentsLinkoutsResponseData)
.then((getFaviconsResponseData) => {
const favicons = getFaviconsResponseData || [];
this.setState(
{
enrichmentsFavicons: favicons,
},
function () {
let columns = this.state.enrichmentColumnsUnfiltered || [];
if (
this.state.enrichmentResults?.length
// && !this.enrichmentColumnsConfigured
) {
columns = this.getConfigCols(this.state.enrichmentResults);
this.setState({
enrichmentColumnsUnfiltered: columns,
});
this.enrichmentColumnsConfigured = true;
}
if (self.state.multisetTestsFilteredOut.length > 0) {
columns = columns.filter(function (col) {
return !self.state.MultisetTestsFilteredOut.includes(
col.title,
);
});
}
self.setState({
enrichmentColumns: columns,
});
sessionStorage.setItem(
`EnrichmentsFavicons-${enrichmentStudy}_${enrichmentAnnotation}`,
JSON.stringify(favicons),
);
},
this.setState({
enrichmentsFavicons: favicons,
});
sessionStorage.setItem(
`EnrichmentsFavicons-${enrichmentStudy}_${enrichmentAnnotation}`,
JSON.stringify(favicons),
);
});
});
Expand Down Expand Up @@ -1026,7 +977,7 @@ class Enrichment extends Component {
}
style={TableValuePopupStyle}
className="TablePopupValue"
content={value}
content={'View Interactive Barcode Plot'}
inverted
basic
/>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Enrichment/EnrichmentSearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class EnrichmentSearch extends Component {
window.removeEventListener('resize');
}

populateDropdowns = () => {
populateDropdowns = async () => {
const {
allStudiesMetadata,
enrichmentStudy,
Expand Down Expand Up @@ -243,8 +243,8 @@ class EnrichmentSearch extends Component {
this.props.onSetAnnotationsMetadata(enrichmentAnnotationsMetadataVar);
this.getReportLink(enrichmentStudy, enrichmentModel);
if (enrichmentAnnotation !== '') {
onGetEnrichmentsLinkouts(enrichmentStudy, enrichmentAnnotation);
onSearchTransitionEnrichment(true);
await onGetEnrichmentsLinkouts(enrichmentStudy, enrichmentAnnotation);
const obj = {
study: enrichmentStudy,
modelID: enrichmentModel,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tabs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Tabs extends Component {
differentialFeatureIdKey: '',
filteredDifferentialFeatureIdKey: '',
// when updating the app version, change one line in 3 files: package.json, manifest.json and Tabs.jsx
appVersion: '1.9.1',
appVersion: '1.9.3',
packageVersion: '',
infoOpenFirst: false,
infoOpenSecond: false,
Expand Down

0 comments on commit da685c5

Please sign in to comment.