Skip to content

Commit

Permalink
v1.6.5 (#36)
Browse files Browse the repository at this point in the history
* TimeSeriesViewer handle flat 0 axis datarange

* initial NeonPage snapshots tests

* NeonPage snapshot tests

* SiteMap table export CSV

* iterate on TimeSeriesViewer series bug

* fix TimeSeriesV graph generation when seconds are not in t

* iTimeSeriesViewerSummary snapshot tests

* attempt to fix SiteMap safari marker click bug

* ibump version to v1.6.5

* TimeSeriesViewerSites snapshot tests

* lib export

* fix lint

* document FOREIGN_LOCATION env var in .env.develpoment

* SiteMap marker type safety / table layout tweak

* Update for DownloadDataButton Icon.

* mockReactComponent safer rendering of functions and nodes

* add prototype dataset JSON-LD injection

* README updates

* jettison legacy components; final lint/lib export

* fix dialog paper z-index issue

Co-authored-by: Robert Markel <rmarkel@battelleecology.org>
Co-authored-by: jsampson <jsampson@battelleecology.org>
  • Loading branch information
3 people authored Apr 1, 2021
1 parent 9b5dd6d commit 4dce3c2
Show file tree
Hide file tree
Showing 164 changed files with 7,756 additions and 5,725 deletions.
17 changes: 14 additions & 3 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,18 @@ REACT_APP_NEON_SHOW_AOP_VIEWER="true"
REACT_APP_NEON_VISUS_PRODUCTS_BASE_URL="https://neon.visus.org/neonapi/products/"
REACT_APP_NEON_VISUS_IFRAME_BASE_URL="https://neon.visus.org/visus-frame.html"

# Override for development purposes to point at various environments
# Otherwise will derive from where the app is running (window.location.host)
# API ROOT
#
# By default API calls made by core components use window.location.host for the root.
#
# This can be overridden using REACT_APP_NEON_HOST_OVERRIDE. Note that the override will
# only be applied in a dev environment. To also apply override in production environments
# set REACT_APP_FOREIGN_LOCATION to "true".
#
# Using portal-core-components as a dependency hosted outside of data.neonscience.org:
# * Set REACT_APP_NEON_HOST_OVERRIDE to "https://data.neonscience.org"
# * Set REACT_APP_FOREIGN_LOCATION to "true"
# Rate limiting may apply. See https://data.neonscience.org/data-api/rate-limiting/ for details.

REACT_APP_NEON_HOST_OVERRIDE="https://int-data.neonscience.org"
#REACT_APP_NEON_WS_HOST_OVERRIDE=""
# REACT_APP_FOREIGN_LOCATION="true"
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
src/registerServiceWorker.js
src/lib_components/components/PopupBase
src/lib_components/components/PopupLoading
src/lib_components/components/**/*.d.ts
src/lib_components/remoteAssets
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ To update **all** snapshots (after confirming all failures are expected from rec
npm run test:updateSnapshots
When tests are run test coverage information is generated. This appears in the shell and can also be found formatted as HTML pages in the `test_coverage` directory.
### Writing Tests
The Jest configuration will pick up all javascript files in a `__tests__` directory. By convention, for portal-core-components, every file that has accompanying unit tests should have an adjacent `__tests__` folder containing any/all test files, and each test file should bear the same name as the source file it is testing.
Expand All @@ -208,6 +210,7 @@ Example:
| | | | __tests__/
| | | | | OtherComponent.jsx
Several mocks exist for testing any part of the core components library that may need them. These can be found in `~/src/__mocks__`. See README.md in that directory for details.
## Building the Library
Expand All @@ -226,7 +229,7 @@ For Windows users the `npm run lib` command may fail with complaint about 'NODE_
## Library Composition
This package was configured with advice from [this article](https://medium.com/@lokhmakov/best-way-to-create-npm-packages-with-create-react-app-b24dd449c354).
This package was originally onfigured with advice from [this article](https://medium.com/@lokhmakov/best-way-to-create-npm-packages-with-create-react-app-b24dd449c354).
In summary, it began as a create-react-app app that was ejected. A `babel.config.json` was added with minor configuration and a script to invoke babel to run a library build was added.
Expand Down
9 changes: 3 additions & 6 deletions lib/components/DownloadDataButton/DownloadDataButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,9 @@ var DownloadDataButton = function DownloadDataButton(props) {
color: "primary",
variant: "contained",
onClick: handleOpenDialog,
"data-selenium": "download-data-button"
}, gtmProps, other), label, /*#__PURE__*/_react.default.createElement(_SaveAlt.default, {
style: {
marginLeft: _Theme.default.spacing(1)
}
})), !dialogOpen ? null : /*#__PURE__*/_react.default.createElement(_react.Suspense, {
"data-selenium": "download-data-button",
endIcon: /*#__PURE__*/_react.default.createElement(_SaveAlt.default, null)
}, gtmProps, other), label), !dialogOpen ? null : /*#__PURE__*/_react.default.createElement(_react.Suspense, {
fallback: null
}, /*#__PURE__*/_react.default.createElement(DownloadDataDialog, null)));
};
Expand Down
2 changes: 1 addition & 1 deletion lib/components/NeonEnvironment/NeonEnvironment.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ var NeonEnvironment = {
var root = NeonEnvironment.getRootJsonLdPath();
var appliedPath = '';

if (['products'].includes(path)) {
if (['products', 'prototype'].includes(path)) {
appliedPath = NeonEnvironment.getApiPath[path]();
} else if (typeof NeonEnvironment.getApiLdPath[path] === 'function') {
appliedPath = NeonEnvironment.getApiLdPath[path]();
Expand Down
170 changes: 0 additions & 170 deletions lib/components/NeonFooter/NeonFooter.css

This file was deleted.

3 changes: 0 additions & 3 deletions lib/components/NeonFooter/NeonFooter.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ declare function NeonFooter(props: any): JSX.Element;
declare namespace NeonFooter {
export namespace propTypes {
export const drupalCssLoaded: PropTypes.Requireable<boolean>;
export const useCoreHeader: PropTypes.Requireable<boolean>;
}
export namespace defaultProps {
const drupalCssLoaded_1: boolean;
export { drupalCssLoaded_1 as drupalCssLoaded };
const useCoreHeader_1: boolean;
export { useCoreHeader_1 as useCoreHeader };
}
}
import PropTypes from "prop-types";
17 changes: 5 additions & 12 deletions lib/components/NeonFooter/NeonFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ var _drupalFooter = _interopRequireDefault(require("../../remoteAssets/drupal-fo

var _NeonContext = _interopRequireWildcard(require("../NeonContext/NeonContext"));

var _NeonLegacyFooter = _interopRequireDefault(require("./NeonLegacyFooter"));

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
Expand All @@ -44,8 +42,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
var DRUPAL_FOOTER_HTML = _remoteAssetsMap.default.DRUPAL_FOOTER_HTML.KEY;

var NeonFooter = function NeonFooter(props) {
var drupalCssLoaded = props.drupalCssLoaded,
useCoreHeader = props.useCoreHeader;
var drupalCssLoaded = props.drupalCssLoaded;

var _NeonContext$useNeonC = _NeonContext.default.useNeonContextState(),
_NeonContext$useNeonC2 = _slicedToArray(_NeonContext$useNeonC, 1),
Expand All @@ -56,7 +53,7 @@ var NeonFooter = function NeonFooter(props) {

var renderMode = 'legacy';

if (!useCoreHeader && neonContextIsActive) {
if (neonContextIsActive) {
switch (footerFetch.status) {
case _NeonContext.FETCH_STATUS.SUCCESS:
renderMode = footerHTML && drupalCssLoaded ? 'drupal' : 'loading';
Expand Down Expand Up @@ -88,22 +85,18 @@ var NeonFooter = function NeonFooter(props) {
}, (0, _htmlReactParser.default)(footerHTML));

case 'drupal-fallback':
default:
return /*#__PURE__*/_react.default.createElement("footer", {
id: "footer"
}, (0, _htmlReactParser.default)(_drupalFooter.default));

default:
return /*#__PURE__*/_react.default.createElement(_NeonLegacyFooter.default, null);
}
};

NeonFooter.propTypes = {
drupalCssLoaded: _propTypes.default.bool,
useCoreHeader: _propTypes.default.bool
drupalCssLoaded: _propTypes.default.bool
};
NeonFooter.defaultProps = {
drupalCssLoaded: false,
useCoreHeader: false
drupalCssLoaded: false
};
var _default = NeonFooter;
exports.default = _default;
1 change: 0 additions & 1 deletion lib/components/NeonFooter/NeonLegacyFooter.d.ts

This file was deleted.

Loading

0 comments on commit 4dce3c2

Please sign in to comment.