Skip to content

Commit

Permalink
Merge pull request #4430 from nasa-gibs/release
Browse files Browse the repository at this point in the history
Release v4.8.0 to Main
  • Loading branch information
ryanweiler92 authored Jun 14, 2023
2 parents c4769a0 + 393fd12 commit 9d4ce3a
Show file tree
Hide file tree
Showing 24 changed files with 1,785 additions and 1,288 deletions.
2,014 changes: 1,075 additions & 939 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "worldview",
"version": "4.7.0",
"version": "4.8.0",
"description": "Interactive interface for browsing full-resolution, global satellite imagery",
"keywords": [
"NASA",
Expand Down Expand Up @@ -78,11 +78,11 @@
"@babel/core": "^7.22.1",
"@babel/eslint-parser": "^7.21.8",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/preset-env": "^7.21.5",
"@babel/preset-react": "^7.22.3",
"@playwright/test": "^1.34.3",
"@babel/preset-env": "^7.22.5",
"@babel/preset-react": "^7.22.5",
"@playwright/test": "^1.35.0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
"@webpack-cli/serve": "^2.0.4",
"@webpack-cli/serve": "^2.0.5",
"ajv": "^8.12.0",
"autoprefixer": "^10.4.14",
"axios": "^1.4.0",
Expand All @@ -94,9 +94,9 @@
"css-minimizer-webpack-plugin": "^5.0.0",
"css-url-relative-plugin": "^1.1.0",
"cssnano": "^6.0.1",
"eslint": "^8.41.0",
"eslint": "^8.42.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-standard": "^17.0.0",
"eslint-config-standard": "^17.1.0",
"eslint-import-resolver-webpack": "^0.13.2",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.1",
Expand All @@ -109,7 +109,7 @@
"eslint-plugin-standard": "^5.0.0",
"express": "^4.18.2",
"fetch-mock": "^9.11.0",
"glob": "^10.2.6",
"glob": "^10.2.7",
"husky": "^8.0.3",
"jest": "^29.5.0",
"jest-canvas-mock": "^2.5.1",
Expand All @@ -130,14 +130,14 @@
"sass-loader": "^13.3.0",
"shelljs": "^0.8.5",
"showdown": "^2.1.0",
"stylelint": "^15.6.2",
"stylelint": "^15.7.0",
"stylelint-config-standard-scss": "^9.0.0",
"stylelint-high-performance-animation": "^1.8.0",
"tar": "^6.1.15",
"terser-webpack-plugin": "^5.3.9",
"webpack": "^5.85.0",
"webpack": "^5.86.0",
"webpack-bundle-analyzer": "^4.9.0",
"webpack-cli": "^5.1.1",
"webpack-cli": "^5.1.4",
"webpack-dev-middleware": "^6.1.1",
"webpack-dev-server": "^4.15.0",
"xml-js": "^1.6.11",
Expand Down
1 change: 0 additions & 1 deletion tasks/util/upload.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

const fs = require('fs')
const os = require('os')
const path = require('path')
Expand Down
5 changes: 3 additions & 2 deletions web/js/components/animation-widget/loading-indicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {

export default function LoadingIndicator(props) {
const {
onClose, title, bodyMsg, loadedItems, totalItems,
onClose, title, bodyMsg, loadedItems, totalItems, isKioskModeActive,
} = props;

const msgStyle = {
Expand All @@ -31,7 +31,7 @@ export default function LoadingIndicator(props) {
</button>
);

return (
return !isKioskModeActive && (
<Modal
isOpen
toggle={onClose}
Expand All @@ -56,4 +56,5 @@ LoadingIndicator.propTypes = {
bodyMsg: PropTypes.string,
loadedItems: PropTypes.number,
totalItems: PropTypes.number,
isKioskModeActive: PropTypes.bool,
};
4 changes: 3 additions & 1 deletion web/js/components/animation-widget/play-queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ class PlayQueue extends React.Component {

render() {
const { isAnimating } = this.state;
const { onClose, isMobile } = this.props;
const { onClose, isMobile, isKioskModeActive } = this.props;
const loadedItems = util.objectLength(this.bufferObject);
const title = !this.minBufferLength ? 'Determining buffer size...' : 'Preloading buffer...';
const mobileProgressStyle = {
Expand All @@ -459,6 +459,7 @@ class PlayQueue extends React.Component {
onClose={onClose}
loadedItems={loadedItems}
totalItems={this.minBufferLength || 100}
isKioskModeActive={isKioskModeActive}
/>
);
}
Expand All @@ -480,6 +481,7 @@ PlayQueue.propTypes = {
onClose: PropTypes.func,
numberOfFrames: PropTypes.number,
snappedCurrentDate: PropTypes.object,
isKioskModeActive: PropTypes.bool,
};

export default PlayQueue;
33 changes: 14 additions & 19 deletions web/js/components/map/loading-spinner.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { Spinner } from 'reactstrap';
import { useSelector } from 'react-redux';

function LoadingIndicator() {
const {
msg,
shouldSpinnerShow,
isMobile,
} = useSelector((state) => ({
msg: state.loading.msg,
shouldSpinnerShow: state.loading.isLoading && !state.ui.isKioskModeActive,
isMobile: state.screenSize.isMobileDevice,
}));

function LoadingIndicator({ msg, isLoading, isMobile }) {
const spinnerStyle = isMobile ? {
position: 'absolute',
top: 10,
Expand All @@ -17,26 +26,12 @@ function LoadingIndicator({ msg, isLoading, isMobile }) {
zIndex: 999,
};

return isLoading && (
return shouldSpinnerShow && (
<div style={spinnerStyle}>
<Spinner color="light" size="sm" />
{msg}
</div>
);
}
LoadingIndicator.propTypes = {
msg: PropTypes.string,
isLoading: PropTypes.bool,
isMobile: PropTypes.bool,
};

const mapStateToProps = (state) => {
const { screenSize, loading } = state;
const { msg, isLoading } = loading;
return {
isLoading,
isMobile: screenSize.isMobileDevice,
msg,
};
};
export default connect(mapStateToProps)(LoadingIndicator);
export default LoadingIndicator;
5 changes: 2 additions & 3 deletions web/js/containers/animation-widget/animation-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ function AnimationWidget (props) {
startDate={startDate}
endDate={endDate}
interval={interval}
isKioskModeActive={isKioskModeActive}
delta={delta}
speed={speed}
selectDate={selectDate}
Expand Down Expand Up @@ -377,8 +378,6 @@ const mapStateToProps = (state) => {
const hasFutureLayers = activeLayersForProj.filter((layer) => layer.futureTime).length > 0;
const layerDateRange = getDateRange({}, activeLayersForProj);

const isAntarctic = proj.id === 'arctic';

const minDate = new Date(config.startDate);
let maxDate;
if (layerDateRange && layerDateRange.end > appNow) {
Expand All @@ -390,7 +389,7 @@ const mapStateToProps = (state) => {
const {
isDistractionFreeModeActive, isKioskModeActive, animationAvailabilityChecked, eic,
} = ui;
const checkAnimationAvailability = (eic === 'sa' || eic === 'da') && !animationAvailabilityChecked && isKioskModeActive && isPlaying && !isAntarctic;
const checkAnimationAvailability = (eic === 'sa' || eic === 'da') && !animationAvailabilityChecked && isKioskModeActive && isPlaying;
const { isEmbedModeActive } = embed;
const animationIsActive = isActive
&& lodashGet(map, 'ui.selected.frameState_')
Expand Down
20 changes: 16 additions & 4 deletions web/js/containers/tour.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
startTour as startTourAction,
} from '../modules/tour/actions';
import { resetProductPickerState as resetProductPickerStateAction } from '../modules/product-picker/actions';

import { changeTab as changeTabAction } from '../modules/sidebar/actions';
import ErrorBoundary from './error-boundary';
import history from '../main';
import util from '../util/util';
Expand Down Expand Up @@ -226,9 +226,12 @@ class Tour extends React.Component {
currentStoryId,
} = this.state;
const {
config, renderedPalettes, processStepLink, isKioskModeActive,
config, renderedPalettes, processStepLink, isKioskModeActive, activeTab, changeTab,
} = this.props;
const kioskParam = this.getKioskParam(isKioskModeActive);

if (activeTab === 'events') changeTab('layers');

if (currentStep + 1 <= totalSteps) {
const newStep = currentStep + 1;
this.fetchMetadata(currentStory, currentStep);
Expand Down Expand Up @@ -257,12 +260,15 @@ class Tour extends React.Component {

decreaseStep(e) {
const {
config, renderedPalettes, processStepLink, isKioskModeActive,
config, renderedPalettes, processStepLink, isKioskModeActive, activeTab, changeTab,
} = this.props;
const {
currentStep, currentStory, currentStoryId,
} = this.state;
const kioskParam = this.getKioskParam(isKioskModeActive);

if (activeTab === 'events') changeTab('layers');

if (currentStep - 1 >= 1) {
const newStep = currentStep - 1;
this.fetchMetadata(currentStory, newStep - 1);
Expand Down Expand Up @@ -518,11 +524,14 @@ const mapDispatchToProps = (dispatch) => ({
resetProductPicker: () => {
dispatch(resetProductPickerStateAction());
},
changeTab: (str) => {
dispatch(changeTabAction(str));
},
});

const mapStateToProps = (state) => {
const {
screenSize, config, tour, palettes, models, compare, map,
screenSize, config, tour, palettes, models, compare, map, sidebar,
} = state;
const { screenWidth, screenHeight } = screenSize;
const { isKioskModeActive } = state.ui;
Expand All @@ -539,6 +548,7 @@ const mapStateToProps = (state) => {
screenWidth,
screenHeight,
renderedPalettes: palettes.rendered,
activeTab: sidebar.activeTab,
};
};

Expand All @@ -557,6 +567,8 @@ export default connect(
)(Tour);

Tour.propTypes = {
activeTab: PropTypes.string,
changeTab: PropTypes.func,
config: PropTypes.object.isRequired,
map: PropTypes.object,
selectTour: PropTypes.func.isRequired,
Expand Down
Loading

0 comments on commit 9d4ce3a

Please sign in to comment.