Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

add wrapper el to location search for joyride

Jason Kent0b0b00de452c
diff --git a/web/css/location-search.css b/web/css/location-search.css
index e37d04811..35260c7fe 100644
--- a/web/css/location-search.css
+++ b/web/css/location-search.css
@@ -88,10 +88,20 @@
}
/* Location Search Component */
+@media (min-width: 576px) {
+
+ /* Class for wrapper element in desktop sizes for joyride tour targeting */
+ .location-search-expanded {
+ position: absolute;
+ right: 182px;
+ top: 10px;
+ width: 350px;
+ height: 38px;
+ }
+}
+
.location-search-component {
position: absolute;
- right: 182px;
- top: 10px;
width: 350px;
margin-right: 1px;
background: rgba(40, 40, 40, 0.85);
diff --git a/web/js/components/location-search/location-search-modal.js b/web/js/components/location-search/location-search-modal.js
index 2b29a4387..59319134e 100644
--- a/web/js/components/location-search/location-search-modal.js
+++ b/web/js/components/location-search/location-search-modal.js
@@ -358,7 +358,7 @@ class LocationSearchModal extends Component {
} = this.state;
return (
- <>
+ <div id="location-search-wrapper" className="location-search-expanded">
{/* Alerts */}
{this.renderReverseGeocodeAlert()}
{this.renderNoSuggestionsAlert()}
@@ -384,7 +384,7 @@ class LocationSearchModal extends Component {
{this.renderAddCoordinateButton()}
</InputGroup>
</div>
- </>
+ </div>
);
}
}
diff --git a/web/js/containers/toolbar.js b/web/js/containers/toolbar.js
index 08056f4ed..54f3581de 100644
--- a/web/js/containers/toolbar.js
+++ b/web/js/containers/toolbar.js
@@ -247,20 +247,19 @@ class toolbarContainer extends Component {
)
: () => toggleShowLocationSearch();
- const buttonDisplayConditions = isMobile || (!isMobile && !isLocationSearchExpanded) || shouldBeCollapsed;
- return !isDistractionFreeModeActive && (
- <Button
- style={{
- display: buttonDisplayConditions ? 'inline-block' : 'none',
- }}
- id={buttonId}
- className="wv-toolbar-button"
- aria-label={labelText}
- onClick={handleButtonClick}
- >
- {this.renderTooltip(buttonId, labelText)}
- <FontAwesomeIcon icon="search-location" size={faSize} />
- </Button>
+ const showButton = (isMobile || (!isMobile && !isLocationSearchExpanded) || shouldBeCollapsed) && !isDistractionFreeModeActive;
+ return showButton && (
+ <div id="location-search-wrapper">
+ <Button
+ id={buttonId}
+ className="wv-toolbar-button"
+ aria-label={labelText}
+ onClick={handleButtonClick}
+ >
+ {this.renderTooltip(buttonId, labelText)}
+ <FontAwesomeIcon icon="search-location" size={faSize} />
+ </Button>
+ </div>
);
}