Interactive interface for browsing global, full-resolution satellite imagery
add stylelint high performance animation, change link css to share remove unused code, revise layout animation css
Ed Plato6f15961829a3
diff --git a/.stylelintrc b/.stylelintrcindex 357707176..0485d921c 100644--- a/.stylelintrc+++ b/.stylelintrc@@ -2,7 +2,11 @@"ignoreFiles": ["**/*.js"],+ "plugins": ["stylelint-high-performance-animation"],"rules": {+ "plugin/no-low-performance-animation-properties": [true, {+ ignore: "paint-properties"+ }],"color-no-invalid-hex": true,"font-family-no-duplicate-names": true,"function-calc-no-unspaced-operator": true,diff --git a/package-lock.json b/package-lock.jsonindex 44c1831eb..d2c4ad70b 100644--- a/package-lock.json+++ b/package-lock.json@@ -24173,6 +24173,12 @@}}},+ "stylelint-high-performance-animation": {+ "version": "1.5.2",+ "resolved": "https://registry.npmjs.org/stylelint-high-performance-animation/-/stylelint-high-performance-animation-1.5.2.tgz",+ "integrity": "sha512-6LQek7kSBt288ks4ygUUTq+jhm4N2o+MW9HIU1ZL0v0+12fQD2F4nc4nfwhbwk33Ge8lu8dbT4G7+ksp/DgPNw==",+ "dev": true+ },"stylis": {"version": "3.5.4","resolved": "https://registry.npmjs.org/stylis/-/stylis-3.5.4.tgz",diff --git a/package.json b/package.jsonindex d6d242928..aa60e79e1 100644--- a/package.json+++ b/package.json@@ -155,6 +155,7 @@"shelljs": "^0.8.2","showdown": "^1.9.1","stylelint": "^13.2.0",+ "stylelint-high-performance-animation": "^1.5.2","tar": "^6.0.1","terser-webpack-plugin": "^4.2.3","url-loader": "^4.1.0",diff --git a/web/css/anim.widget.css b/web/css/anim.widget.cssindex a6bf6423b..dc99847cf 100644--- a/web/css/anim.widget.css+++ b/web/css/anim.widget.css@@ -220,7 +220,6 @@ a .wv-animation-widget-icon {font-weight: 400;padding-left: 10px;margin-bottom: 4px;- transition: border 0.5s ease;}.gif-download-grid .grid-child.label {diff --git a/web/css/button.css b/web/css/button.cssindex ea07800db..c27d95b64 100644--- a/web/css/button.css+++ b/web/css/button.css@@ -29,7 +29,7 @@.wv-button:hover {border-color: #eee;background-color: #eee;- transition: background 0.5s ease, border-color 0.5s ease, color 0.5s ease;+ transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease;background-image: none;color: #404040;cursor: pointer;diff --git a/web/css/layers.css b/web/css/layers.cssindex e564c9c1f..0b5f23421 100644--- a/web/css/layers.css+++ b/web/css/layers.css@@ -32,7 +32,7 @@}&.search-row.selected {left: 0;- transition: background 200ms linear, border 200ms linear;+ transition: background-color 200ms linear;background: #eee;border-left: 6px solid #d54f21;border-top: 1px solid #ddd;@@ -42,18 +42,18 @@color: #666;}& .layers-all-header > h3 {- transition: all 200ms ease;+ transition: background-color 200ms ease;color: #000;font-weight: 500;}& .layers-all-header > h4,.layers-all-header > h5 {- transition: all 200ms ease;+ transition: background-color 200ms ease;color: #333;}}&:hover:not(.selected) {- transition: all 100ms linear;+ transition: background-color 100ms linear;background-color: #5a5a5a;}&.search-row:hover:not(.selected) {diff --git a/web/css/link.css b/web/css/link.cssdeleted file mode 100644index eb336ced4..000000000--- a/web/css/link.css+++ /dev/null@@ -1,202 +0,0 @@-.wv-link-panel,-.wv-link-panel .wv-dialog {- overflow: visible;-}--.wv-link {- border-bottom: 1px solid #555;- padding-bottom: 12px;-}--.wv-link input[type='text'] {- width: 100%;- cursor: text;- -webkit-box-sizing: border-box;- box-sizing: border-box;-}--.wv-link .input-group {- position: relative;- display: block;- width: 100%;- margin-top: 10px;-}--.wv-link .input-group input {- position: relative;- height: 30px;- width: 100%;- border: 1px solid #d5d5d5;- border-radius: 3px;- padding-right: 36px;-}--.wv-link .input-group-button {- position: absolute;- top: 0;- right: 0;-}--.wv-link .hide-icon[data-tooltip]::before,-.wv-link .hide-icon[data-tooltip]::after,-.wv-link .hide-icon[data-tooltip]:hover::before,-.wv-link .hide-icon[data-tooltip]:hover::after {- -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)';- filter: alpha(opacity=0);- -khtml-opacity: 0;- -moz-opacity: 0;- opacity: 0;- pointer-events: none;- -webkit-transition: all 0.18s ease-out 0.18s;- transition: all 0.18s ease-out 0.18s;- bottom: 100%;- left: 50%;- position: absolute;- z-index: 10;- -webkit-transform: translate(-50%, 10px);- transform: translate(-50%, 10px);- -webkit-transform-origin: top;- transform-origin: top;-}--.wv-link [data-tooltip-length='xsmall']::after {- width: 75px;-}--.wv-link .copy-btn {- position: relative;- padding: 0;- display: inline-block;- font-size: 10px;- font-weight: 700;- line-height: 20px;- color: #333;- white-space: nowrap;- vertical-align: middle;- cursor: pointer;- background-color: #ccc;- background-image: -webkit-gradient(linear, left top, left bottom, from(#dcdcdc), to(#ccc));- background-image: linear-gradient(#dcdcdc, #ccc);- border: 1px solid #ccc;- border-radius: 3px;- border-top-left-radius: 0;- border-bottom-left-radius: 0;- -webkit-user-select: none;- -moz-user-select: none;- -ms-user-select: none;- user-select: none;- -webkit-appearance: none;- height: 30px;- width: 36px;-}--.wv-link .copy-btn:hover {- text-decoration: none;- background-color: #bbb;- background-image: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#bbb));- background-image: linear-gradient(#ccc, #bbb);- border-color: #bbb;-}--.wv-link .copy-btn:hover::before {- display: none;-}--.social-share {- padding-top: 10px;- display: -webkit-box;- display: -ms-flexbox;- display: flex;- -ms-flex-pack: distribute;- justify-content: space-around;-}--.social-share .icon-link {- background-color: #000;- border-radius: 50%;- color: #fff;- display: inline-block;- height: 48px;- line-height: 48px;- width: 48px;- font-size: 26px;- text-align: center;- cursor: pointer;- text-decoration: none;- border: 2px solid transparent;- transition: border 0.4s;- &:hover {- border: 2px solid #fff;- }- & svg.svg-inline--fa {- margin-bottom: 2px;- }-}--.social-share .social-icon-container-facebook {- background-color: #3b5998;-}--.social-share .social-icon-container-twitter {- background-color: #00aced;-}--.social-share .social-icon-container-reddit-alien {- background-color: #ff5700;-}--.social-share .social-icon-container-email {- background-color: #505050;-}--.share-body {- height: 108px;-}--.share-nav-container {- .input-group {- padding-top: 10px;- }- .share-tab-link {- p {- padding: 20px 1px;- }- }- .share-tab-embed {- p {- padding: 10px 1px;- }- }- .share-tab-social {- p {- padding: 10px 1px;- }- }- & .nav-item {- flex: 1;- }- & .nav-link {- padding: 6px;- }-- a:not(.share-embed-doc-link) {- color: #fff;- user-select: none;- cursor: pointer;- &:hover:not(.active) {- color: #fff !important;- text-decoration: none;- }- }- a.share-embed-doc-link {- color: #7bf;- &:hover {- color: #7df;- }- }- .wv-checkbox {- position: absolute;- right: 12px;- bottom: 14px;- }-}diff --git a/web/css/notifications.css b/web/css/notifications.cssindex 185e37c2e..3f993dc81 100644--- a/web/css/notifications.css+++ b/web/css/notifications.css@@ -1,6 +1,4 @@#wv-info-button {- -webkit-transition: background 500;- transition: background 500;position: relative;}diff --git a/web/css/palettes.css b/web/css/palettes.cssindex a54fd709c..2e5b348ea 100644--- a/web/css/palettes.css+++ b/web/css/palettes.css@@ -97,8 +97,8 @@.wv-palettes-panel .wv-running-label {visibility: hidden;position: absolute;- -webkit-transition-property: left;- transition-property: left;+ -webkit-transition-property: transform;+ transition-property: transform;-webkit-transition-duration: 100ms, 100ms;transition-duration: 100ms, 100ms;-webkit-transition-delay: 0s, 0s;@@ -135,14 +135,14 @@.wv-palettes-panel .wv-running-bar::before {top: -1px;- left: -5px;+ left: -4px;border-left: 5.5px solid transparent;border-right: 5.5px solid transparent;border-top: 5.5px solid #000;}.wv-palettes-panel .wv-running-bar::after {- left: -4px;+ left: -5px;border-left: 4.5px solid transparent;border-right: 4.5px solid transparent;border-top: 4px solid #dedede;@@ -162,7 +162,7 @@visibility: visible;}-.active-lengend.wv-palettes-panel .wv-running .wv-running-bar {+.active-legend.wv-palettes-panel .wv-running .wv-running-bar {visibility: hidden;}diff --git a/web/css/share.css b/web/css/share.cssnew file mode 100644index 000000000..b494df5e4--- /dev/null+++ b/web/css/share.css@@ -0,0 +1,97 @@+.social-share {+ padding-top: 10px;+ display: -webkit-box;+ display: -ms-flexbox;+ display: flex;+ -ms-flex-pack: distribute;+ justify-content: space-around;+}++.social-share .icon-link {+ background-color: #000;+ border-radius: 50%;+ color: #fff;+ display: inline-block;+ height: 48px;+ line-height: 48px;+ width: 48px;+ font-size: 26px;+ text-align: center;+ cursor: pointer;+ text-decoration: none;+ border: 2px solid transparent;+ &:hover {+ border: 2px solid #fff;+ }+ & svg.svg-inline--fa {+ margin-bottom: 2px;+ }+}++.social-share .social-icon-container-facebook {+ background-color: #3b5998;+}++.social-share .social-icon-container-twitter {+ background-color: #00aced;+}++.social-share .social-icon-container-reddit-alien {+ background-color: #ff5700;+}++.social-share .social-icon-container-email {+ background-color: #505050;+}++.share-body {+ height: 108px;+}++.share-nav-container {+ .input-group {+ padding-top: 10px;+ }+ .share-tab-link {+ p {+ padding: 20px 1px;+ }+ }+ .share-tab-embed {+ p {+ padding: 10px 1px;+ }+ }+ .share-tab-social {+ p {+ padding: 10px 1px;+ }+ }+ & .nav-item {+ flex: 1;+ }+ & .nav-link {+ padding: 6px;+ }++ a:not(.share-embed-doc-link) {+ color: #fff;+ user-select: none;+ cursor: pointer;+ &:hover:not(.active) {+ color: #fff !important;+ text-decoration: none;+ }+ }+ a.share-embed-doc-link {+ color: #7bf;+ &:hover {+ color: #7df;+ }+ }+ .wv-checkbox {+ position: absolute;+ right: 12px;+ bottom: 14px;+ }+}diff --git a/web/css/sidebar.css b/web/css/sidebar.cssindex 820d73d7f..ff187183a 100644--- a/web/css/sidebar.css+++ b/web/css/sidebar.css@@ -17,7 +17,6 @@box-sizing: border-box;padding: 0;border-top: none;- transition: max-height 0.1s ease;overflow: hidden;.layer-container {box-sizing: border-box;@@ -520,6 +519,11 @@ footer .compare-toggle-button {padding: 0 4px;}+ .classification-list {+ padding-top: 3px;+ padding-left: 2px;+ }+.layer-threshold-select {height: 58px;}diff --git a/web/css/smart-handoff.css b/web/css/smart-handoff.cssindex e73cde03b..354fb9553 100644--- a/web/css/smart-handoff.css+++ b/web/css/smart-handoff.css@@ -166,6 +166,8 @@ label[for='chk-crop-toggle'] span {@keyframes ellipsis {to {++ /* stylelint-disable-next-line plugin/no-low-performance-animation-properties */width: 1.25em;}}diff --git a/web/css/switch.css b/web/css/switch.cssindex 7ef5bf8a2..e82749635 100644--- a/web/css/switch.css+++ b/web/css/switch.css@@ -58,18 +58,13 @@width: 15px;height: 15px;border-radius: 15px;- transition: 0.2s;+ transition: transform 0.2s linear;background: #fff;box-shadow: 0 0 2px 0 rgba(10, 10, 10, 0.29);}.react-switch-checkbox:checked + .react-switch-label .react-switch-button {- left: calc(100% - 2px);- transform: translateX(-100%);-}--.react-switch-label:active .react-switch-button {- width: 20px;+ transform: translateX(75%);}.switch-thin-border .react-switch-label {diff --git a/web/js/app.js b/web/js/app.jsindex 02a5a97dc..9ef9b9db7 100644--- a/web/js/app.js+++ b/web/js/app.js@@ -58,7 +58,7 @@ import '../css/button.css';import '../css/modal.css';import '../css/checkbox.css';import '../css/map.css';-import '../css/link.css';+import '../css/share.css';import '../css/palettes.css';import '../css/image.css';import '../css/projection.css';diff --git a/web/js/components/sidebar/paletteLegend.js b/web/js/components/sidebar/paletteLegend.jsindex 8984f2b24..c8a538b25 100644--- a/web/js/components/sidebar/paletteLegend.js+++ b/web/js/components/sidebar/paletteLegend.js@@ -35,16 +35,19 @@ const getLegendObject = (legend, hex, acceptableDifference) => {* @param {Number} width | Case width*/const getRunningLabelStyle = (xOffset, textWidth, width) => {- if (!xOffset || !textWidth || !width) return { left: '0' };+ if (!xOffset || !textWidth || !width) return { transform: 'translateX(0)' };const halfTextWidth = textWidth / 2 || 0;if (halfTextWidth > xOffset) {- return { left: '0' };+ return { transform: 'translateX(0)' };} if (xOffset + halfTextWidth > width) {return { right: '0' };}- return { left: `${Math.floor(xOffset - halfTextWidth)}px` };+ return { transform: `translateX(${Math.floor(xOffset - halfTextWidth)}px)` };};++// `translateX(${isHoveringLegend ? 0 : xOffset > 0 ? xOffset + 0.5 : 0}px)`,+class PaletteLegend extends React.Component {constructor(props) {super(props);@@ -250,7 +253,7 @@ class PaletteLegend extends React.Component {className="wv-running-bar"style={{top: 7,- left: isHoveringLegend ? 0 : xOffset > 0 ? xOffset + 0.5 : 0,+ transform: `translateX(${isHoveringLegend ? 0 : xOffset > 0 ? xOffset + 0.5 : 0}px)`,visibility: legendObj && !isHoveringLegend ? 'visible' : 'hidden',}}/>@@ -390,7 +393,7 @@ class PaletteLegend extends React.Component {<divclassName={isHoveringLegend- ? `active-lengend wv-palettes-panel${customClass}`+ ? `active-legend wv-palettes-panel${customClass}`: `wv-palettes-panel${customClass}`}datalayer={layer.id}