Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

#2480 don't render sidebar contents if sidebar is collapsed. prevents tooltips for running data when sidebar is collapsed

Jason Kent4e39d46ceb61
diff --git a/web/js/containers/sidebar/sidebar.js b/web/js/containers/sidebar/sidebar.js
index 2824bc11d..b9d2bbf7c 100644
--- a/web/js/containers/sidebar/sidebar.js
+++ b/web/js/containers/sidebar/sidebar.js
@@ -203,44 +203,48 @@ class Sidebar extends React.Component {
}
onWheel={wheelCallBack}
>
- <NavCase
- activeTab={activeTab}
- onTabClick={onTabClick}
- tabTypes={tabTypes}
- isMobile={isMobile}
- toggleSidebar={this.toggleSidebar.bind(this)}
- isCompareMode={isCompareMode}
- isDataDisabled={isDataDisabled}
- />
- <TabContent activeTab={activeTab}>
- <TabPane tabId="layers">
- {this.getProductsToRender(activeTab, isCompareMode)}
- </TabPane>
- <TabPane tabId="events">
- {naturalEventsFeatureActive
- ? <Events
- isActive={activeTab === 'events'}
- height={subComponentHeight}
- />
- : null
- }
- </TabPane>
- <TabPane tabId="download">
- {dataDownloadFeatureActive
- ? <Data
- isActive={activeTab === 'download'}
- height={subComponentHeight}
- tabTypes={tabTypes}
- />
- : null
- }
- </TabPane>
- <footer
- ref={footerElement => (this.footerElement = footerElement)}
- >
- <FooterContent tabTypes={tabTypes} activeTab={activeTab} />
- </footer>
- </TabContent>
+ {!isCollapsed && (
+ <>
+ <NavCase
+ activeTab={activeTab}
+ onTabClick={onTabClick}
+ tabTypes={tabTypes}
+ isMobile={isMobile}
+ toggleSidebar={this.toggleSidebar.bind(this)}
+ isCompareMode={isCompareMode}
+ isDataDisabled={isDataDisabled}
+ />
+ <TabContent activeTab={activeTab}>
+ <TabPane tabId="layers">
+ {this.getProductsToRender(activeTab, isCompareMode)}
+ </TabPane>
+ <TabPane tabId="events">
+ {naturalEventsFeatureActive
+ ? <Events
+ isActive={activeTab === 'events'}
+ height={subComponentHeight}
+ />
+ : null
+ }
+ </TabPane>
+ <TabPane tabId="download">
+ {dataDownloadFeatureActive
+ ? <Data
+ isActive={activeTab === 'download'}
+ height={subComponentHeight}
+ tabTypes={tabTypes}
+ />
+ : null
+ }
+ </TabPane>
+ <footer
+ ref={footerElement => (this.footerElement = footerElement)}
+ >
+ <FooterContent tabTypes={tabTypes} activeTab={activeTab} />
+ </footer>
+ </TabContent>
+ </>
+ )}
</div>
</section>
</ErrorBoundary>