From ac4c3d1d515106802b4a937a074076c558895655 Mon Sep 17 00:00:00 2001
From: Patrick Moulden <4834892+PatchesMaps@users.noreply.github.com>
Date: Fri, 10 Jan 2025 16:58:33 -0500
Subject: [PATCH 1/6] Dependency Updates 01-10-2025 (#5653)
---
package-lock.json | 52 ++++++++++++++++++++++++-----------------------
package.json | 10 ++++-----
2 files changed, 32 insertions(+), 30 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 0cd19e3f04..447853d517 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11,8 +11,8 @@
"license": "NASA-1.3",
"dependencies": {
"@edsc/earthdata-react-icons": "^0.0.2",
- "@elastic/react-search-ui": "^1.22.0",
- "@elastic/react-search-ui-views": "^1.22.0",
+ "@elastic/react-search-ui": "^1.22.2",
+ "@elastic/react-search-ui-views": "^1.22.2",
"@fortawesome/fontawesome-svg-core": "^6.7.2",
"@fortawesome/free-brands-svg-icons": "^6.7.2",
"@fortawesome/free-solid-svg-icons": "^6.7.2",
@@ -73,7 +73,7 @@
"simplebar-react": "^3.3.0",
"stackblur": "^1.0.0",
"supercluster": "^8.0.1",
- "tough-cookie": "^5.0.0",
+ "tough-cookie": "^5.1.0",
"upng-js": "^2.1.0",
"url-template": "^3.1.1",
"what-input": "^5.2.12"
@@ -128,7 +128,7 @@
"react-test-renderer": "^18.3.1",
"redux-mock-store": "^1.5.5",
"run-script-os": "^1.1.6",
- "sass": "^1.83.0",
+ "sass": "^1.83.1",
"sass-loader": "^16.0.4",
"shelljs": "^0.8.5",
"showdown": "^2.1.0",
@@ -137,7 +137,7 @@
"stylelint-high-performance-animation": "^1.10.0",
"tar": "^7.4.3",
"terser-webpack-plugin": "^5.3.11",
- "uuid": "^11.0.3",
+ "uuid": "^11.0.5",
"webpack": "^5.97.1",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^5.1.4",
@@ -1888,13 +1888,13 @@
}
},
"node_modules/@elastic/react-search-ui": {
- "version": "1.22.0",
- "resolved": "https://registry.npmjs.org/@elastic/react-search-ui/-/react-search-ui-1.22.0.tgz",
- "integrity": "sha512-auGjSuOpaWamGSOEQytUUSzZc+z4tY2x2tjELv4v9ugvouMykdUu8ETYK76gasojlKsHGt6tA8dIXFKR5Dug2g==",
+ "version": "1.22.2",
+ "resolved": "https://registry.npmjs.org/@elastic/react-search-ui/-/react-search-ui-1.22.2.tgz",
+ "integrity": "sha512-pr/XpxUMbR2Rf7y/QvZIqWK9XgApQIcXLDNQFIDH23ren9ymHj6shgBkvANXnQ0eTdLc2R3rRVJu60wxYvP/0g==",
"license": "Apache-2.0",
"dependencies": {
- "@elastic/react-search-ui-views": "1.22.0",
- "@elastic/search-ui": "1.22.0"
+ "@elastic/react-search-ui-views": "1.22.2",
+ "@elastic/search-ui": "1.22.2"
},
"peerDependencies": {
"react": ">= 16.8.0 < 19",
@@ -1902,12 +1902,12 @@
}
},
"node_modules/@elastic/react-search-ui-views": {
- "version": "1.22.0",
- "resolved": "https://registry.npmjs.org/@elastic/react-search-ui-views/-/react-search-ui-views-1.22.0.tgz",
- "integrity": "sha512-ys/jkOziBlk53eS+OTyiFAjYjey+24+0Cj68X8W6FZfq34wbLjtRvwNzdFPGGAWm4WATZpasWpW6rdlLlrPgEw==",
+ "version": "1.22.2",
+ "resolved": "https://registry.npmjs.org/@elastic/react-search-ui-views/-/react-search-ui-views-1.22.2.tgz",
+ "integrity": "sha512-2Hlgwd9I5bOUakriTBjCaYTDKNTfVMAEnUyZDbue/w4yAhUe0PCmSVY+PJLKmppVSgIoFjYxMci9Sys0tBMnCQ==",
"license": "Apache-2.0",
"dependencies": {
- "@elastic/search-ui": "1.22.0",
+ "@elastic/search-ui": "1.22.2",
"downshift": "^3.2.10",
"rc-pagination": "^4.0.4",
"react-select": "^5.0.0"
@@ -1918,15 +1918,15 @@
}
},
"node_modules/@elastic/search-ui": {
- "version": "1.22.0",
- "resolved": "https://registry.npmjs.org/@elastic/search-ui/-/search-ui-1.22.0.tgz",
- "integrity": "sha512-ce3kOKKYQX+vsjynuRY1aMRnjDaG94CSx12jsWeO+antbVfhdPenZEdtQnjUOc0ta7nXgdOHBfXJCqhwVLgh0g==",
+ "version": "1.22.2",
+ "resolved": "https://registry.npmjs.org/@elastic/search-ui/-/search-ui-1.22.2.tgz",
+ "integrity": "sha512-XlXbclMf+ReH+t7etEfa/99mN2FIDqDEJsS/kcgbQEbo+23WYDyx3n/5ozzkGjPcatVgnx80tlJM3+D4RFmmVw==",
"license": "Apache-2.0",
"dependencies": {
"date-fns": "^1.30.1",
"deep-equal": "^1.0.1",
"history": "^4.9.0",
- "qs": "^6.7.0"
+ "qs": "^6.9.7"
}
},
"node_modules/@elastic/search-ui/node_modules/history": {
@@ -15839,9 +15839,9 @@
"license": "MIT"
},
"node_modules/sass": {
- "version": "1.83.0",
- "resolved": "https://registry.npmjs.org/sass/-/sass-1.83.0.tgz",
- "integrity": "sha512-qsSxlayzoOjdvXMVLkzF84DJFc2HZEL/rFyGIKbbilYtAvlCxyuzUeff9LawTn4btVnLKg75Z8MMr1lxU1lfGw==",
+ "version": "1.83.1",
+ "resolved": "https://registry.npmjs.org/sass/-/sass-1.83.1.tgz",
+ "integrity": "sha512-EVJbDaEs4Rr3F0glJzFSOvtg2/oy2V/YrGFPqPY24UqcLDWcI9ZY5sN+qyO3c/QCZwzgfirvhXvINiJCE/OLcA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -17532,7 +17532,9 @@
}
},
"node_modules/tough-cookie": {
- "version": "5.0.0",
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.0.tgz",
+ "integrity": "sha512-rvZUv+7MoBYTiDmFPBrhL7Ujx9Sk+q9wwm22x8c8T5IJaR+Wsyc7TNxbVxo84kZoRJZZMazowFLqpankBEQrGg==",
"license": "BSD-3-Clause",
"dependencies": {
"tldts": "^6.1.32"
@@ -17945,9 +17947,9 @@
}
},
"node_modules/uuid": {
- "version": "11.0.3",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.3.tgz",
- "integrity": "sha512-d0z310fCWv5dJwnX1Y/MncBAqGMKEzlBb1AOf7z9K8ALnd0utBX/msg/fA0+sbyN1ihbMsLhrBlnl1ak7Wa0rg==",
+ "version": "11.0.5",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.5.tgz",
+ "integrity": "sha512-508e6IcKLrhxKdBbcA2b4KQZlLVp2+J5UwQ6F7Drckkc5N9ZJwFa4TgWtsww9UG8fGHbm6gbV19TdM5pQ4GaIA==",
"dev": true,
"funding": [
"https://github.com/sponsors/broofa",
diff --git a/package.json b/package.json
index 285660dbc9..68b278ac11 100644
--- a/package.json
+++ b/package.json
@@ -126,7 +126,7 @@
"react-test-renderer": "^18.3.1",
"redux-mock-store": "^1.5.5",
"run-script-os": "^1.1.6",
- "sass": "^1.83.0",
+ "sass": "^1.83.1",
"sass-loader": "^16.0.4",
"shelljs": "^0.8.5",
"showdown": "^2.1.0",
@@ -135,7 +135,7 @@
"stylelint-high-performance-animation": "^1.10.0",
"tar": "^7.4.3",
"terser-webpack-plugin": "^5.3.11",
- "uuid": "^11.0.3",
+ "uuid": "^11.0.5",
"webpack": "^5.97.1",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^5.1.4",
@@ -147,8 +147,8 @@
},
"dependencies": {
"@edsc/earthdata-react-icons": "^0.0.2",
- "@elastic/react-search-ui": "^1.22.0",
- "@elastic/react-search-ui-views": "^1.22.0",
+ "@elastic/react-search-ui": "^1.22.2",
+ "@elastic/react-search-ui-views": "^1.22.2",
"@fortawesome/fontawesome-svg-core": "^6.7.2",
"@fortawesome/free-brands-svg-icons": "^6.7.2",
"@fortawesome/free-solid-svg-icons": "^6.7.2",
@@ -209,7 +209,7 @@
"simplebar-react": "^3.3.0",
"stackblur": "^1.0.0",
"supercluster": "^8.0.1",
- "tough-cookie": "^5.0.0",
+ "tough-cookie": "^5.1.0",
"upng-js": "^2.1.0",
"url-template": "^3.1.1",
"what-input": "^5.2.12"
From 57c8e36e6edeba893795af27767163aacbb550d4 Mon Sep 17 00:00:00 2001
From: Patrick Moulden <4834892+PatchesMaps@users.noreply.github.com>
Date: Tue, 14 Jan 2025 12:42:07 -0500
Subject: [PATCH 2/6] WV-2809 eslint (#5652)
* Enhance accessibility by adding focus and blur event handlers, updating elements to use buttons, and improving ARIA attributes across various components.
* alt-text
* jsx-a11y/anchor-is-valid
* Remove accessibility rule overrides from ESLint configuration
---
web/.eslintrc | 8 -
.../components/animation-widget/gif-button.js | 5 +-
.../animation-widget/gif-post-creation.js | 2 +-
.../animation-widget/loop-button.js | 5 +-
.../animation-widget/play-button.js | 5 +-
web/js/components/compare/alert.js | 6 +-
web/js/components/compare/opacity-slider.js | 8 +-
.../feature-alert/vector-alert-modal.js | 2 +-
web/js/components/layer/info/date-ranges.js | 15 +-
.../product-picker/browse/category-cell.js | 16 +-
.../browse/measurement-metadata-detail.js | 2 +
.../search/layer-metadata-detail.js | 4 +-
.../layer/settings/imagery-search.js | 13 +-
.../layer/settings/layer-settings.js | 29 ---
web/js/components/layer/settings/palette.js | 6 +-
.../components/layer/settings/vector-style.js | 187 ------------------
.../location-search/location-marker.js | 25 ++-
web/js/components/map/rotation.js | 3 +
web/js/components/sidebar/collapsed-button.js | 5 +-
web/js/components/sidebar/event.js | 69 ++++---
.../smart-handoffs/smart-handoff-modal.js | 8 +-
.../custom-interval-selector.js | 1 -
.../timeline/timeline-axis/timeline-axis.js | 2 +
.../axis-timescale-change-tooltip.js | 4 +-
.../timeline/timeline-coverage/info-modal.js | 4 +-
.../timeline-coverage/timeline-coverage.js | 10 +-
web/js/components/tooltip/tooltip.js | 68 -------
web/js/components/tour/content-intro.js | 11 +-
web/js/components/tour/tour-box.js | 14 +-
web/js/components/tour/widget-steps.js | 18 +-
web/js/components/util/image-crop.js | 2 +-
web/js/components/util/switch.js | 3 +
web/js/containers/share.js | 9 +-
web/js/containers/sidebar/layer-row.js | 27 ++-
web/js/containers/sidebar/layers-container.js | 34 ++--
web/js/containers/sidebar/smart-handoff.js | 18 +-
web/scss/features/anim-widget.scss | 5 +-
web/scss/features/layer-categories.scss | 3 +
web/scss/features/sidebar-panel.scss | 41 ++--
web/scss/features/sidebar.scss | 18 +-
40 files changed, 277 insertions(+), 438 deletions(-)
delete mode 100644 web/js/components/layer/settings/vector-style.js
delete mode 100644 web/js/components/tooltip/tooltip.js
diff --git a/web/.eslintrc b/web/.eslintrc
index 2b60e11521..f28cdc85ee 100644
--- a/web/.eslintrc
+++ b/web/.eslintrc
@@ -99,14 +99,6 @@
// Import rules overrides
"import/no-cycle": "warn",
// Accesibility rules overrides
- "jsx-a11y/no-noninteractive-tabindex": "off", // 2 errors across 2 files
- "jsx-a11y/no-noninteractive-element-interactions": "off", // 5 errors across 5 files
- "jsx-a11y/anchor-has-content": "off", // 1 error across 1 files
- "jsx-a11y/control-has-associated-label": "off", // 1 error across 1 files
- "jsx-a11y/anchor-is-valid": "off", // 24 errors across 13 files
- "jsx-a11y/label-has-associated-control": "off", // 5 errors across 4 files
- "jsx-a11y/alt-text": "off", // 15 errors across 10 files
- "jsx-a11y/mouse-events-have-key-events": "off", // 7 errors across 4 files
"jsx-a11y/no-static-element-interactions": "off", // 71 errors across 39 files
"jsx-a11y/click-events-have-key-events": "off", // 70 errors across 39 files
// React rules overrides
diff --git a/web/js/components/animation-widget/gif-button.js b/web/js/components/animation-widget/gif-button.js
index 5944796155..f8aa8d82d8 100644
--- a/web/js/components/animation-widget/gif-button.js
+++ b/web/js/components/animation-widget/gif-button.js
@@ -93,7 +93,8 @@ function GifButton(props) {
return (
<>
-
{showWarning ? warningMessage : labelText}
-
+
{isGifActive &&
Granules that are available to download will be listed in the white pull out menu. Each granule listed can be
downloaded individually or the entire set contained within the bounding box can be downloaded as a zip file.
diff --git a/web/js/components/timeline/custom-interval-selector/custom-interval-selector.js b/web/js/components/timeline/custom-interval-selector/custom-interval-selector.js
index 4514992d58..d016997056 100644
--- a/web/js/components/timeline/custom-interval-selector/custom-interval-selector.js
+++ b/web/js/components/timeline/custom-interval-selector/custom-interval-selector.js
@@ -60,7 +60,6 @@ function CustomIntervalSelector(props) {
Including layers that are hidden may affect the display of the timeline’s solid blue overlapping coverage line as it will take into account the dates of those layers, too.
diff --git a/web/js/components/timeline/timeline-coverage/timeline-coverage.js b/web/js/components/timeline/timeline-coverage/timeline-coverage.js
index be3450029f..f6450fff36 100644
--- a/web/js/components/timeline/timeline-coverage/timeline-coverage.js
+++ b/web/js/components/timeline/timeline-coverage/timeline-coverage.js
@@ -309,9 +309,15 @@ class TimelineLayerCoveragePanel extends Component {
const { onInfoClick } = this.props;
const layerInfoBtnId = 'layer-coverage-info-button';
const layerInfoBtnTitle = 'Timeline Layer Coverage Information';
+ const buttonStyle = {
+ border: 'none',
+ background: 'none',
+ };
return (
- onInfoClick()}
>
{description}
Please
{' '}
- contact us
+
{' '}
to enable Worldview embedding on your website.
- drawMeasurements(category)}
>
{category.title}
-
+
{category.measurements
@@ -71,12 +73,13 @@ function CategoryCell(props) {
/* eslint react/no-array-index-key: 1 */
key={category.id + index}
>
- drawMeasurements(category)}
>
...
-
+
) : (
Vector Styles
-
)
: (
- {
e.stopPropagation();
@@ -134,7 +141,7 @@ function Event (props) {
}}
>
{formatDisplayDate(date)}
-
+
)}
{magnitudeOutput(geometry)}
@@ -178,37 +185,49 @@ function Event (props) {
});
}
}
+ const buttonStyle = {
+ width: '100%',
+ background: 'none',
+ color: 'white',
+ border: 'none',
+ textAlign: 'left',
+ };
return (
);
}
diff --git a/web/js/components/smart-handoffs/smart-handoff-modal.js b/web/js/components/smart-handoffs/smart-handoff-modal.js
index a21a9c75cf..ef0e4ee10e 100644
--- a/web/js/components/smart-handoffs/smart-handoff-modal.js
+++ b/web/js/components/smart-handoffs/smart-handoff-modal.js
@@ -45,10 +45,10 @@ function SmartHandoffModal({
Custom Interval Selector
diff --git a/web/js/components/timeline/timeline-axis/timeline-axis.js b/web/js/components/timeline/timeline-axis/timeline-axis.js
index 18728d4730..ab3a870d52 100644
--- a/web/js/components/timeline/timeline-axis/timeline-axis.js
+++ b/web/js/components/timeline/timeline-axis/timeline-axis.js
@@ -1513,7 +1513,9 @@ class TimelineAxis extends Component {
onMouseUp={this.setLineTime}
onWheel={this.handleWheelType}
onMouseOver={this.showHoverOn}
+ onFocus={this.showHoverOn}
onMouseLeave={showHoverOff}
+ onBlur={showHoverOff}
onTouchStart={this.handleMouseDown}
onTouchEnd={this.setLineTimeTouch}
>
diff --git a/web/js/components/timeline/timeline-controls/axis-timescale-change-tooltip.js b/web/js/components/timeline/timeline-controls/axis-timescale-change-tooltip.js
index 3d990941a7..a68870dcc7 100644
--- a/web/js/components/timeline/timeline-controls/axis-timescale-change-tooltip.js
+++ b/web/js/components/timeline/timeline-controls/axis-timescale-change-tooltip.js
@@ -52,7 +52,7 @@ class AxisTimeScaleChangeTooltip extends PureComponent {
style={{ display: toolTipHovered ? 'block' : 'none' }}
>
- {dataArray.map((dataEl, i) => (
-
-
-
+
+
>
)}
@@ -585,9 +590,14 @@ class SmartHandoff extends Component {
application.
-
+
+
{this.renderLayerChoices()}
diff --git a/web/scss/features/anim-widget.scss b/web/scss/features/anim-widget.scss
index 8b4c3075ab..8020280d95 100644
--- a/web/scss/features/anim-widget.scss
+++ b/web/scss/features/anim-widget.scss
@@ -162,6 +162,7 @@
}
& > a,
+ & > button,
& > div {
display: inline-block;
margin: 7px 0 0 10px;
@@ -179,6 +180,8 @@
background: variables.$wv-dark-blue;
position: relative;
border-radius: 5px;
+ padding: 0;
+ border: none;
&.disabled {
cursor: not-allowed;
@@ -260,7 +263,7 @@
}
}
-a .wv-animation-widget-icon {
+button .wv-animation-widget-icon {
font-size: 23px;
color: #fff;
position: absolute;
diff --git a/web/scss/features/layer-categories.scss b/web/scss/features/layer-categories.scss
index d306d8ac12..9c5b2d4cc4 100644
--- a/web/scss/features/layer-categories.scss
+++ b/web/scss/features/layer-categories.scss
@@ -170,6 +170,9 @@
overflow: hidden;
box-sizing: border-box;
text-decoration: none;
+ background: none;
+ text-align: left;
+ border: none;
}
& .layer-category-name:hover {
diff --git a/web/scss/features/sidebar-panel.scss b/web/scss/features/sidebar-panel.scss
index fca20a3693..300ab1f116 100644
--- a/web/scss/features/sidebar-panel.scss
+++ b/web/scss/features/sidebar-panel.scss
@@ -3,7 +3,7 @@
.sidebar-expand {
position: relative;
- > a {
+ > button {
float: left;
left: 10px;
position: absolute;
@@ -257,7 +257,7 @@ li.item.productsitem.inmotion,
border-color: #fff;
}
-.productsitem a.visibility {
+.productsitem button.visibility {
width: 30px;
background-color: #ccc;
position: absolute;
@@ -265,6 +265,11 @@ li.item.productsitem.inmotion,
bottom: 0;
cursor: pointer;
border-right: 1px solid #333;
+ border-top: none;
+ border-bottom: none;
+ border-left: none;
+ text-align: left;
+ padding: 0;
&.layer-enabled:hover {
background: #fff;
@@ -387,12 +392,15 @@ li.item.productsitem.inmotion,
* End -- Granule active footprint toggle *
************************************/
-.productsitem a.wv-layers-info,
-.productsitem a.wv-layers-options {
+.productsitem button.wv-layers-info,
+.productsitem button.wv-layers-options {
position: relative;
width: 20px;
height: 20px;
float: right;
+ border: none;
+ background:none;
+ padding: 0;
}
.productsitem.inmotion {
@@ -400,9 +408,9 @@ li.item.productsitem.inmotion,
list-style: none;
}
-.productsitem a.wv-layers-close:hover,
-.productsitem a.wv-layers-info:hover,
-.productsitem a.wv-layers-options:hover {
+.productsitem button.wv-layers-close:hover,
+.productsitem button.wv-layers-info:hover,
+.productsitem button.wv-layers-options:hover {
background: #fff;
}
@@ -413,7 +421,6 @@ li.item.productsitem.inmotion,
text-align: center;
border-radius: 50%;
padding: 1px;
- margin-top: 3px;
}
.layer-info svg.svg-inline--fa.wv-layers-options-icon {
@@ -426,11 +433,11 @@ li.item.productsitem.inmotion,
margin-left: -6px;
}
-.productsitem.layer-hidden a.wv-layers-options svg.svg-inline--fa.wv-layers-options-icon {
+.productsitem.layer-hidden button.wv-layers-options svg.svg-inline--fa.wv-layers-options-icon {
background-position: -21px -69px;
}
-.productsitem.layer-hidden a.wv-layers-options:hover svg.svg-inline--fa.wv-layers-options-icon {
+.productsitem.layer-hidden button.wv-layers-options:hover svg.svg-inline--fa.wv-layers-options-icon {
background-position: 0 -69px;
}
@@ -514,15 +521,17 @@ li.item.productsitem.inmotion,
}
}
-.productsitem a.button.wv-layers-close {
+.productsitem button.wv-layers-close {
display: block;
float: right;
width: 20px;
height: 20px;
position: relative;
+ background: none;
+ border: none;
}
-.productsitem a.button.wv-layers-close svg.svg-inline--fa {
+.productsitem button.wv-layers-close svg.svg-inline--fa {
width: 12px;
pointer-events: none;
position: absolute;
@@ -604,7 +613,7 @@ li.item.productsitem.inmotion,
height: 42px;
}
-.productsitem.layer-hidden a.visibility {
+.productsitem.layer-hidden button.visibility {
background: #666;
}
@@ -613,12 +622,12 @@ li.item.productsitem.inmotion,
cursor: default;
}
-.disabled.layer-hidden a.visibility:hover {
+.disabled.layer-hidden button.visibility:hover {
background: rgb(255 255 255 / 20%);
cursor: default;
}
-.productsitem.disabled.layer-hidden a.visibility:hover svg.svg-inline--fa {
+.productsitem.disabled.layer-hidden button.visibility:hover svg.svg-inline--fa {
color: #c5c5c8;
}
@@ -694,7 +703,7 @@ li.item.productsitem.inmotion,
margin-top: -13px;
}
- a.visibility {
+ button.visibility {
width: 45px;
}
}
diff --git a/web/scss/features/sidebar.scss b/web/scss/features/sidebar.scss
index 0e15394cec..096b05efe1 100644
--- a/web/scss/features/sidebar.scss
+++ b/web/scss/features/sidebar.scss
@@ -711,41 +711,41 @@ p.recharts-tooltip-label {
}
/* Layers Info */
-.sidebar-panel li.item a.wv-layers-info {
+.sidebar-panel li.item button.wv-layers-info {
color: #333;
text-align: center;
}
-.sidebar-panel li.item a.wv-layers-info .wv-layers-info-icon {
+.sidebar-panel li.item button.wv-layers-info .wv-layers-info-icon {
border-color: #333;
}
-.sidebar-panel li.item a.wv-layers-info.disabled {
+.sidebar-panel li.item button.wv-layers-info.disabled {
color: #aaa;
}
-.sidebar-panel li.item a.wv-layers-info.disabled .wv-layers-info-icon {
+.sidebar-panel li.item button.wv-layers-info.disabled .wv-layers-info-icon {
border-color: #aaa;
}
-.sidebar-panel li.item a.wv-layers-info.disabled:hover {
+.sidebar-panel li.item button.wv-layers-info.disabled:hover {
cursor: no-drop;
background-color: transparent;
}
-.sidebar-panel li.layer-hidden a.wv-layers-info {
+.sidebar-panel li.layer-hidden button.wv-layers-info {
color: #999;
}
-.sidebar-panel li.layer-hidden a.wv-layers-info .wv-layers-info-icon {
+.sidebar-panel li.layer-hidden button.wv-layers-info .wv-layers-info-icon {
border-color: #999;
}
-.sidebar-panel li.layer-hidden a.wv-layers-info.disabled {
+.sidebar-panel li.layer-hidden button.wv-layers-info.disabled {
color: #666;
}
-.sidebar-panel li.layer-hidden a.wv-layers-info.disabled .wv-layers-info-icon {
+.sidebar-panel li.layer-hidden button.wv-layers-info.disabled .wv-layers-info-icon {
border-color: #666;
}
From 2b0b3805fbceb862c45a3d04a894565dcebd3b43 Mon Sep 17 00:00:00 2001
From: Patrick Moulden <4834892+PatchesMaps@users.noreply.github.com>
Date: Fri, 17 Jan 2025 13:12:26 -0500
Subject: [PATCH 3/6] dependency-updates-01-17-2025 (#5662)
---
package-lock.json | 56 +++++++++++++++++++++++++----------------------
package.json | 14 ++++++------
2 files changed, 37 insertions(+), 33 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 447853d517..fbcedfb59d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -47,7 +47,7 @@
"p-queue": "^8.0.1",
"proj4": "^2.15.0",
"prop-types": "^15.8.1",
- "qs": "^6.13.1",
+ "qs": "^6.14.0",
"react": "^18.3.1",
"react-beautiful-dnd": "^13.1.1",
"react-device-detect": "^2.2.3",
@@ -80,7 +80,7 @@
},
"devDependencies": {
"@babel/core": "^7.26.0",
- "@babel/eslint-parser": "^7.25.9",
+ "@babel/eslint-parser": "^7.26.5",
"@babel/plugin-transform-class-properties": "^7.25.9",
"@babel/plugin-transform-private-methods": "^7.25.9",
"@babel/preset-env": "^7.26.0",
@@ -103,15 +103,15 @@
"eslint-config-standard": "^17.1.0",
"eslint-import-resolver-webpack": "^0.13.10",
"eslint-plugin-import": "^2.31.0",
- "eslint-plugin-jest": "^28.10.0",
+ "eslint-plugin-jest": "^28.11.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-n": "^17.15.1",
"eslint-plugin-no-storage": "^1.0.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.6.0",
- "eslint-plugin-react": "^7.37.3",
+ "eslint-plugin-react": "^7.37.4",
"express": "^4.21.0",
- "glob": "^11.0.0",
+ "glob": "^11.0.1",
"husky": "^9.1.7",
"jest": "^29.7.0",
"jest-canvas-mock": "^2.5.2",
@@ -122,13 +122,13 @@
"node-ssh": "^13.2.0",
"npm-run-all": "^4.1.5",
"patch-package": "^8.0.0",
- "postcss": "^8.4.49",
+ "postcss": "^8.5.1",
"postcss-loader": "^8.1.1",
"react-refresh": "^0.16.0",
"react-test-renderer": "^18.3.1",
"redux-mock-store": "^1.5.5",
"run-script-os": "^1.1.6",
- "sass": "^1.83.1",
+ "sass": "^1.83.4",
"sass-loader": "^16.0.4",
"shelljs": "^0.8.5",
"showdown": "^2.1.0",
@@ -217,7 +217,9 @@
}
},
"node_modules/@babel/eslint-parser": {
- "version": "7.25.9",
+ "version": "7.26.5",
+ "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.26.5.tgz",
+ "integrity": "sha512-Kkm8C8uxI842AwQADxl0GbcG1rupELYLShazYEZO/2DYjhyWXJIOUVOE3tBYm6JXzUCNJOZEzqc4rCW/jsEQYQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7623,9 +7625,9 @@
}
},
"node_modules/eslint-plugin-jest": {
- "version": "28.10.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.10.0.tgz",
- "integrity": "sha512-hyMWUxkBH99HpXT3p8hc7REbEZK3D+nk8vHXGgpB+XXsi0gO4PxMSP+pjfUzb67GnV9yawV9a53eUmcde1CCZA==",
+ "version": "28.11.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.11.0.tgz",
+ "integrity": "sha512-QAfipLcNCWLVocVbZW8GimKn5p5iiMcgGbRzz8z/P5q7xw+cNEpYqyzFMtIF/ZgF2HLOyy+dYBut+DoYolvqig==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7797,9 +7799,9 @@
}
},
"node_modules/eslint-plugin-react": {
- "version": "7.37.3",
- "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.3.tgz",
- "integrity": "sha512-DomWuTQPFYZwF/7c9W2fkKkStqZmBd3uugfqBYLdkZ3Hii23WzZuOLUskGxB8qkSKqftxEeGL1TB2kMhrce0jA==",
+ "version": "7.37.4",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.4.tgz",
+ "integrity": "sha512-BGP0jRmfYyvOyvMoRX/uoUeW+GqNj9y16bPQzqAHf3AYII/tDs+jMN0dBVkl88/OZwNGwrVFxE7riHsXVfy/LQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -8932,7 +8934,9 @@
}
},
"node_modules/glob": {
- "version": "11.0.0",
+ "version": "11.0.1",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.1.tgz",
+ "integrity": "sha512-zrQDm8XPnYEKawJScsnM0QzobJxlT/kHOOlRTio8IH/GrmxRE5fjllkzdaHclIuNjUQTJYH2xHNIGfdpJkDJUw==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -13897,9 +13901,9 @@
}
},
"node_modules/postcss": {
- "version": "8.4.49",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz",
- "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==",
+ "version": "8.5.1",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.1.tgz",
+ "integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==",
"dev": true,
"funding": [
{
@@ -13917,7 +13921,7 @@
],
"license": "MIT",
"dependencies": {
- "nanoid": "^3.3.7",
+ "nanoid": "^3.3.8",
"picocolors": "^1.1.1",
"source-map-js": "^1.2.1"
},
@@ -14625,12 +14629,12 @@
"license": "MIT"
},
"node_modules/qs": {
- "version": "6.13.1",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.1.tgz",
- "integrity": "sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg==",
+ "version": "6.14.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz",
+ "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",
"license": "BSD-3-Clause",
"dependencies": {
- "side-channel": "^1.0.6"
+ "side-channel": "^1.1.0"
},
"engines": {
"node": ">=0.6"
@@ -15839,9 +15843,9 @@
"license": "MIT"
},
"node_modules/sass": {
- "version": "1.83.1",
- "resolved": "https://registry.npmjs.org/sass/-/sass-1.83.1.tgz",
- "integrity": "sha512-EVJbDaEs4Rr3F0glJzFSOvtg2/oy2V/YrGFPqPY24UqcLDWcI9ZY5sN+qyO3c/QCZwzgfirvhXvINiJCE/OLcA==",
+ "version": "1.83.4",
+ "resolved": "https://registry.npmjs.org/sass/-/sass-1.83.4.tgz",
+ "integrity": "sha512-B1bozCeNQiOgDcLd33e2Cs2U60wZwjUUXzh900ZyQF5qUasvMdDZYbQ566LJu7cqR+sAHlAfO6RMkaID5s6qpA==",
"dev": true,
"license": "MIT",
"dependencies": {
diff --git a/package.json b/package.json
index 68b278ac11..fa1b2e0d68 100644
--- a/package.json
+++ b/package.json
@@ -78,7 +78,7 @@
},
"devDependencies": {
"@babel/core": "^7.26.0",
- "@babel/eslint-parser": "^7.25.9",
+ "@babel/eslint-parser": "^7.26.5",
"@babel/plugin-transform-class-properties": "^7.25.9",
"@babel/plugin-transform-private-methods": "^7.25.9",
"@babel/preset-env": "^7.26.0",
@@ -101,15 +101,15 @@
"eslint-config-standard": "^17.1.0",
"eslint-import-resolver-webpack": "^0.13.10",
"eslint-plugin-import": "^2.31.0",
- "eslint-plugin-jest": "^28.10.0",
+ "eslint-plugin-jest": "^28.11.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-n": "^17.15.1",
"eslint-plugin-no-storage": "^1.0.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.6.0",
- "eslint-plugin-react": "^7.37.3",
+ "eslint-plugin-react": "^7.37.4",
"express": "^4.21.0",
- "glob": "^11.0.0",
+ "glob": "^11.0.1",
"husky": "^9.1.7",
"jest": "^29.7.0",
"jest-canvas-mock": "^2.5.2",
@@ -120,13 +120,13 @@
"node-ssh": "^13.2.0",
"npm-run-all": "^4.1.5",
"patch-package": "^8.0.0",
- "postcss": "^8.4.49",
+ "postcss": "^8.5.1",
"postcss-loader": "^8.1.1",
"react-refresh": "^0.16.0",
"react-test-renderer": "^18.3.1",
"redux-mock-store": "^1.5.5",
"run-script-os": "^1.1.6",
- "sass": "^1.83.1",
+ "sass": "^1.83.4",
"sass-loader": "^16.0.4",
"shelljs": "^0.8.5",
"showdown": "^2.1.0",
@@ -183,7 +183,7 @@
"p-queue": "^8.0.1",
"proj4": "^2.15.0",
"prop-types": "^15.8.1",
- "qs": "^6.13.1",
+ "qs": "^6.14.0",
"react": "^18.3.1",
"react-beautiful-dnd": "^13.1.1",
"react-device-detect": "^2.2.3",
From a15ec6c897de076f0c8e2d4386be108c6614deb9 Mon Sep 17 00:00:00 2001
From: Patrick Moulden <4834892+PatchesMaps@users.noreply.github.com>
Date: Tue, 21 Jan 2025 17:14:44 -0500
Subject: [PATCH 4/6] WV-2810 ESLint Cleanup: Accessibility Part 2 (#5654)
* Refactor button elements and styles for improved accessibility and consistency across components
* Refactor components to use buttons for better accessibility and interaction
* Update snapshots to replace div elements with buttons for improved accessibility
* Refactor selectors and test cases to replace div elements with buttons for improved accessibility
* Refactor timeline controls to improve button styling and accessibility
* Remove border from zoom level change arrows for improved styling
* Refactor timeline button styles to remove unnecessary borders for improved aesthetics
---
e2e/features/animation/animation-test.spec.js | 4 +-
.../compare/compare-mobile-test.spec.js | 10 ++---
e2e/features/timeline/timeline-test.spec.js | 6 +--
e2e/test-utils/global-variables/selectors.js | 16 +++----
web/.eslintrc | 1 -
web/js/components/compare/mobile-toggle.js | 37 ++++++++++------
.../image-download/lat-long-inputs.js | 8 +++-
web/js/components/layer/info/date-ranges.js | 2 +-
.../browse/category-layer-row.js | 5 ++-
.../browse/measurement-metadata-detail.js | 5 ++-
.../product-picker/search/filter-chips.js | 5 ++-
.../product-picker/search/search-layer-row.js | 4 +-
.../location-search/coordinates-dialog.js | 5 ++-
.../__snapshots__/coordinates.test.js.snap | 6 +--
.../__snapshots__/ol-coordinates.test.js.snap | 8 ++--
web/js/components/map/coordinates.js | 5 ++-
.../measure-tool/measure-tooltip.js | 4 +-
web/js/components/sidebar/event.js | 1 +
web/js/components/sidebar/nav/nav-case.js | 5 ++-
.../smart-handoffs/granule-count.js | 4 +-
.../smart-handoffs/smart-handoff-modal.js | 4 +-
.../interval-select.js | 20 ++++-----
.../components/timeline/mobile-date-picker.js | 5 ++-
.../timeline-controls/animation-button.js | 15 +++++--
.../axis-timescale-change-tooltip.js | 25 ++++++-----
.../axis-timescale-change.js | 1 +
.../timeline-controls/date-change-arrows.js | 15 ++++---
.../timescale-interval-change.js | 44 +++++++++++--------
.../timeline-coverage/timeline-coverage.js | 5 ++-
web/js/components/util/alert.js | 10 +++--
web/js/components/util/arrow.js | 5 ++-
web/js/components/util/switch.js | 1 +
web/js/containers/alertDropdown.js | 2 +-
.../mobile-animation-widget.js | 11 ++++-
web/js/containers/embed.js | 2 +-
web/js/containers/sidebar/layer-row.js | 5 ++-
web/js/containers/timeline/timeline.js | 19 ++++----
web/scss/components/alert.scss | 28 +++++++++---
web/scss/components/dateselector.scss | 6 +++
web/scss/components/facets.scss | 1 +
web/scss/components/image.scss | 5 +++
web/scss/components/tooltip.scss | 13 +++++-
web/scss/features/anim-widget.scss | 3 ++
web/scss/features/compare.scss | 1 +
web/scss/features/layer-categories.scss | 5 +++
web/scss/features/layers.scss | 4 ++
web/scss/features/map.scss | 1 +
web/scss/features/sidebar-panel.scss | 4 ++
web/scss/features/smart-handoff.scss | 22 ++++++++++
web/scss/features/timeline.scss | 40 ++++++++++++++---
50 files changed, 317 insertions(+), 146 deletions(-)
diff --git a/e2e/features/animation/animation-test.spec.js b/e2e/features/animation/animation-test.spec.js
index 1f2d778f60..ea43c11508 100644
--- a/e2e/features/animation/animation-test.spec.js
+++ b/e2e/features/animation/animation-test.spec.js
@@ -64,8 +64,8 @@ test('Disable playback when max frames exceeded', async () => {
const { playButton, yearStartInput } = selectors
await page.goto(animationGeostationary)
await closeModal(page)
- const animateYearDown = page.locator('.wv-date-range-selector > div > div > div:nth-child(3) > svg.downarrow').first()
- const animateYearUp = page.locator('.wv-date-range-selector > div > div > div > svg.uparrow').first()
+ const animateYearDown = page.locator('.wv-date-range-selector > div > div > button:nth-child(3) > svg.downarrow').first()
+ const animateYearUp = page.locator('.wv-date-range-selector > div > div > button > svg.uparrow').first()
await animateYearDown.click()
await expect(playButton).toHaveClass(/disabled/)
// Playback re-enabled when frames within the max
diff --git a/e2e/features/compare/compare-mobile-test.spec.js b/e2e/features/compare/compare-mobile-test.spec.js
index ebd8e92ad9..698bf2ea7a 100644
--- a/e2e/features/compare/compare-mobile-test.spec.js
+++ b/e2e/features/compare/compare-mobile-test.spec.js
@@ -23,8 +23,8 @@ test.afterAll(async () => {
test('Mobile comparison A|B toggle buttons are visible and only A is selected by default', async () => {
await page.goto(swipeAndAIsActive)
await closeModal(page)
- const aMobileCompareButton = page.locator('.comparison-mobile-select-toggle > div:nth-child(1)')
- const bMobileCompareButton = page.locator('.comparison-mobile-select-toggle > div:nth-child(2)')
+ const aMobileCompareButton = page.locator('#compare-toggle-selected-A')
+ const bMobileCompareButton = page.locator('#compare-toggle-selected-B')
await expect(aMobileCompareButton).toHaveClass(/compare-btn-selected/)
await expect(bMobileCompareButton).not.toHaveClass(/compare-btn-selected/)
})
@@ -32,7 +32,7 @@ test('Mobile comparison A|B toggle buttons are visible and only A is selected by
// toggle select B change compare mode date to B
test('Toggling to B compare side changes mobile date picker date', async () => {
const { mobileDatePickerSelectButton } = selectors
- const bMobileCompareButton = page.locator('.comparison-mobile-select-toggle > div:nth-child(2)')
+ const bMobileCompareButton = page.locator('#compare-toggle-selected-B')
// confirm initial A mobile date picker date
await expect(mobileDatePickerSelectButton).toHaveText('2018 AUG 17')
// click B compare toggle button and confirm B mobile date picker date
@@ -63,8 +63,8 @@ test('Expand mobile layer list and confirm comparison mode button is present and
// B compare button toggle is selected on B permalink load and A is not selected
test('B compare button toggle is only selected on B permalink load', async () => {
await page.goto(spyAndBIsActive)
- const aMobileCompareButton = page.locator('.comparison-mobile-select-toggle > div:nth-child(1)')
- const bMobileCompareButton = page.locator('.comparison-mobile-select-toggle > div:nth-child(2)')
+ const aMobileCompareButton = page.locator('#compare-toggle-selected-A')
+ const bMobileCompareButton = page.locator('#compare-toggle-selected-B')
await expect(aMobileCompareButton).not.toHaveClass(/compare-btn-selected/)
await expect(bMobileCompareButton).toHaveClass(/compare-btn-selected/)
})
diff --git a/e2e/features/timeline/timeline-test.spec.js b/e2e/features/timeline/timeline-test.spec.js
index 872ee6cced..8647081c98 100644
--- a/e2e/features/timeline/timeline-test.spec.js
+++ b/e2e/features/timeline/timeline-test.spec.js
@@ -51,7 +51,7 @@ test('Interval defaults to 1 DAY', async () => {
})
test('Change to month zoom level and axis changes', async () => {
- await page.locator('.zoom-level-change div.date-arrows.date-arrow-up').click()
+ await page.locator('.zoom-level-change button.date-arrows.date-arrow-up').click()
const axisGridDay = await page.locator('.axis-grid-text-day').first()
const axisGridMonth = await page.locator('.axis-grid-text-month').first()
const currentZoom = await page.locator('#current-zoom')
@@ -61,8 +61,8 @@ test('Change to month zoom level and axis changes', async () => {
})
test('Change to year zoom level and axis changes', async () => {
- await page.locator('.zoom-level-change div.date-arrows.date-arrow-up').click()
- await page.locator('.zoom-level-change div.date-arrows.date-arrow-up').click()
+ await page.locator('.zoom-level-change button.date-arrows.date-arrow-up').click()
+ await page.locator('.zoom-level-change button.date-arrows.date-arrow-up').click()
const axisGridDay = await page.locator('.axis-grid-text-day').first()
const axisGridYear = await page.locator('.axis-grid-text-year').first()
const currentZoom = await page.locator('#current-zoom')
diff --git a/e2e/test-utils/global-variables/selectors.js b/e2e/test-utils/global-variables/selectors.js
index 659a20c44f..8c56f25aba 100644
--- a/e2e/test-utils/global-variables/selectors.js
+++ b/e2e/test-utils/global-variables/selectors.js
@@ -15,8 +15,8 @@ module.exports = (page) => ({
animationButtonCase: page.locator('#timeline-header .animate-button'),
animationButton: page.locator('.animate-button'),
playButton: page.locator('#play-button'),
- animateYearUp: page.locator('.wv-date-range-selector > div > div:nth-child(2) > div > svg.uparrow'),
- animateYearDown: page.locator('.wv-date-range-selector > div > div > div:nth-child(3) > svg.downarrow'),
+ animateYearUp: page.locator('.wv-date-range-selector > div > div:nth-child(2) > button > svg.uparrow'),
+ animateYearDown: page.locator('.wv-date-range-selector > div > div > button:nth-child(3) > svg.downarrow'),
yearStartInput: page.locator('#year-animation-widget-start'),
monthStartInput: page.locator('#month-animation-widget-start'),
dayStartInput: page.locator('#day-animation-widget-start'),
@@ -112,12 +112,12 @@ module.exports = (page) => ({
dragger: page.locator('.timeline-dragger'),
draggerA: page.locator('.timeline-dragger.draggerA'),
draggerB: page.locator('.timeline-dragger.draggerB'),
- dayDown: page.locator('.input-wrapper-day > div.date-arrows.date-arrow-down'),
- dayUp: page.locator('.input-wrapper-day > div.date-arrows.date-arrow-up'),
- monthDown: page.locator('.input-wrapper-month > div.date-arrows.date-arrow-down'),
- monthUp: page.locator('.input-wrapper-month > div.date-arrows.date-arrow-up'),
- yearDown: page.locator('.input-wrapper-year > div.date-arrows.date-arrow-down'),
- yearUp: page.locator('.input-wrapper-year > div.date-arrows.date-arrow-up'),
+ dayDown: page.locator('.input-wrapper-day > button.date-arrows.date-arrow-down'),
+ dayUp: page.locator('.input-wrapper-day > button.date-arrows.date-arrow-up'),
+ monthDown: page.locator('.input-wrapper-month > button.date-arrows.date-arrow-down'),
+ monthUp: page.locator('.input-wrapper-month > button.date-arrows.date-arrow-up'),
+ yearDown: page.locator('.input-wrapper-year > button.date-arrows.date-arrow-down'),
+ yearUp: page.locator('.input-wrapper-year > button.date-arrows.date-arrow-up'),
datePickerWheel: page.locator('.datepicker-modal .datepicker-wheel'),
dateSelectorDayInput: page.locator('#date-selector-main .input-wrapper-day input'),
dateSelectorMonthInput: page.locator('#date-selector-main .input-wrapper-month input'),
diff --git a/web/.eslintrc b/web/.eslintrc
index f28cdc85ee..4dff861b7d 100644
--- a/web/.eslintrc
+++ b/web/.eslintrc
@@ -100,7 +100,6 @@
"import/no-cycle": "warn",
// Accesibility rules overrides
"jsx-a11y/no-static-element-interactions": "off", // 71 errors across 39 files
- "jsx-a11y/click-events-have-key-events": "off", // 70 errors across 39 files
// React rules overrides
"react/jsx-props-no-spreading": "warn", // 6 errors across 2 files
"react/jsx-filename-extension": "off", // 206 errors across 206 files
diff --git a/web/js/components/compare/mobile-toggle.js b/web/js/components/compare/mobile-toggle.js
index ae2e206c2e..c4407eacad 100644
--- a/web/js/components/compare/mobile-toggle.js
+++ b/web/js/components/compare/mobile-toggle.js
@@ -10,39 +10,50 @@ function MobileComparisonToggle (props) {
toggleActiveCompareState,
} = props;
- const [isCompareASelected, toggleCompareASelected] = useState(isCompareA);
+ const [isCompareASelected, setCompareASelected] = useState(isCompareA);
useEffect(() => {
if (isCompareASelected !== isCompareA) {
- toggleCompareASelected(isCompareA);
+ setCompareASelected(isCompareA);
}
}, [isCompareA]);
- useEffect(() => {
- if (isCompareASelected !== isCompareA) {
- toggleActiveCompareState();
- }
- }, [isCompareASelected]);
+
+ if (isCompareASelected !== isCompareA) {
+ toggleActiveCompareState();
+ }
if (!active) {
return null;
}
+ const handleClick = (evt) => {
+ if (evt.target.id === 'compare-toggle-selected-A') {
+ setCompareASelected(true);
+ } else {
+ setCompareASelected(false);
+ }
+ };
+
const classA = isCompareASelected ? 'compare-btn-selected' : '';
const classB = !isCompareASelected ? 'compare-btn-selected' : '';
return (
{showMoreInfo ? 'Hide Info' : 'Show More Info'}
-
Click anywhere to interact
diff --git a/web/js/containers/sidebar/layer-row.js b/web/js/containers/sidebar/layer-row.js index a1e4ba9c3c..7946412d6d 100644 --- a/web/js/containers/sidebar/layer-row.js +++ b/web/js/containers/sidebar/layer-row.js @@ -403,7 +403,8 @@ function LayerRow (props) { : 'Zoom in further to click features.'; const layerVectorBtnId = `layer-vector-hand-btn-${encodedLayerId}`; return ( -