From 87dead8f8e24c3d4c6f7927a956a474861dd6ea8 Mon Sep 17 00:00:00 2001 From: robyngit Date: Thu, 9 May 2024 11:27:19 -0400 Subject: [PATCH 1/7] Add & configure prettier; fix syntax errors pre-format - Initial prettier setup; do not format yet - Fix syntax errors in files that would prevent prettier from formatting them Issue #2096 --- .github/FUNDING.yml | 2 +- .prettierignore | 8 ++ .prettierrc | 19 +++ package-lock.json | 174 ++++++++++++++++++++++-- package.json | 8 +- src/css/metacatui-common.css | 4 - src/js/themes/default/css/metacatui.css | 2 +- 7 files changed, 195 insertions(+), 22 deletions(-) create mode 100644 .prettierignore create mode 100644 .prettierrc diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 6a8d51715..1d0eec770 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username -custom: ['https://giving.ucsb.edu/Funds/Give?id=353] +custom: ['https://giving.ucsb.edu/Funds/Give?id=353'] diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..ada4c118f --- /dev/null +++ b/.prettierignore @@ -0,0 +1,8 @@ +# Prettier doesn't format underscore.js templates correctly +src/**/*.html +# Don't modify third-party code +src/components +# docs/docs is auto-generated +docs/docs +# Ignore any minimized files +**/*.min.* \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..9982ea82c --- /dev/null +++ b/.prettierrc @@ -0,0 +1,19 @@ +{ + "plugins": [ + "@shopify/prettier-plugin-liquid" + ], + "overrides": [ + { + "files": "docs/_includes/*.html", + "options": { + "parser": "liquid-html" + } + }, + { + "files": "docs/_layouts/*.html", + "options": { + "parser": "liquid-html" + } + } + ] +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3f9fd99e9..ab160d038 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,10 +18,12 @@ "devDependencies": { "@jsdoc/salty": "^0.2.3", "@jsdoc/util": "^0.2.4", + "@shopify/prettier-plugin-liquid": "^1.5.0", "code-prettify": "^0.1.0", "common-path-prefix": "^3.0.0", "jsdoc": "^4.0.0", - "open-sans-fonts": "^1.6.2" + "open-sans-fonts": "^1.6.2", + "prettier": "^3.2.5" } }, "node_modules/@actions/core": { @@ -79,6 +81,29 @@ "node": ">=v14.17.6" } }, + "node_modules/@shopify/liquid-html-parser": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@shopify/liquid-html-parser/-/liquid-html-parser-2.0.3.tgz", + "integrity": "sha512-aIkZ5TJWG7/ztd1sZm5XNpBNTG3B+Q0gv3WN/QahmNQzm2wmKYSHiRLOA8JALAnOGTmH0uqOJ7jzdqoATcZSxw==", + "dev": true, + "dependencies": { + "line-column": "^1.0.2", + "ohm-js": "^16.3.0" + } + }, + "node_modules/@shopify/prettier-plugin-liquid": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@shopify/prettier-plugin-liquid/-/prettier-plugin-liquid-1.5.0.tgz", + "integrity": "sha512-CuWjUnBCvq/RTmubEa5RfwW2oP2gYfTXaJ39t4apAYm//1v5Ftvv1bbhEnoEZwCjPshaAJLhSzP9dvCel4cebw==", + "dev": true, + "dependencies": { + "@shopify/liquid-html-parser": "^2.0.3", + "html-styles": "^1.0.0" + }, + "peerDependencies": { + "prettier": "^2.0.0 || ^3.0.0" + } + }, "node_modules/@sindresorhus/is": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", @@ -931,6 +956,14 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, "node_modules/has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", @@ -953,14 +986,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -983,6 +1008,12 @@ "node": ">= 0.4" } }, + "node_modules/html-styles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/html-styles/-/html-styles-1.0.0.tgz", + "integrity": "sha512-cDl5dcj73oI4Hy0DSUNh54CAwslNLJRCCoO+RNkVo+sBrjA/0+7E/xzvj3zH/GxbbBLGJhE0hBe1eg+0FINC6w==", + "dev": true + }, "node_modules/htmlparser2": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", @@ -1089,6 +1120,24 @@ "node": ">=8" } }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dev": true, + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/js2xmlparser": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", @@ -1150,6 +1199,16 @@ "graceful-fs": "^4.1.11" } }, + "node_modules/line-column": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/line-column/-/line-column-1.0.2.tgz", + "integrity": "sha512-Ktrjk5noGYlHsVnYWh62FLVs4hTb8A3e+vucNZMgPeAOITdshMSgv4cCZQeRDjm7+goqmo6+liZwTXo+U3sVww==", + "dev": true, + "dependencies": { + "isarray": "^1.0.0", + "isobject": "^2.0.0" + } + }, "node_modules/linkify-it": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", @@ -1376,6 +1435,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/ohm-js": { + "version": "16.6.0", + "resolved": "https://registry.npmjs.org/ohm-js/-/ohm-js-16.6.0.tgz", + "integrity": "sha512-X9P4koSGa7swgVQ0gt71UCYtkAQGOjciJPJAz74kDxWt8nXbH5HrDOQG6qBDH7SR40ktNv4x61BwpTDE9q4lRA==", + "dev": true, + "engines": { + "node": ">=0.12.1" + } + }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -1523,6 +1591,21 @@ "node": ">=8" } }, + "node_modules/prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -2081,6 +2164,26 @@ "ow": "^0.27.0" } }, + "@shopify/liquid-html-parser": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@shopify/liquid-html-parser/-/liquid-html-parser-2.0.3.tgz", + "integrity": "sha512-aIkZ5TJWG7/ztd1sZm5XNpBNTG3B+Q0gv3WN/QahmNQzm2wmKYSHiRLOA8JALAnOGTmH0uqOJ7jzdqoATcZSxw==", + "dev": true, + "requires": { + "line-column": "^1.0.2", + "ohm-js": "^16.3.0" + } + }, + "@shopify/prettier-plugin-liquid": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@shopify/prettier-plugin-liquid/-/prettier-plugin-liquid-1.5.0.tgz", + "integrity": "sha512-CuWjUnBCvq/RTmubEa5RfwW2oP2gYfTXaJ39t4apAYm//1v5Ftvv1bbhEnoEZwCjPshaAJLhSzP9dvCel4cebw==", + "dev": true, + "requires": { + "@shopify/liquid-html-parser": "^2.0.3", + "html-styles": "^1.0.0" + } + }, "@sindresorhus/is": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", @@ -2735,6 +2838,11 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, "has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", @@ -2748,11 +2856,6 @@ "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==" }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -2766,6 +2869,12 @@ "function-bind": "^1.1.2" } }, + "html-styles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/html-styles/-/html-styles-1.0.0.tgz", + "integrity": "sha512-cDl5dcj73oI4Hy0DSUNh54CAwslNLJRCCoO+RNkVo+sBrjA/0+7E/xzvj3zH/GxbbBLGJhE0hBe1eg+0FINC6w==", + "dev": true + }, "htmlparser2": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", @@ -2836,6 +2945,21 @@ "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", "dev": true }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, "js2xmlparser": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", @@ -2891,6 +3015,16 @@ "graceful-fs": "^4.1.11" } }, + "line-column": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/line-column/-/line-column-1.0.2.tgz", + "integrity": "sha512-Ktrjk5noGYlHsVnYWh62FLVs4hTb8A3e+vucNZMgPeAOITdshMSgv4cCZQeRDjm7+goqmo6+liZwTXo+U3sVww==", + "dev": true, + "requires": { + "isarray": "^1.0.0", + "isobject": "^2.0.0" + } + }, "linkify-it": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", @@ -3059,6 +3193,12 @@ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==" }, + "ohm-js": { + "version": "16.6.0", + "resolved": "https://registry.npmjs.org/ohm-js/-/ohm-js-16.6.0.tgz", + "integrity": "sha512-X9P4koSGa7swgVQ0gt71UCYtkAQGOjciJPJAz74kDxWt8nXbH5HrDOQG6qBDH7SR40ktNv4x61BwpTDE9q4lRA==", + "dev": true + }, "on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -3166,6 +3306,12 @@ "find-up": "^4.0.0" } }, + "prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "dev": true + }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", diff --git a/package.json b/package.json index e0ec01f32..2da7b6348 100644 --- a/package.json +++ b/package.json @@ -13,10 +13,12 @@ "devDependencies": { "@jsdoc/salty": "^0.2.3", "@jsdoc/util": "^0.2.4", + "@shopify/prettier-plugin-liquid": "^1.5.0", "code-prettify": "^0.1.0", "common-path-prefix": "^3.0.0", "jsdoc": "^4.0.0", - "open-sans-fonts": "^1.6.2" + "open-sans-fonts": "^1.6.2", + "prettier": "^3.2.5" }, "scripts": { "dev": "node server.js", @@ -25,7 +27,9 @@ "doc": "cd docs; bundle exec jekyll serve", "test": "node test/server.js", "integration-test": "node test/server.js integration", - "view-tests": "node test/server.js keep-running" + "view-tests": "node test/server.js keep-running", + "format": "prettier --write .", + "format-check": "prettier --check ." }, "repository": { "type": "git", diff --git a/src/css/metacatui-common.css b/src/css/metacatui-common.css index 55b684fd7..f563d1f65 100644 --- a/src/css/metacatui-common.css +++ b/src/css/metacatui-common.css @@ -8040,10 +8040,6 @@ ul.side-nav-items { margin-left: -5px; margin-right: 5px; } - border: none; - background-color: inherit; - width: auto; -} /* Editor package table button dropdown */ .Editor #data-package-table td:last-of-type ul { diff --git a/src/js/themes/default/css/metacatui.css b/src/js/themes/default/css/metacatui.css index 4ae3b9101..8af226ecb 100644 --- a/src/js/themes/default/css/metacatui.css +++ b/src/js/themes/default/css/metacatui.css @@ -1398,7 +1398,7 @@ padding-left: 0px; content: "Datasets "; } #statcounts{ - float: left;s + float: left; } .sort-by{ float: right; From f33bf9ebd31c0d0570ffc8a2612e978464a3aa86 Mon Sep 17 00:00:00 2001 From: robyngit Date: Mon, 13 May 2024 12:30:33 -0400 Subject: [PATCH 2/7] Format 437 files with prettier - Initial prettier formatting run Issue #2096 --- .github/FUNDING.yml | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 22 +- .github/ISSUE_TEMPLATE/feature_request.md | 5 +- .github/workflows/test.js.yml | 29 +- .prettierrc | 6 +- CONTRIBUTING.md | 34 +- README.md | 14 +- docs/README.md | 6 +- docs/_includes/header.html | 5 +- docs/_includes/homepage.html | 2 +- docs/_layouts/default.html | 2 +- docs/_layouts/guide.html | 6 +- docs/_sass/_base.scss | 42 +- docs/_sass/_buttons.scss | 6 +- docs/_sass/_card.scss | 9 +- docs/_sass/_colors.scss | 8 +- docs/_sass/_fonts.scss | 72 +- docs/_sass/_homepage.scss | 8 +- docs/_sass/_logo.scss | 4 +- docs/_sass/_nav.scss | 6 +- docs/assets/css/rouge-highlighting.css | 32 +- docs/assets/css/styles.scss | 1 + docs/assets/images/favicons/manifest.json | 34 +- docs/assets/js/github-functions.js | 59 +- docs/guides/accesspolicy.md | 67 +- docs/guides/catalog-view-config.md | 2 +- docs/guides/editor/funding-autocomplete.md | 4 +- docs/guides/filters/configuring-filters.md | 1 - docs/guides/index.md | 2 +- docs/guides/maps/cesium-for-portals.md | 4 +- docs/guides/maps/cesium.md | 24 +- docs/guides/themes/citations.md | 128 +- docs/guides/themes/images.md | 5 + docs/index.md | 6 +- docs/install/apache.md | 83 +- docs/install/configuration/index.md | 137 +- docs/install/configuration/pre-2.12.0.md | 21 +- docs/install/dev-env.md | 2 + docs/install/index.md | 48 +- docs/install/local.md | 44 +- docs/install/use-with-cn.md | 46 +- docs/jsdoc-templates/metacatui/conf.js | 48 +- .../metacatui/plugins/classcategory.js | 20 +- .../metacatui/plugins/screenshot.js | 111 +- docs/jsdoc-templates/metacatui/publish.js | 1146 +- .../metacatui/static/scripts/linenumber.js | 38 +- .../metacatui/static/styles/jsdoc-default.css | 407 +- .../metacatui/static/styles/style.css | 128 +- docs/other/build.js | 172 +- docs/releases/release-notes-template.md | 4 +- docs/screenshots/index.md | 8 + server.js | 2 +- src/css/bootstrap-responsive.css | 52 +- src/css/bootstrap.css | 1176 ++- src/css/catalog-search-view.css | 38 +- src/css/jquery.sidr.dark.css | 191 +- src/css/jquery.sidr.light.css | 191 +- src/css/map-view.css | 444 +- src/css/metacatui-common.css | 9308 +++++++++-------- src/css/metacatui-common.responsive.css | 1740 ++- src/css/portal-layouts/panels.css | 43 +- src/css/portal-themes/dark.css | 223 +- src/css/portal-themes/light.css | 264 +- src/js/app.js | 630 +- src/js/collections/AccessPolicy.js | 668 +- src/js/collections/Citations.js | 73 +- src/js/collections/DataPackage.js | 7337 +++++++------ src/js/collections/Filters.js | 34 +- src/js/collections/ObjectFormats.js | 107 +- src/js/collections/ProjectList.js | 122 +- src/js/collections/QualityReport.js | 113 +- src/js/collections/SolrResults.js | 722 +- src/js/collections/Units.js | 102 +- src/js/collections/UserGroup.js | 566 +- src/js/collections/bookkeeper/Quotas.js | 163 +- src/js/collections/bookkeeper/Usages.js | 236 +- src/js/collections/maps/AssetCategories.js | 20 +- src/js/collections/maps/AssetColors.js | 148 +- src/js/collections/maps/Features.js | 11 +- src/js/collections/maps/GeoPoints.js | 4 +- src/js/collections/maps/Geohashes.js | 38 +- src/js/collections/maps/MapAssets.js | 16 +- src/js/collections/maps/VectorFilters.js | 117 +- .../maps/viewfinder/ZoomPresets.js | 111 +- .../metadata/eml/EMLAnnotations.js | 82 +- .../metadata/eml/EMLMissingValueCodes.js | 4 +- src/js/collections/queryFields/QueryFields.js | 293 +- src/js/common/IconUtilities.js | 73 +- src/js/common/Utilities.js | 82 +- src/js/models/AccessRule.js | 409 +- src/js/models/AppModel.js | 4808 +++++---- src/js/models/CitationModel.js | 48 +- src/js/models/CollectionModel.js | 1328 +-- src/js/models/DataONEObject.js | 4514 ++++---- src/js/models/LogsSearch.js | 435 +- src/js/models/LookupModel.js | 20 +- src/js/models/Map.js | 437 +- src/js/models/MetricsModel.js | 555 +- src/js/models/NodeModel.js | 421 +- src/js/models/PackageModel.js | 3287 +++--- src/js/models/QualityCheckModel.js | 64 +- src/js/models/Search.js | 2477 +++-- src/js/models/SolrHeader.js | 19 +- src/js/models/SolrResult.js | 1655 +-- src/js/models/Stats.js | 1976 ++-- src/js/models/UserModel.js | 2302 ++-- src/js/models/analytics/Analytics.js | 2 +- src/js/models/analytics/GoogleAnalytics.js | 2 +- src/js/models/bookkeeper/Quota.js | 86 +- src/js/models/bookkeeper/Subscription.js | 112 +- src/js/models/bookkeeper/Usage.js | 82 +- src/js/models/connectors/Filters-Map.js | 10 +- src/js/models/connectors/Filters-Search.js | 12 +- src/js/models/connectors/GeoPoints-Cesium.js | 2 +- .../connectors/GeoPoints-CesiumPoints.js | 4 +- .../connectors/GeoPoints-CesiumPolygon.js | 4 +- .../models/connectors/Map-Search-Filters.js | 12 +- src/js/models/connectors/Map-Search.js | 45 +- src/js/models/filters/BooleanFilter.js | 176 +- src/js/models/filters/ChoiceFilter.js | 378 +- src/js/models/filters/DateFilter.js | 800 +- src/js/models/filters/Filter.js | 1837 ++-- src/js/models/filters/FilterGroup.js | 1122 +- src/js/models/filters/NumericFilter.js | 1054 +- src/js/models/filters/SpatialFilter.js | 18 +- src/js/models/filters/ToggleFilter.js | 283 +- src/js/models/formats/ObjectFormat.js | 91 +- src/js/models/geocoder/GeocodedLocation.js | 93 +- src/js/models/geocoder/GeocoderSearch.js | 88 +- .../geocoder/GoogleMapsAutocompleter.js | 87 +- src/js/models/geocoder/GoogleMapsGeocoder.js | 88 +- src/js/models/geocoder/Prediction.js | 37 +- src/js/models/maps/AssetCategory.js | 15 +- src/js/models/maps/AssetColor.js | 306 +- src/js/models/maps/AssetColorPalette.js | 5 +- src/js/models/maps/Feature.js | 8 +- src/js/models/maps/GeoBoundingBox.js | 2 +- src/js/models/maps/GeoPoint.js | 24 +- src/js/models/maps/GeoScale.js | 2 +- src/js/models/maps/GeoUtilities.js | 2 +- src/js/models/maps/Geohash.js | 8 +- src/js/models/maps/Map.js | 37 +- src/js/models/maps/MapInteraction.js | 52 +- src/js/models/maps/VectorFilter.js | 449 +- src/js/models/maps/assets/Cesium3DTileset.js | 822 +- src/js/models/maps/assets/CesiumGeohash.js | 30 +- src/js/models/maps/assets/CesiumImagery.js | 883 +- src/js/models/maps/assets/CesiumTerrain.js | 467 +- src/js/models/maps/assets/CesiumVectorData.js | 33 +- src/js/models/maps/assets/MapAsset.js | 50 +- .../maps/viewfinder/ExpansionPanelsModel.js | 37 +- .../models/maps/viewfinder/ViewfinderModel.js | 477 +- .../models/maps/viewfinder/ZoomPresetModel.js | 110 +- src/js/models/metadata/ScienceMetadata.js | 388 +- src/js/models/metadata/eml/EMLMethodStep.js | 576 +- .../models/metadata/eml/EMLSpecializedText.js | 256 +- src/js/models/metadata/eml211/EML211.js | 3591 ++++--- .../models/metadata/eml211/EMLAnnotation.js | 289 +- src/js/models/metadata/eml211/EMLAttribute.js | 1140 +- src/js/models/metadata/eml211/EMLDataTable.js | 462 +- .../metadata/eml211/EMLDateTimeDomain.js | 719 +- .../models/metadata/eml211/EMLDistribution.js | 19 +- src/js/models/metadata/eml211/EMLEntity.js | 1085 +- .../models/metadata/eml211/EMLGeoCoverage.js | 47 +- .../models/metadata/eml211/EMLKeywordSet.js | 200 +- .../metadata/eml211/EMLMeasurementScale.js | 189 +- src/js/models/metadata/eml211/EMLMethods.js | 932 +- .../metadata/eml211/EMLMissingValueCode.js | 2 +- .../metadata/eml211/EMLNonNumericDomain.js | 1751 ++-- .../metadata/eml211/EMLNumericDomain.js | 846 +- .../models/metadata/eml211/EMLOtherEntity.js | 360 +- src/js/models/metadata/eml211/EMLParty.js | 1876 ++-- src/js/models/metadata/eml211/EMLProject.js | 407 +- .../metadata/eml211/EMLTaxonCoverage.js | 44 +- .../metadata/eml211/EMLTemporalCoverage.js | 1013 +- src/js/models/metadata/eml211/EMLText.js | 438 +- src/js/models/metadata/eml211/EMLUnit.js | 68 +- src/js/models/metadata/eml220/EMLText.js | 249 +- src/js/models/portals/PortalImage.js | 551 +- src/js/models/portals/PortalModel.js | 4250 ++++---- src/js/models/portals/PortalSectionModel.js | 550 +- .../models/portals/PortalVizSectionModel.js | 308 +- src/js/models/projects/Project.js | 140 +- src/js/models/queryFields/QueryField.js | 541 +- src/js/polyfill.js | 257 +- src/js/routers/router.js | 1482 +-- .../portals/editor/MarkdownExample.md | 23 +- src/js/themes/arctic/config.js | 2 +- src/js/themes/arctic/css/metacatui.css | 4635 ++++---- .../arctic/css/metacatui.responsive.css | 330 +- .../themes/arctic/img/favicons/manifest.json | 80 +- src/js/themes/arctic/models/Map.js | 429 +- src/js/themes/arctic/routers/router.js | 1215 ++- .../dataone/components/d1website/README.md | 95 +- .../dataone/components/d1website/index.json | 55 +- .../components/d1website/site.webmanifest | 34 +- src/js/themes/dataone/config.js | 327 +- src/js/themes/dataone/css/metacatui.css | 759 +- .../dataone/css/metacatui.responsive.css | 46 +- src/js/themes/dataone/routers/router.js | 21 +- src/js/themes/default/config.js | 13 +- src/js/themes/default/css/metacatui.css | 3968 +++---- .../default/css/metacatui.responsive.css | 41 +- .../themes/default/img/favicons/manifest.json | 34 +- src/js/themes/knb/config.js | 231 +- src/js/themes/knb/css/metacatui.css | 4561 ++++---- .../themes/knb/css/metacatui.responsive.css | 179 +- src/js/themes/knb/img/favicons/manifest.json | 80 +- src/js/themes/knb/routers/router.js | 158 +- src/js/themes/knb/views/TextView.js | 30 +- src/js/views/AccessPolicyView.js | 1426 +-- src/js/views/AccessRuleView.js | 924 +- src/js/views/AltHeaderView.js | 100 +- src/js/views/AnnotationView.js | 752 +- src/js/views/AppView.js | 58 +- src/js/views/BarChartView.js | 837 +- src/js/views/CircleBadgeView.js | 434 +- src/js/views/CitationHeaderView.js | 10 +- src/js/views/CitationListView.js | 340 +- src/js/views/CitationView.js | 12 +- src/js/views/ColorPaletteView.js | 86 +- src/js/views/DataCatalogView.js | 6325 +++++------ src/js/views/DataCatalogViewWithFilters.js | 26 +- src/js/views/DataItemView.js | 2868 ++--- src/js/views/DataPackageView.js | 1911 ++-- src/js/views/DataPreviewView.js | 111 +- src/js/views/DatasetView.js | 259 +- src/js/views/DonutChartView.js | 936 +- src/js/views/DownloadButtonView.js | 465 +- src/js/views/DraftsView.js | 201 +- src/js/views/EditCollectionView.js | 660 +- src/js/views/EditorView.js | 1318 +-- src/js/views/ExpandCollapseListView.js | 251 +- src/js/views/FeaturedDataView.js | 38 +- src/js/views/FooterView.js | 52 +- src/js/views/GroupListView.js | 1287 +-- src/js/views/ImageUploaderView.js | 1134 +- src/js/views/IndexView.js | 113 +- src/js/views/LdapView.js | 265 +- src/js/views/LineChartView.js | 1050 +- src/js/views/MainContentView.js | 41 +- src/js/views/MapsView.js | 88 +- src/js/views/MarkdownEditorView.js | 1484 +-- src/js/views/MarkdownView.js | 742 +- src/js/views/MdqRunView.js | 742 +- src/js/views/MetadataIndexView.js | 941 +- src/js/views/MetadataView.js | 5984 ++++++----- src/js/views/MetricModalView.js | 16 +- src/js/views/MetricView.js | 389 +- src/js/views/MetricsChartView.js | 1727 +-- src/js/views/NavbarView.js | 392 +- src/js/views/PackageTableView.js | 999 +- src/js/views/PagerView.js | 288 +- src/js/views/ProvChartView.js | 3452 +++--- src/js/views/ProvEntitySelectView.js | 280 +- src/js/views/ProvStatementView.js | 750 +- src/js/views/RegisterCitationView.js | 390 +- src/js/views/SearchResultView.js | 701 +- src/js/views/SignInView.js | 686 +- src/js/views/StatsView.js | 2100 ++-- src/js/views/TOCView.js | 827 +- src/js/views/TableEditorView.js | 1499 +-- src/js/views/TextView.js | 180 +- src/js/views/UserGroupView.js | 626 +- src/js/views/UserView.js | 2657 ++--- src/js/views/citations/CitationModalView.js | 8 +- src/js/views/filters/BooleanFilterView.js | 11 +- src/js/views/filters/ChoiceFilterView.js | 969 +- src/js/views/filters/DateFilterView.js | 283 +- src/js/views/filters/FilterEditorView.js | 2247 ++-- src/js/views/filters/FilterGroupView.js | 433 +- src/js/views/filters/FilterGroupsView.js | 1895 ++-- src/js/views/filters/FilterView.js | 667 +- src/js/views/filters/NumericFilterView.js | 343 +- src/js/views/filters/SemanticFilterView.js | 284 +- src/js/views/filters/ToggleFilterView.js | 408 +- src/js/views/maps/CesiumWidgetView.js | 113 +- src/js/views/maps/DrawToolView.js | 37 +- src/js/views/maps/FeatureInfoView.js | 1132 +- src/js/views/maps/HelpPanelView.js | 7 +- src/js/views/maps/LayerCategoryItemView.js | 353 +- src/js/views/maps/LayerCategoryListView.js | 170 +- src/js/views/maps/LayerDetailView.js | 426 +- src/js/views/maps/LayerDetailsView.js | 718 +- src/js/views/maps/LayerInfoView.js | 220 +- src/js/views/maps/LayerItemView.js | 1035 +- src/js/views/maps/LayerListView.js | 329 +- src/js/views/maps/LayerNavigationView.js | 280 +- src/js/views/maps/LayerOpacityView.js | 526 +- src/js/views/maps/LayersPanelView.js | 27 +- src/js/views/maps/LegendView.js | 1018 +- src/js/views/maps/MapView.js | 676 +- src/js/views/maps/ScaleBarView.js | 749 +- src/js/views/maps/SearchInputView.js | 60 +- src/js/views/maps/ToolbarView.js | 1142 +- .../maps/viewfinder/ExpansionPanelView.js | 227 +- .../views/maps/viewfinder/PredictionView.js | 68 +- .../maps/viewfinder/PredictionsListView.js | 83 +- src/js/views/maps/viewfinder/SearchView.js | 141 +- .../views/maps/viewfinder/ViewfinderView.js | 214 +- .../views/maps/viewfinder/ZoomPresetView.js | 187 +- .../maps/viewfinder/ZoomPresetsListView.js | 123 +- src/js/views/metadata/EML211EditorView.js | 2661 ++--- .../metadata/EML211MissingValueCodeView.js | 6 +- .../metadata/EML211MissingValueCodesView.js | 10 +- src/js/views/metadata/EML211View.js | 4760 +++++---- src/js/views/metadata/EMLAttributeView.js | 10 +- src/js/views/metadata/EMLEntityView.js | 1601 +-- src/js/views/metadata/EMLGeoCoverageView.js | 20 +- .../views/metadata/EMLMeasurementScaleView.js | 1364 +-- .../views/metadata/EMLMeasurementTypeView.js | 130 +- src/js/views/metadata/EMLMethodsView.js | 449 +- src/js/views/metadata/EMLOtherEntityView.js | 111 +- src/js/views/metadata/EMLPartyView.js | 830 +- src/js/views/metadata/EMLTaxonView.js | 128 +- src/js/views/metadata/EMLTempCoverageView.js | 307 +- src/js/views/metadata/ScienceMetadataView.js | 164 +- src/js/views/portals/PortalDataView.js | 217 +- src/js/views/portals/PortalHeaderView.js | 208 +- src/js/views/portals/PortalListView.js | 1011 +- src/js/views/portals/PortalLogosView.js | 178 +- src/js/views/portals/PortalMembersView.js | 224 +- src/js/views/portals/PortalMetricsView.js | 555 +- src/js/views/portals/PortalSectionView.js | 343 +- src/js/views/portals/PortalUsagesView.js | 361 +- src/js/views/portals/PortalView.js | 2072 ++-- .../views/portals/PortalVisualizationsView.js | 358 +- src/js/views/portals/PortalsSearchView.js | 237 +- .../portals/editor/PortEditorDataView.js | 316 +- .../portals/editor/PortEditorImageView.js | 820 +- .../portals/editor/PortEditorLogosView.js | 428 +- .../portals/editor/PortEditorMdSectionView.js | 552 +- .../portals/editor/PortEditorSectionView.js | 618 +- .../portals/editor/PortEditorSectionsView.js | 2745 ++--- .../portals/editor/PortEditorSettingsView.js | 673 +- .../views/portals/editor/PortalEditorView.js | 1905 ++-- src/js/views/projects/ProjectView.js | 203 +- src/js/views/queryBuilder/QueryBuilderView.js | 914 +- src/js/views/queryBuilder/QueryRuleView.js | 3265 +++--- src/js/views/search/CatalogSearchView.js | 24 +- src/js/views/search/SearchResultView.js | 24 +- src/js/views/search/SearchResultsPagerView.js | 27 +- src/js/views/search/SearchResultsView.js | 2 +- src/js/views/search/SorterView.js | 4 +- .../views/searchSelect/AccountSelectView.js | 589 +- .../searchSelect/AnnotationFilterView.js | 1170 ++- src/js/views/searchSelect/NodeSelectView.js | 181 +- .../searchSelect/ObjectFormatSelectView.js | 208 +- .../searchSelect/QueryFieldSelectView.js | 842 +- .../searchSelect/SearchableSelectView.js | 2249 ++-- src/loader.js | 146 +- test/README.md | 46 +- test/config/appconfig.json | 6 +- test/config/tests.json | 2 +- test/index.html | 166 +- .../collections/SolrResults.spec.js | 303 +- .../specs/integration/models/LookupModel.js | 6 +- test/js/specs/shared/clean-state.js | 12 +- test/js/specs/shared/mock-gmaps-module.js | 29 +- .../unit/collections/DataPackage.spec.js | 66 +- .../unit/collections/ProjectList.spec.js | 91 +- .../unit/collections/SolrResults.spec.js | 185 +- .../collections/maps/AssetCategories.spec.js | 6 +- .../unit/collections/maps/GeoPoints.spec.js | 2 +- .../unit/collections/maps/Geohashes.spec.js | 2 +- .../metadata/eml/EMLMissingValueCodes.spec.js | 8 +- .../specs/unit/common/IconUtilities.spec.js | 52 +- test/js/specs/unit/common/Utilities.spec.js | 4 +- .../specs/unit/models/CitationModel.spec.js | 12 +- .../specs/unit/models/DataONEObject.spec.js | 63 +- test/js/specs/unit/models/Search.spec.js | 379 +- test/js/specs/unit/models/SolrResult.spec.js | 127 +- .../models/connectors/Filters-Map.spec.js | 2 +- .../connectors/GeoPoints-Cesium.spec.js | 4 +- .../connectors/GeoPoints-CesiumPoints.spec.js | 12 +- .../GeoPoints-CesiumPolygon.spec.js | 7 +- .../unit/models/connectors/Map-Search.spec.js | 6 +- .../specs/unit/models/filters/Filter.spec.js | 304 +- .../unit/models/filters/NumericFilter.spec.js | 153 +- .../unit/models/filters/SpatialFilter.spec.js | 2 +- .../models/geocoder/GeocodedLocation.spec.js | 20 +- .../models/geocoder/GeocoderSearch.spec.js | 123 +- .../geocoder/GoogleMapsAutocompleter.spec.js | 111 +- .../geocoder/GoogleMapsGeocoder.spec.js | 106 +- .../unit/models/geocoder/Prediction.spec.js | 26 +- .../unit/models/maps/AssetCategory.spec.js | 7 +- .../unit/models/maps/GeoBoundingBox.spec.js | 12 +- .../specs/unit/models/maps/GeoPoint.spec.js | 88 +- .../specs/unit/models/maps/GeoScale.spec.js | 14 +- .../unit/models/maps/GeoUtilities.spec.js | 9 +- .../js/specs/unit/models/maps/Geohash.spec.js | 2 +- test/js/specs/unit/models/maps/Map.spec.js | 178 +- .../unit/models/maps/MapInteraction.spec.js | 22 +- .../models/maps/assets/CesiumImagery.spec.js | 57 +- .../viewfinder/ExpansionPanelsModel.spec.js | 52 +- .../maps/viewfinder/ViewfinderModel.spec.js | 754 +- .../models/metadata/eml211/EML211.spec.js | 28 +- .../metadata/eml211/EMLAttribute.spec.js | 302 +- .../metadata/eml211/EMLDateTimeDomain.spec.js | 166 +- .../metadata/eml211/EMLDistribution.spec.js | 46 +- .../models/metadata/eml211/EMLEntity.spec.js | 130 +- .../metadata/eml211/EMLGeoCoverage.spec.js | 17 +- .../eml211/EMLMeasurementScale.spec.js | 359 +- .../models/metadata/eml211/EMLMethods.spec.js | 120 +- .../eml211/EMLMissingValueCode.spec.js | 4 +- .../eml211/EMLNonNumericDomain.spec.js | 455 +- .../metadata/eml211/EMLNumericDomain.spec.js | 281 +- .../metadata/eml211/EMLOtherEntity.spec.js | 344 +- .../models/metadata/eml211/EMLParty.spec.js | 76 +- .../eml211/EMLTemporalCoverage.spec.js | 112 +- .../specs/unit/models/project/Project.spec.js | 137 +- .../unit/views/maps/CesiumWidgetView.spec.js | 70 +- .../views/maps/LayerCategoryItemView.spec.js | 10 +- .../maps/LayerCategoryItemViewHarness.js | 2 +- .../unit/views/maps/LayerItemView.spec.js | 22 +- .../unit/views/maps/LayerItemViewHarness.js | 6 +- .../unit/views/maps/LayersPanelView.spec.js | 21 +- test/js/specs/unit/views/maps/MapView.spec.js | 7 +- .../unit/views/maps/SearchInputView.spec.js | 45 +- .../unit/views/maps/SearchInputViewHarness.js | 4 +- .../viewfinder/ExpansionPanelView.spec.js | 275 +- .../viewfinder/ExpansionPanelViewHarness.js | 14 +- .../maps/viewfinder/PredictionView.spec.js | 130 +- .../maps/viewfinder/PredictionViewHarness.js | 6 +- .../viewfinder/PredictionsListView.spec.js | 150 +- .../viewfinder/PredictionsListViewHarness.js | 6 +- .../views/maps/viewfinder/SearchView.spec.js | 399 +- .../maps/viewfinder/SearchViewHarness.js | 22 +- .../maps/viewfinder/ViewfinderView.spec.js | 115 +- .../maps/viewfinder/ViewfinderViewHarness.js | 6 +- .../maps/viewfinder/ZoomPresetView.spec.js | 181 +- .../maps/viewfinder/ZoomPresetViewHarness.js | 14 +- .../viewfinder/ZoomPresetsListView.spec.js | 188 +- .../viewfinder/ZoomPresetsListViewHarness.js | 42 +- test/scripts/README.md | 2 +- test/server.js | 109 +- 436 files changed, 115566 insertions(+), 104689 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 1d0eec770..ccd8a26c1 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username -custom: ['https://giving.ucsb.edu/Funds/Give?id=353'] +custom: ["https://giving.ucsb.edu/Funds/Give?id=353"] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index f3d5c415e..11c19f1eb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,10 +1,9 @@ --- name: Bug report about: Create a report to help us improve -title: '' +title: "" labels: bug -assignees: '' - +assignees: "" --- **Describe the bug** @@ -12,6 +11,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] + +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] +- Version [e.g. 22] **Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] + +- Device: [e.g. iPhone6] +- OS: [e.g. iOS8.1] +- Browser [e.g. stock browser, safari] +- Version [e.g. 22] **Additional context** Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 5e0dc1d5b..a5e103a75 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,10 +1,9 @@ --- name: Feature request about: Suggest an idea for MetacatUI -title: '' +title: "" labels: enhancement -assignees: '' - +assignees: "" --- **Describe the feature you'd like** diff --git a/.github/workflows/test.js.yml b/.github/workflows/test.js.yml index c04da21d2..f7b995d0f 100644 --- a/.github/workflows/test.js.yml +++ b/.github/workflows/test.js.yml @@ -6,14 +6,13 @@ name: Tests on: push: branches-ignore: - - 'ignore-*' + - "ignore-*" pull_request: branches-ignore: - - 'ignore-*' + - "ignore-*" jobs: test: - runs-on: ubuntu-latest strategy: @@ -22,15 +21,15 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - name: install dependencies - run: npm ci - - name: Run tests - run: npm test - - name: Dry run jsdoc - run: npm run jsdoc-dry-run + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + - name: install dependencies + run: npm ci + - name: Run tests + run: npm test + - name: Dry run jsdoc + run: npm run jsdoc-dry-run diff --git a/.prettierrc b/.prettierrc index 9982ea82c..48f3a235c 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,7 +1,5 @@ { - "plugins": [ - "@shopify/prettier-plugin-liquid" - ], + "plugins": ["@shopify/prettier-plugin-liquid"], "overrides": [ { "files": "docs/_includes/*.html", @@ -16,4 +14,4 @@ } } ] -} \ No newline at end of file +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 97189d63c..54e9cf81e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ ## Types of contributions We welcome all types of contributions, including bug fixes, feature enhancements, -bug reports, documentation, graphics, and many others. You might consider contributing by: +bug reports, documentation, graphics, and many others. You might consider contributing by: - Report a bug or request a new feature in our [issue tracker](https://github.com/NCEAS/metacatui/issues) - Fix a bug and contribute the code with a Pull Request @@ -28,8 +28,8 @@ bug reports, documentation, graphics, and many others. You might consider contr - ... MetacatUI is an open source project, and we welcome full -participation in the project. Contributions are reviewed and suggestions are -made to increase the value of MetacatUI to the community. We strive to +participation in the project. Contributions are reviewed and suggestions are +made to increase the value of MetacatUI to the community. We strive to incorporate code, documentation, and other useful contributions quickly and efficiently while maintaining a high-quality repository software product. @@ -38,6 +38,7 @@ If you have any questions about contributing, please feel free to ask on the on the [DataONE Slack team](https://slack.dataone.org/). ## Pull Requests + We use the pull-request model for contributions. See [GitHub's help on pull-requests](https://help.github.com/articles/about-pull-requests/). In short: @@ -53,7 +54,7 @@ In short: ## Development Workflow -Development is managed through the git repository at https://github.com/NCEAS/metacatui. The repository is organized into several branches, each with a specific purpose. +Development is managed through the git repository at https://github.com/NCEAS/metacatui. The repository is organized into several branches, each with a specific purpose. **main**. Releases are merged from the `develop` branch to the `main` branch, and the resulting commit is tagged with the release tag (e.g., `2.4.0`). The tip of the `main` branch always reflects the most recent release of the software. The version number in all configuration files and the README on the `main` branch follows [semantic versioning](https://semver.org/) and should always be set to the current release version, for example, `2.8.5`. @@ -65,22 +66,23 @@ Feature branches are named as `feature-` + `#{issue}` + `-{short-description}-`. All `feature-*` branches should be frequently merged with changes from `develop` to ensure that the feature branch stays up to date with other features that have -been tested and are awaiting release. Thus, each `feature-*` branch represents an opportunity +been tested and are awaiting release. Thus, each `feature-*` branch represents an opportunity for integration testing of the set of features intended to work together for a particular release. **dev-X.X**. Development branches named after their minor version number can be used when a patch release needs to be created that is behind the main **develop** branch. -**bugfix**. A final branch type are `bugfix` branches, which work the same as feature branches, but fix bugs rather than adding new functionality. Bugfix branches are named similarly, following the pattern: `bugfix-` + `{issue}` + `-{short-description}`, with `{issue}` being the GitHub issue number related to that bug. e.g. `bugfix-83-fix-name-display`. +**bugfix**. A final branch type are `bugfix` branches, which work the same as feature branches, but fix bugs rather than adding new functionality. Bugfix branches are named similarly, following the pattern: `bugfix-` + `{issue}` + `-{short-description}`, with `{issue}` being the GitHub issue number related to that bug. e.g. `bugfix-83-fix-name-display`. ### Development flow overview + ```mermaid -%%{init: { 'theme': 'base', +%%{init: { 'theme': 'base', 'gitGraph': { 'rotateCommitLabel': false, 'showCommitLabel': false - }, + }, 'themeVariables': { 'commitLabelColor': '#ffffffff', 'commitLabelBackground': '#000000' @@ -110,8 +112,8 @@ gitGraph ## Release process 1. Our release process starts with integration testing in a `develop` branch. Once all -changes that are desired in a release are merged into the `develop` branch, we run -the full set of tests on a clean checkout of the `develop` branch. + changes that are desired in a release are merged into the `develop` branch, we run + the full set of tests on a clean checkout of the `develop` branch. 2. After testing, the `develop` branch is merged to main. 3. Then the `main` branch can be tagged with the new version number (e.g. `2.11.2`). 4. Releases can be downloaded from the [Github releases page for the MetacatUI repository](https://github.com/NCEAS/metacatui/releases). @@ -121,9 +123,9 @@ the full set of tests on a clean checkout of the `develop` branch. **Unit and integration tests**. MetacatUI has a full suite of unit tests and integration tests in the `tests` subdirectory. Any new code developed should include a robust set of unit tests for each public -method, as well as integration tests from new feature sets. Tests should fully +method, as well as integration tests from new feature sets. Tests should fully exercise the feature to ensure that it responds correctly to both good data inputs -and various classes of corrupt or bad data. All tests should pass before submitting a PR +and various classes of corrupt or bad data. All tests should pass before submitting a PR or merging to `develop`. Tests are automatically run via GitHub Actions. Check the root `README.md` file @@ -136,7 +138,7 @@ Read more documentation about how tests are run and viewed in [/test/README.md]( ## Code style Code should be written to professional standards to enable clean, well-documented, -readable, and maintainable software. While there has been significant variability +readable, and maintainable software. While there has been significant variability in the coding styles applied historically, new contributions should strive for clean code formatting. @@ -145,19 +147,23 @@ clean code formatting. All JavaScript code should be fully documented with [JSDoc](https://jsdoc.app/) comments. For Models and Views: + - Gives a brief overview of what the class / file does and give a few short example of how you might use the class / file. - Create a screenshot of the View and use the `@screenshot` tag to include it in the built docs. - Use the `@classcategory` tag to organize the class file in the built docs navigational menu For Model and View methods: + - Say what each class method does and how to use it (use `@param` and `@returns`) - Use `@example` tags to give examples of parameters and return values - Use `@fires` to indicate Backbone Events that are fired by a method For Model and View attributes: + - Describe the purpose of the attribute, its `@default` value, and one or more `@example`s For everything: + - Use the `@since` tag to indicate the version the class/method/attribute was added - Use `@deprecated` for deprecated APIs and features - Use `@link` to link to other JSDoc pages when mentioning other classes, attributes, and methods (e.g. `{@link Model#method}`) @@ -257,7 +263,7 @@ California (hereafter, the "Regents"). your Contributions to the Regents, or that your employer has executed a separate Corporate CLA with the Regents. 5. You represent that each of Your Contributions is Your original - creation (see section 7 for submissions on behalf of others). You + creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you diff --git a/README.md b/README.md index c578d52c1..f116c157d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## MetacatUI: A client-side web interface for DataONE data repositories -- **Author**: Matthew B. Jones, Chris Jones, Lauren Walker, Robyn Thiessen-Bock, Ben Leinfelder, Peter Slaughter, Bryce Mecum, Rushiraj Nenuji, Hesham Elbashandy, Val Hendrix +- **Author**: Matthew B. Jones, Chris Jones, Lauren Walker, Robyn Thiessen-Bock, Ben Leinfelder, Peter Slaughter, Bryce Mecum, Rushiraj Nenuji, Hesham Elbashandy, Val Hendrix - **DOI**: [doi:10.18739/A2KD1QN1N](https://doi.org/10.18739/A2KD1QN1N) - **License**: [Apache 2](http://opensource.org/licenses/Apache-2.0) - [Package source code on Github](https://github.com/NCEAS/metacatui) @@ -9,9 +9,9 @@ ![Tests Status](https://github.com/NCEAS/metacatui/actions/workflows/test.js.yml/badge.svg) -MetacatUI is a client-side web interface for querying Metacat servers and other servers that implement the DataONE REST API. Currently, it is used as the basis for the [KNB Data Repository](http://knb.ecoinformatics.org), the [NSF Arctic Data Center](https://arcticdata.io/catalog/), the [DataONE federation](https://search.dataone.org), and other repositories. +MetacatUI is a client-side web interface for querying Metacat servers and other servers that implement the DataONE REST API. Currently, it is used as the basis for the [KNB Data Repository](http://knb.ecoinformatics.org), the [NSF Arctic Data Center](https://arcticdata.io/catalog/), the [DataONE federation](https://search.dataone.org), and other repositories. -MetacatUI is an open source, community project. We [welcome contributions](https://github.com/NCEAS/metacatui/blob/main/CONTRIBUTING.md) in many forms, including code, graphics, documentation, bug reports, testing, etc. Use the [discussion list](https://github.com/NCEAS/metacatui/issues) to discuss these contributions with us. +MetacatUI is an open source, community project. We [welcome contributions](https://github.com/NCEAS/metacatui/blob/main/CONTRIBUTING.md) in many forms, including code, graphics, documentation, bug reports, testing, etc. Use the [discussion list](https://github.com/NCEAS/metacatui/issues) to discuss these contributions with us. ## Citation @@ -27,15 +27,16 @@ The main search view The dataset landing page ![Arctic Data Center Metadata View](https://raw.githubusercontent.com/NCEAS/metacatui/main/docs/screenshots/metacatui-arctic-1200w.png) ------------------ +--- ## Documentation Documentation can be found on the [MetacatUI website](https://nceas.github.io/metacatui). ------------------ +--- ## License + ``` Copyright [2013] [Regents of the University of California] @@ -53,13 +54,14 @@ limitations under the License. ``` ## Acknowledgements + Work on this package was supported by: - NSF-ABI grant #1262458 to C. Gries, M. B. Jones, and S. Collins. - NSF-DATANET grant #1430508 to W. Michener, M. B. Jones, D. Vieglais, S. Allard and P. Cruse - NSF DIBBS grant #1443062 to T. Habermann and M. B. Jones - NSF-PLR grant #1546024 to M. B. Jones, S. Baker-Yeboah, J. Dozier, M. Schildhauer, and A. Budden -- NSF-PLR grant #2042102 to M. B. Jones, A. Budden, M. Schildhauer, and J. Dozier +- NSF-PLR grant #2042102 to M. B. Jones, A. Budden, M. Schildhauer, and J. Dozier Additional support was provided for working group collaboration by the National Center for Ecological Analysis and Synthesis, a Center funded by the University of California, Santa Barbara, and the State of California. diff --git a/docs/README.md b/docs/README.md index 89fa24a45..f6c817753 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,11 +1,13 @@ # MetacatUI Documentation + This folder of the MetacatUI repository contains the documentation for MetacatUI. This documentation includes: + - Basic information about MetacatUI - Installation instructions - Developer documentation for the MetacatUI application - ## Building Developer documentation + MetacatUI uses [JSDoc](https://github.com/jsdoc/jsdoc) comments to provide inline documentation of classes, methods, and variables. A JSDoc documentation generator will collect all those comments and generate HTML webpages for easier reading and navigation. The MetacatUI git repository already contains these generated HTML pages in the `docs/docs` directory. However, if you have made changes to the MetacatUI code and documentation and want to update the HTML doc pages, you will need to run the JSDoc generator. @@ -79,8 +81,10 @@ For example, to install and use Ruby 3.1.x with `rbenv`: After setting up the correct Ruby version, try running `bundle install` and then `bundle exec jekyll serve` again. ## Adding to this site + Feel free to add pages to the MetacatUI docs website by adding markdown files to this `docs` directory. Use subdirectories as much as possible to keep things organized. Use relative links with `.html` suffixes instead of `.md` so that the links work on the Github Pages site. ## Anything missing? + We maintain a list of questions about MetacatUI that are reviewed and worked into this documentation. If you have a question that was not answered by these docs, or want to make a suggestion for these docs, please add to the list by commenting on [the FAQ Github issue](https://github.com/NCEAS/metacatui/issues/1389) diff --git a/docs/_includes/header.html b/docs/_includes/header.html index b83a7eb3b..5e887f3f9 100644 --- a/docs/_includes/header.html +++ b/docs/_includes/header.html @@ -1,6 +1,9 @@