Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore loading animation for study summary fetch on results page #2960

Merged
merged 1 commit into from
Dec 31, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 44 additions & 41 deletions src/pages/resultsView/ResultsViewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -525,50 +525,53 @@ export default class ResultsViewPage extends React.Component<
/>
</div>
)}
{this.resultsViewPageStore.studies.isComplete && (
<Helmet>
<title>
{buildResultsViewPageTitle(
this.resultsViewPageStore.hugoGeneSymbols,
this.resultsViewPageStore.studies.result
)}
</title>
</Helmet>
{this.resultsViewPageStore.studies.isPending && (
<LoadingIndicator isLoading={true} center={true} size={"big"}></LoadingIndicator>
)}
{this.resultsViewPageStore.studies.isComplete && (
<div>
<div className={'headBlock'}>
<QuerySummary
routingStore={this.props.routing}
store={this.resultsViewPageStore}
onToggleQueryFormVisiblity={visible => {
this.showTabs = visible;
}}
/>
<>
<Helmet>
<title>
{buildResultsViewPageTitle(
this.resultsViewPageStore.hugoGeneSymbols,
this.resultsViewPageStore.studies.result
)}
</title>
</Helmet>
<div>
<div className={'headBlock'}>
<QuerySummary
routingStore={this.props.routing}
store={this.resultsViewPageStore}
onToggleQueryFormVisiblity={visible => {
this.showTabs = visible;
}}
/>
</div>

{// we don't show the result tabs if we don't have valid query
this.showTabs &&
!this.resultsViewPageStore.genesInvalid &&
!this.resultsViewPageStore.isQueryInvalid && (
<MSKTabs
key={
this.urlWrapper.hash
}
activeTabId={
this.resultsViewPageStore.tabId
}
unmountOnHide={false}
onTabClick={(id: string) =>
this.handleTabChange(id)
}
className="mainTabs"
getTabHref={this.getTabHref}
>
{this.tabs}
</MSKTabs>
)}
</div>

{// we don't show the result tabs if we don't have valid query
this.showTabs &&
!this.resultsViewPageStore.genesInvalid &&
!this.resultsViewPageStore.isQueryInvalid && (
<MSKTabs
key={
this.urlWrapper.hash
}
activeTabId={
this.resultsViewPageStore.tabId
}
unmountOnHide={false}
onTabClick={(id: string) =>
this.handleTabChange(id)
}
className="mainTabs"
getTabHref={this.getTabHref}
>
{this.tabs}
</MSKTabs>
)}
</div>
</>
)}
</>
);
Expand Down