Interactive interface for browsing global, full-resolution satellite imagery
various tweaks
Jason Kent58b5fc72cf3d
diff --git a/web/js/components/layer/product-picker/browse/category-layer-row.js b/web/js/components/layer/product-picker/browse/category-layer-row.jsindex 5c5af4235..3ec0c5ca6 100644--- a/web/js/components/layer/product-picker/browse/category-layer-row.js+++ b/web/js/components/layer/product-picker/browse/category-layer-row.js@@ -226,6 +226,7 @@ class CategoryLayerRow extends React.Component {CategoryLayerRow.propTypes = {category: PropTypes.object,+ categoryType: PropTypes.string,hasMeasurementSetting: PropTypes.func,id: PropTypes.string,isMobile: PropTypes.bool,diff --git a/web/js/components/layer/product-picker/product-picker.js b/web/js/components/layer/product-picker/product-picker.jsindex 407d53a56..3419b2bba 100644--- a/web/js/components/layer/product-picker/product-picker.js+++ b/web/js/components/layer/product-picker/product-picker.js@@ -89,6 +89,7 @@ class ProductPicker extends React.Component {}ProductPicker.propTypes = {+ categoryType: PropTypes.string,closeModal: PropTypes.func,filters: PropTypes.array,mode: PropTypes.string,diff --git a/web/js/components/layer/product-picker/search/facets.js b/web/js/components/layer/product-picker/search/facets.jsindex c4278e9a0..7b26be33a 100644--- a/web/js/components/layer/product-picker/search/facets.js+++ b/web/js/components/layer/product-picker/search/facets.js@@ -17,11 +17,12 @@ function Facets(props) {facets,filters,removeFilter,+ results,showMobileFacets,toggleMobileFacets,} = props;- const showFacets = browser.greaterThan.small || showMobileFacets;+ const showFacets = (browser.greaterThan.small && results.length) || showMobileFacets;return !showFacets ? null : (<div className="facet-container">@@ -69,6 +70,7 @@ Facets.propTypes = {filters: PropTypes.array,isMobile: PropTypes.bool,removeFilter: PropTypes.func,+ results: PropTypes.array,showMobileFacets: PropTypes.bool,toggleMobileFacets: PropTypes.func,};@@ -92,9 +94,9 @@ function mapStateToProps(state, ownProps) {}export default withSearch(({- facets, filters, removeFilter,+ facets, filters, removeFilter, results,}) => ({- facets, filters, removeFilter,+ facets, filters, removeFilter, results,}),)(connect(mapStateToProps,diff --git a/web/js/components/layer/product-picker/search/product-facet.js b/web/js/components/layer/product-picker/search/product-facet.jsindex 97eefaafd..343329c19 100644--- a/web/js/components/layer/product-picker/search/product-facet.js+++ b/web/js/components/layer/product-picker/search/product-facet.js@@ -48,14 +48,17 @@ function ProductFacet(props) {</>);- return collapsed || !data.length+ const noBooleanResults = filterType === 'boolean' && data.length === 1 && data.find(({ value }) => value === 'false');+ const noResults = !data.length || noBooleanResults;++ return collapsed || noResults? (<div className="facet-wrapper">{renderHeaderIcons()}<fieldset className="sui-facet"><legend className="sui-facet__title">{label}</legend></fieldset>- {!data.length && (+ {noResults && (<div className="no-matches">No matches.</div>)}</div>diff --git a/web/js/modules/product-picker/facetConfig.js b/web/js/modules/product-picker/facetConfig.jsindex 8420161b3..ca6f70f59 100644--- a/web/js/modules/product-picker/facetConfig.js+++ b/web/js/modules/product-picker/facetConfig.js@@ -8,10 +8,11 @@ export default [{field: 'availableAtDate',label: 'Available',- filterType: 'any',+ filterType: 'boolean',tooltip: 'Layer has available imagery at currently selected date/time',view: BooleanFacet,useLabelForValue: true,+ hideZeroCount: true,},{field: 'categories',