Interactive interface for browsing global, full-resolution satellite imagery
add docs for joyride; layer catgeories and measurements
Jason Kent94e22639a668
diff --git a/doc/config/categories.jpg b/doc/config/categories.jpgnew file mode 100644index 000000000..3801b9f62Binary files /dev/null and b/doc/config/categories.jpg differdiff --git a/doc/config/configuration.md b/doc/config/configuration.mdindex 083accd69..0eebf1c81 100644--- a/doc/config/configuration.md+++ b/doc/config/configuration.md@@ -14,37 +14,36 @@The configuration used in the main application at `https://worldview.earthdata.nasa.gov` is built from the various JSON files found in the `config/default` directory.-To create a custom configuration, either:--* Copy the `config/default` directory to `config/active` and modify it as needed.-* Clone the basic template repository with a minimual configuration to `config/active`--Any configuration found in `config/active` will be used instead of `config/default`.--Clone the template repository with:--```bash-git clone https://github.com/nasa-gibs/worldview-options-template.git config/active-```+To create a custom configuration simply copy the `config/default` directory to `config/active` and modify it's contents as needed. Any configuration found in here will be used instead of `config/default`.To quickly switch between different configurations, use a symlink for `config/active`## Updating the Configuration-After making any changes to a custom configuration, rebuild the app for thechanges to take effect.+After making any changes to a custom configuration, rebuild the app for the changes to take effect.Use the `npm run build` command to make a request to [the GIBS GetCapabilities API](https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+API+for+Developers) to update layer configurations and rebuild theconfiguration file `wv.json` used by the application.-If you just want to rebuild `wv.json` based on the last GetCapabilities files that were pulled,+If you just want to rebuild `wv.json` based on the last GetCapabilities files that were previously requested,for example if you are modifying configs locally and want to see/test your changes,you can simply run `npm run build:config`### SubdirectoriesIf you have a custom configuration in a subdirectory of `config/` other than-`config/release/`, pass in the name of the subdirectory to use with-`CONFIG_ENV=subdirectory_name npm run build:config`.-To build an incomplete configuration, prefix the command like this: `IGNORE_ERRORS=true npm run build:config`.+`config/release/`, pass in the name of the subdirectory to use like so:++```bash+CONFIG_ENV=subdirectory_name npm run build:config+```++### Ignoring Build Errors++To build an incomplete configuration, ignoring build errors, prefix the command like this:++```bash+IGNORE_ERRORS=true npm run build:config+```---@@ -56,15 +55,12 @@ For layers that can be configured via a GIBS WMTS GetCapabilities document orfor WMS layers, the only property required is:* **url**: Either a string or array of strings where the map service is found.--For WMTS layers that cannot be configured with a GetCapabilities document, a-*matrixSets* object must exist that contains an object for each matrix set,-keyed by the matrix set identifier.--* **id**: The identifier for this matrix set.-* **maxResolution**: The maximum resolution of this of this matrix tile set as defined in the [OpenLayers 2 documentation](http://dev.openlayers.org/docs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.maxResolution). This property might be deprecated in the future as it can be obtained from the *resolutions* property.-* **resolutions**: Array of resolutions for each zoom level as defined in the [OpenLayers 2 documentation](http://dev.openlayers.org/docs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.maxResolution).-* **tileSize**: Array of pixel dimensions for each tile. Example; `[512, 512]`+* **matrixSets**: For WMTS layers that cannot be configured with a GetCapabilities document, an+object must exist that contains an object for each matrix set, keyed by the matrix set identifier.+ * **id**: The identifier for this matrix set.+ * **maxResolution**: The maximum resolution of this of this matrix tile set as defined in the [OpenLayers 2 documentation](http://dev.openlayers.org/docs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.maxResolution). This property might be deprecated in the future as it can be obtained from the *resolutions* property.+ * **resolutions**: Array of resolutions for each zoom level as defined in the [OpenLayers 2 documentation](http://dev.openlayers.org/docs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.maxResolution).+ * **tileSize**: Array of pixel dimensions for each tile. Example; `[512, 512]`### Example sources.json@@ -96,12 +92,12 @@ keyed by the matrix set identifier.To automatically fetch configuration information from the GetCapabilitiesdocument, modify the `config/default/release/config.json` file and add an object to the-`wv-options-fetch` object with the following properties:+`wv-options-fetch` array with the following properties:* **from**: The URL to fetch the GetCapabilities document* **to**: Name of the temporary file used to store the GetCapabilities document.-Now add an object to the `wv-options-wmts` object with the following properties:+Now add an object to the `wv-options-wmts` array with the following properties:* **source**: The identifier of the source that corresponds to this endpoint.* **from**: The name of the temporary file used int he `wv-options-fetch` object.diff --git a/doc/config/measurements.jpg b/doc/config/measurements.jpgnew file mode 100644index 000000000..880a76a96Binary files /dev/null and b/doc/config/measurements.jpg differdiff --git a/doc/config/product_picker.md b/doc/config/product_picker.mdindex 051ac5f8c..158ba0712 100644--- a/doc/config/product_picker.md+++ b/doc/config/product_picker.md@@ -32,4 +32,95 @@ Newly added layers require some additional steps and configuration in order to p## Adding New Categories-## Adding New Measurements\ No newline at end of file+++Within the layer picker layers are grouped by categories and measurements. Categories are grouped by a category group. Measurements are grouped by, and can belong to more than one, category.++In the image above we see that three top-level category groups are: `hazards and disasters`, `science disciplines`, and `featured`. For each category group a tab is shown in the layer picker. The `recent` tab is not a category group per-se and is always visible.++Within the `hazards and disasters` tab we can also see the first three categories in this group: `All`, `Air Quality`, and `Ash Plumes`. Finally, within each of these categories we can see the first six measurements within that category.++### Category Group Order++The names of each category group, which are treated as unique identifiers and referenced in each category config, should be placed in the file `config/default/common/config/wv.json/categoryGroupOrder.json`. This allows setting the order of the category group tabs within the layer picker. If a category group is referenced in a category config, it **must also be defined here**.++```json+{+ "categoryGroupOrder": [+ "hazards and disasters",+ "science disciplines",+ "featured"+ ]+}+```++### Category Config Example++`config/default/common/config/wv.json/categories/hazards_and_disasters/Air Quality.json`+```json+{+ "categories": {+ "hazards and disasters": {+ "Air Quality": {+ "title": "Air Quality",+ "id": "air-quality",+ "image": "air-quality.jpg",+ "description": "",+ "measurements": [+ "Aerosol Index",+ "Aerosol Optical Depth",+ "Carbon Monoxide",+ ...+ ]+ }+ }+ }+}+```+++## Adding New Measurements++When a category is selected in the layer picker, the view transitions to the measurements list view seen in the image below. Within a measurement (e.g. `Aerosol Index`) the layers are further grouped by `sources`.++++In the measurement config example below, we can see the layer ids for each layer that belongs to a `source` is placed within the `settings` array for that source.++### Measurement Config Example+`config/default/common/config/wv.json/measurements/Aerosol Index.json`+```json+{+ "measurements": {+ "Aerosol Index": {+ "id": "aerosol-index",+ "title": "Aerosol Index",+ "subtitle": "Aura/OMI, Suomi NPP/OMPS",+ "sources": {+ "Aura/OMI": {+ "id": "aura-omi",+ "title": "Aura/OMI",+ "description": "omi/AerosolIndex",+ "image": "",+ "settings": [+ "OMI_Aerosol_Index",+ "OMI_UV_Aerosol_Index",+ "OrbitTracks_Aura_Ascending"+ ]+ },+ "Suomi NPP/OMPS": {+ "id": "suomi-npp-omps",+ "title": "Suomi NPP/OMPS",+ "description": "omps/AerosolIndex",+ "image": "",+ "settings": [+ "OMPS_Aerosol_Index",+ "OMPS_Aerosol_Index_PyroCumuloNimbus",+ "OrbitTracks_Suomi_NPP_Ascending"+ ]+ }+ }+ }+ }+}+```diff --git a/doc/config/tour_stories.md b/doc/config/tour_stories.mdindex 18bb7994d..33f3f5cb5 100644--- a/doc/config/tour_stories.md+++ b/doc/config/tour_stories.md@@ -13,7 +13,7 @@## Adding New Tour StoriesCreate a new JSON document in `config/default/common/config/wv.json/stories/` named `X.json` where `X`-is the story identifier. This file can be placed in any subdirectory as needed for organizational purposes.+is the story identifier. This file can be placed in any subdirectory as needed for organizational purposes. All properties should be in an object keyed by the story identifier.Here's an example of a minimum configuration for the Hurricane Florence story:@@ -34,7 +34,9 @@ Here's an example of a minimum configuration for the Hurricane Florence story:}```-All properties should be in an object keyed by the story identifier.+## Story Order++The `config/default/common/config/wv.json/storyOrder.json` file must be updated to include the new story identifier. This file determines the order that stories are displayed in the overview modal.## Required Properties@@ -65,12 +67,12 @@ The minimum set of required properties are as follows:* **type**: Use `wildfire`, `volcano`, `snow`, `sea-and-lake-ice`, `iceberg`, `water-color`, `dust-and-haze`, `severe-storm`, `man-made` or `critical` to set the display styling of the story. Each story will have a color and icon associated with it's type. If left blank, the story styling will default to dark blue and a world icon.* **description**: A description of the story displayed to the end user when hovering the story's box on the overview modal.* **backgroundImage**: The background image shown on the story overview modal. This image should be **396px x 396px**, a JPG/JPEG, GIF or PNG, and optimized in size for the web. If no image is provided, a NASA logo will be shown as a placeholder.-* **backgroundImageHover**: The image shown when overing the background image on the story overview modal. This image should be **396px x 396px**, a JPG/JPEG, GIF or PNG, and optimized in size for the web. If no image is provided, no roll-over image will appear.+* **backgroundImageHover**: The image shown when hovering over the background image in the story overview modal. This image should be **396px x 396px**, a JPG/JPEG, GIF or PNG, and optimized in size for the web. If no image is provided, no roll-over image will appear.* **readMoreLinks[]**: To display links for additional reading at the end of story modal, an array of objects should exist with the following properties:* **title**: The name of the link being displayed.* **link**: The url of the link being displayed.-## Full Example+### Full Example```json{@@ -115,9 +117,57 @@ The minimum set of required properties are as follows:}```-## Story Order+## Joyride Interactive Tour Steps-The `config/default/common/config/wv.json/storyOrder.json` file must be updated to include the new story identifier. This file determines the order that stories are displayed in the overview modal.+Tour stories support spotlighting tutorial steps via [React Joyride](https://react-joyride.com/). Each tour step can include any number of Joyride tour steps which will place a beacon on the target DOM element. Clicking the beacon will open a tooltip that shows the provided `content`. Configuration properties are as follows:++* **joyride**: The root object added to the tour step.+ * **continuous**: Boolean. Should closing a tooltip advance to the next step.+ * **spotlightClicks**: Boolean. Should mouse hover/click interactions be allowed within the target DOM element while the tooltip is open. By default, clicking within this area closes the tooltip.+ * **steps**: The array of Joyride steps for use within this tour step. Each object can have the following properties:+ * **target**: Required. The DOM selector on which to place the beacon for this step.+ * **targetCoordinates**: Can be used to place a beacon/spotlight on the map itself instead of a DOM element. This object has two properties, `topLeft` and `bottomRight` which are arrays of coordinates that indicate the bounding area on the map you want to highlight. If `targetCoordinates` are defined, the `target` property should be set to an id that doesn't exist on the DOM since it will be created temporarily on the fly. (e.g. `#my-map-target1`)+ * **placementBeacon**: Where to place the beacon in relation to the element. (`top`, `bottom`, `left`, `right`)+ * **content**: The content to show within the tooltip that opens when the beacon is clicked.++### Joyride Example:++```json+{+ "stories": {+ "joyride_tour": {+ "id": "joyride_tour",+ "title": "Joyride Tour",+ "steps": [+ {+ "description": "step001.html",+ "stepLink": "...",+ "joyride": {+ "continuous": true,+ "spotlightClicks": true,+ "steps": [+ {+ "target": "#map-target-1",+ "targetCoordinates": {+ "topLeft": [-79, 29.5],+ "bottomRight": [-72, 23]+ },+ "content": "Hover over the different colors in the image on the map...",+ "placementBeacon": "top"+ },+ {+ "target": "#GOES-East_ABI_Band13_Clean_Infrared-Clean_Longwave_Infrared_Window_Band_0_legend0colorbar",+ "content": "...to see the corresponding temperature value here.",+ "placementBeacon": "top"+ }+ ]+ }+ }+ ]+ }+ }+}+```## Adding Stories to Worldview Tour Modals