From ac3217d51a383f85a6c88f55dbb75659732e5c54 Mon Sep 17 00:00:00 2001 From: Nikolay Akhmetov Date: Tue, 27 Jun 2023 13:56:34 -0400 Subject: [PATCH 01/12] NickAkhmetov / Fix error page overflow (#3140) * Fix error page overflow * add changelog * revert to px * Add error boundary around visualization component * Update context/app/static/js/pages/Error/style.js Co-authored-by: John Conroy <62477388+john-conroy@users.noreply.github.com> * use theme props for error boundary bg as well * style fix to pass lint * Update CHANGELOG-error-display.md --------- Co-authored-by: John Conroy <62477388+john-conroy@users.noreply.github.com> --- CHANGELOG-error-display.md | 2 + .../VisualizationError.jsx | 49 +++++++++++++++++++ .../VisualizationWrapper.jsx | 47 ++++++++++-------- .../VisualizationWrapper/style.js | 16 +++++- context/app/static/js/pages/Error/style.js | 7 ++- context/build-utils/webpack.dev.js | 5 ++ 6 files changed, 102 insertions(+), 24 deletions(-) create mode 100644 CHANGELOG-error-display.md create mode 100644 context/app/static/js/components/detailPage/visualization/VisualizationWrapper/VisualizationError.jsx diff --git a/CHANGELOG-error-display.md b/CHANGELOG-error-display.md new file mode 100644 index 0000000000..b199275120 --- /dev/null +++ b/CHANGELOG-error-display.md @@ -0,0 +1,2 @@ +- Adjust page-wide error boundary to prevent error messages from overflowing +- Add error boundary around Vitessce visualization to keep Vitessce errors from crashing full page diff --git a/context/app/static/js/components/detailPage/visualization/VisualizationWrapper/VisualizationError.jsx b/context/app/static/js/components/detailPage/visualization/VisualizationWrapper/VisualizationError.jsx new file mode 100644 index 0000000000..5a1e4c2a31 --- /dev/null +++ b/context/app/static/js/components/detailPage/visualization/VisualizationWrapper/VisualizationError.jsx @@ -0,0 +1,49 @@ +import React from 'react'; + +import { DetailPageSection } from 'js/components/detailPage/style'; +import { SpacedSectionButtonRow } from 'js/shared-styles/sections/SectionButtonRow'; +import { StyledSectionHeader } from '../Visualization/style'; +import { VisualizationErrorBoundaryBackground } from './style'; + +// consider using "react-error-boundary" package in the future to convert this to a functional component +class VisualizationErrorBoundary extends React.Component { + constructor(props) { + super(props); + this.state = { hasError: false, error: null }; + } + + componentDidCatch(error, errorInfo) { + // You can also log the error to an error reporting service + console.error(error, errorInfo); + this.setState({ + hasError: true, + error: { error, errorInfo }, + }); + } + + render() { + const { hasError, error } = this.state; + const { isPublicationPage, uuid, shouldDisplayHeader, children } = this.props; + + if (hasError) { + return ( + + Visualization : undefined} + /> + +
The Vitessce visualization encountered an error. Please try again or contact support.
+
+ Click to expand error details +
{error.errorInfo.componentStack}
+
+
+
+ ); + } + + return children; + } +} + +export default VisualizationErrorBoundary; diff --git a/context/app/static/js/components/detailPage/visualization/VisualizationWrapper/VisualizationWrapper.jsx b/context/app/static/js/components/detailPage/visualization/VisualizationWrapper/VisualizationWrapper.jsx index 2fc913c2c6..ea65b1fc50 100644 --- a/context/app/static/js/components/detailPage/visualization/VisualizationWrapper/VisualizationWrapper.jsx +++ b/context/app/static/js/components/detailPage/visualization/VisualizationWrapper/VisualizationWrapper.jsx @@ -5,6 +5,7 @@ import { DetailPageSection } from 'js/components/detailPage/style'; import { SpacedSectionButtonRow } from 'js/shared-styles/sections/SectionButtonRow'; import { StyledSectionHeader } from '../Visualization/style'; import { VisualizationBackground } from './style'; +import VisualizationErrorBoundary from './VisualizationError'; const Visualization = React.lazy(() => import('../Visualization')); @@ -18,27 +19,33 @@ function VisualizationWrapper({ isPublicationPage, }) { return ( - - Visualization : undefined} - /> - - - - - } + - - + + Visualization : undefined} + /> + + + + + } + > + + + ); } diff --git a/context/app/static/js/components/detailPage/visualization/VisualizationWrapper/style.js b/context/app/static/js/components/detailPage/visualization/VisualizationWrapper/style.js index 191d757182..8884bc8c8f 100644 --- a/context/app/static/js/components/detailPage/visualization/VisualizationWrapper/style.js +++ b/context/app/static/js/components/detailPage/visualization/VisualizationWrapper/style.js @@ -1,11 +1,23 @@ +import { Paper } from '@material-ui/core'; import styled from 'styled-components'; + import { vitessceFixedHeight } from '../Visualization/style'; +const height = `height: ${vitessceFixedHeight}px;`; + const VisualizationBackground = styled.div` - height: ${vitessceFixedHeight}px; + ${height} display: flex; align-items: center; justify-content: center; `; -export { VisualizationBackground }; +const VisualizationErrorBoundaryBackground = styled(Paper)` + ${height} + white-space: pre-line; + overflow-y: auto; + padding: ${(props) => props.theme.spacing(2)}px; + font-size: ${(props) => props.theme.typography.body1.fontSize}}; +`; + +export { VisualizationBackground, VisualizationErrorBoundaryBackground }; diff --git a/context/app/static/js/pages/Error/style.js b/context/app/static/js/pages/Error/style.js index 3212391122..1bf67757ed 100644 --- a/context/app/static/js/pages/Error/style.js +++ b/context/app/static/js/pages/Error/style.js @@ -15,8 +15,11 @@ const Background = styled.div` const StyledPaper = styled(Paper)` width: 100%; max-width: 880px; - margin: 0px 16px; - padding: 16px; + ${({ theme: { spacing } }) => ` + margin: 0 ${spacing(2)}px; + padding: ${spacing(2)}px; + `} + word-break: break-all; `; const StyledTypography = styled(Typography)` diff --git a/context/build-utils/webpack.dev.js b/context/build-utils/webpack.dev.js index 96a5346e91..694610bb23 100644 --- a/context/build-utils/webpack.dev.js +++ b/context/build-utils/webpack.dev.js @@ -16,6 +16,11 @@ const envConfig = { port: 5001, compress: true, static: join(__dirname, './app'), + client: { + // Disable overlay while testing error boundaries + // The WDS overlay pops up even when error boundaries properly catch the runtime error + // overlay: false, + }, // Proxy all requests to flask server except for files in static/public/ proxy: { '!(/static/public//**/**.*)': { From ec61e06bb9f04427f3fb35a9611d2f85178439c5 Mon Sep 17 00:00:00 2001 From: Ilan Gold Date: Wed, 28 Jun 2023 13:07:25 -0400 Subject: [PATCH 02/12] (chore): bump `portal-visualization` to 0.0.12 (#3141) * (chore): bump `portal-visualization` to 0.0.12 * (chore): changelog --- CHANGELOG-portal-visualization-0.0.12.md | 1 + context/requirements.in | 2 +- context/requirements.txt | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 CHANGELOG-portal-visualization-0.0.12.md diff --git a/CHANGELOG-portal-visualization-0.0.12.md b/CHANGELOG-portal-visualization-0.0.12.md new file mode 100644 index 0000000000..0ba1500fc0 --- /dev/null +++ b/CHANGELOG-portal-visualization-0.0.12.md @@ -0,0 +1 @@ +- Bump `portal-visualization` to 0.0.12. \ No newline at end of file diff --git a/context/requirements.in b/context/requirements.in index 77f1ed4401..7ec51f8c4a 100644 --- a/context/requirements.in +++ b/context/requirements.in @@ -11,7 +11,7 @@ hubmap-api-py-client>=0.0.9 hubmap-commons>=2.0.12 # Plain "git+https://github.com/..." references can't be hashed, so we point to a release zip instead. -https://github.com/hubmapconsortium/portal-visualization/archive/refs/tags/0.0.11.zip +https://github.com/hubmapconsortium/portal-visualization/archive/refs/tags/0.0.12.zip # Security warning for older versions; # Can be removed when commons drops prov dependency. diff --git a/context/requirements.txt b/context/requirements.txt index bea2cb8eb1..23498fd38d 100644 --- a/context/requirements.txt +++ b/context/requirements.txt @@ -638,8 +638,8 @@ platformdirs==2.5.1 \ --hash=sha256:7535e70dfa32e84d4b34996ea99c5e432fa29a708d0f4e394bbcb2a8faa4f16d \ --hash=sha256:bcae7cab893c2d310a711b70b24efb93334febe65f8de776ee320b517471e227 # via black -portal-visualization @ https://github.com/hubmapconsortium/portal-visualization/archive/refs/tags/0.0.10.zip \ - --hash=sha256:7826fcbc0a662c20d5e01a92619244ff9456eec2767ff4f55eb63a5587a4ee52 +portal-visualization @ https://github.com/hubmapconsortium/portal-visualization/archive/refs/tags/0.0.12.zip \ + --hash=sha256:c00b21f842cf8d06c25580581ccefa6e722121f18a7b06fa10dd113edbe94fb0 # via -r context/requirements.in property==2.2 \ --hash=sha256:d25e4da4e415408b9eb39b6521c088e4e2b8a9e2f9f96fb2d91680e97207ea19 From c367079d6648980df8bdb995d1382e28465de282 Mon Sep 17 00:00:00 2001 From: John Conroy Date: Wed, 28 Jun 2023 16:54:58 -0400 Subject: [PATCH 03/12] Version bump to v0.73.1 --- context/app/markdown/dependencies.md | 9 ++++++--- context/package-lock.json | 4 ++-- context/package.json | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/context/app/markdown/dependencies.md b/context/app/markdown/dependencies.md index c6e3a655a0..bc1eb84b3e 100644 --- a/context/app/markdown/dependencies.md +++ b/context/app/markdown/dependencies.md @@ -7,7 +7,7 @@ The services the portal relies on are [listed separately](/services). ## Git submodules ``` - 79cab515ee56184a824c6755ff25fc6e2d1a3a65 context/ingest-validation-tools (v0.0.13-23-g79cab51) + 79cab515ee56184a824c6755ff25fc6e2d1a3a65 context/ingest-validation-tools (v0.0.13-23-g79cab515) ``` ## Python packages @@ -27,7 +27,7 @@ hubmap-api-py-client>=0.0.9 hubmap-commons>=2.0.12 # Plain "git+https://github.com/..." references can't be hashed, so we point to a release zip instead. -https://github.com/hubmapconsortium/portal-visualization/archive/refs/tags/0.0.11.zip +https://github.com/hubmapconsortium/portal-visualization/archive/refs/tags/0.0.12.zip # Security warning for older versions; # Can be removed when commons drops prov dependency. @@ -69,7 +69,7 @@ lxml>=4.9.1 "date-fns": "^2.27.0", "fast-deep-equal": "^3.1.3", "fromentries": "^1.2.0", -"html-webpack-plugin": "^4.3.0", +"html-webpack-plugin": "^5.5.3", "immer": "^9.0.6", "intersection-observer": "^0.11.0", "lineupjsx": "^4.0.0", @@ -93,8 +93,11 @@ lxml>=4.9.1 "react-vega": "^7.3.0", "sass": "^1.53.0", "searchkit": "^2.4.1-alpha.4", +"stream-browserify": "^3.0.0", "styled-components": "^5.1.0", +"swc-loader": "^0.2.3", "swr": "^2.1.5", +"timers-browserify": "^2.0.12", "typeface-inter": "^3.12.0", "universal-cookie": "^4.0.3", "use-debounce": "^8.0.1", diff --git a/context/package-lock.json b/context/package-lock.json index 8ce9cddae4..ab25d0e90a 100644 --- a/context/package-lock.json +++ b/context/package-lock.json @@ -1,12 +1,12 @@ { "name": "portal-ui", - "version": "0.73.0", + "version": "0.73.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "portal-ui", - "version": "0.73.0", + "version": "0.73.1", "license": "MIT", "dependencies": { "@babel/runtime": "^7.10.4", diff --git a/context/package.json b/context/package.json index e38db9ea7e..a2cf7431f3 100644 --- a/context/package.json +++ b/context/package.json @@ -1,6 +1,6 @@ { "name": "portal-ui", - "version": "0.73.0", + "version": "0.73.1", "dependencies": { "@babel/runtime": "^7.10.4", "@datapunt/matomo-tracker-js": "^0.5.1", From 02e3dcb42c848a88bfdac6d85a95b07dc24fd5cf Mon Sep 17 00:00:00 2001 From: John Conroy Date: Wed, 28 Jun 2023 16:54:59 -0400 Subject: [PATCH 04/12] Update CHANGELOG --- CHANGELOG-error-display.md | 2 -- CHANGELOG-hmp-103-add-tests.md | 2 -- CHANGELOG-hmp-154.md | 4 ---- CHANGELOG-hmp-181-remove-search-feature.md | 4 ---- CHANGELOG-hmp-182-lineup.md | 1 - CHANGELOG-hmp-20-trim-sub-header.md | 1 - CHANGELOG-portal-visualization-0.0.12.md | 1 - ...emove-non-datasets-from-datasets-charts.md | 1 - ...-remove-support-files-from-publications.md | 1 - context/app/markdown/CHANGELOG.md | 21 +++++++++++++++++++ 10 files changed, 21 insertions(+), 17 deletions(-) delete mode 100644 CHANGELOG-error-display.md delete mode 100644 CHANGELOG-hmp-103-add-tests.md delete mode 100644 CHANGELOG-hmp-154.md delete mode 100644 CHANGELOG-hmp-181-remove-search-feature.md delete mode 100644 CHANGELOG-hmp-182-lineup.md delete mode 100644 CHANGELOG-hmp-20-trim-sub-header.md delete mode 100644 CHANGELOG-portal-visualization-0.0.12.md delete mode 100644 CHANGELOG-remove-non-datasets-from-datasets-charts.md delete mode 100644 CHANGELOG-remove-support-files-from-publications.md diff --git a/CHANGELOG-error-display.md b/CHANGELOG-error-display.md deleted file mode 100644 index b199275120..0000000000 --- a/CHANGELOG-error-display.md +++ /dev/null @@ -1,2 +0,0 @@ -- Adjust page-wide error boundary to prevent error messages from overflowing -- Add error boundary around Vitessce visualization to keep Vitessce errors from crashing full page diff --git a/CHANGELOG-hmp-103-add-tests.md b/CHANGELOG-hmp-103-add-tests.md deleted file mode 100644 index 90960d6f4f..0000000000 --- a/CHANGELOG-hmp-103-add-tests.md +++ /dev/null @@ -1,2 +0,0 @@ -- Update Cypress testing suite. -- Add end-to-end tests for publication pages. diff --git a/CHANGELOG-hmp-154.md b/CHANGELOG-hmp-154.md deleted file mode 100644 index e66297c2ee..0000000000 --- a/CHANGELOG-hmp-154.md +++ /dev/null @@ -1,4 +0,0 @@ -- Upgrade from Webpack 4 -> 5 -- Upgrade from Storybook 6 -> 7 -- Migrate from babel-loader -> swc-loader -- Migrate to @swc/jest test runner \ No newline at end of file diff --git a/CHANGELOG-hmp-181-remove-search-feature.md b/CHANGELOG-hmp-181-remove-search-feature.md deleted file mode 100644 index c833cc65fb..0000000000 --- a/CHANGELOG-hmp-181-remove-search-feature.md +++ /dev/null @@ -1,4 +0,0 @@ -- Removed search feature from home page. -- Added vertical padding to the count section. -- Formatted 10k+ homepage entity counts to nearest thousands place. (10,500 -> 10.5k) -- Added tooltip hover feature on count entities. diff --git a/CHANGELOG-hmp-182-lineup.md b/CHANGELOG-hmp-182-lineup.md deleted file mode 100644 index 32d2525336..0000000000 --- a/CHANGELOG-hmp-182-lineup.md +++ /dev/null @@ -1 +0,0 @@ - - Ensure that lineup pages' data all have necessary keys and report any incomplete metadata in console \ No newline at end of file diff --git a/CHANGELOG-hmp-20-trim-sub-header.md b/CHANGELOG-hmp-20-trim-sub-header.md deleted file mode 100644 index c2c529a610..0000000000 --- a/CHANGELOG-hmp-20-trim-sub-header.md +++ /dev/null @@ -1 +0,0 @@ -- Trim publication sub header characters to 100 max with trailing ellisis. \ No newline at end of file diff --git a/CHANGELOG-portal-visualization-0.0.12.md b/CHANGELOG-portal-visualization-0.0.12.md deleted file mode 100644 index 0ba1500fc0..0000000000 --- a/CHANGELOG-portal-visualization-0.0.12.md +++ /dev/null @@ -1 +0,0 @@ -- Bump `portal-visualization` to 0.0.12. \ No newline at end of file diff --git a/CHANGELOG-remove-non-datasets-from-datasets-charts.md b/CHANGELOG-remove-non-datasets-from-datasets-charts.md deleted file mode 100644 index 8b31d5fe15..0000000000 --- a/CHANGELOG-remove-non-datasets-from-datasets-charts.md +++ /dev/null @@ -1 +0,0 @@ -- Remove publications and other dataset subtypes from dataset charts. \ No newline at end of file diff --git a/CHANGELOG-remove-support-files-from-publications.md b/CHANGELOG-remove-support-files-from-publications.md deleted file mode 100644 index ea61bc30a2..0000000000 --- a/CHANGELOG-remove-support-files-from-publications.md +++ /dev/null @@ -1 +0,0 @@ -- Remove globus link for lifted publication ancillary entities on publication pages. \ No newline at end of file diff --git a/context/app/markdown/CHANGELOG.md b/context/app/markdown/CHANGELOG.md index b1bee9a654..387896ca30 100644 --- a/context/app/markdown/CHANGELOG.md +++ b/context/app/markdown/CHANGELOG.md @@ -1,3 +1,24 @@ +## v0.73.1 - 2023-06-28 + +- Adjust page-wide error boundary to prevent error messages from overflowing +- Add error boundary around Vitessce visualization to keep Vitessce errors from crashing full page +- Update Cypress testing suite. +- Add end-to-end tests for publication pages. +- Upgrade from Webpack 4 -> 5 +- Upgrade from Storybook 6 -> 7 +- Migrate from babel-loader -> swc-loader +- Migrate to @swc/jest test runner +- Removed search feature from home page. +- Added vertical padding to the count section. +- Formatted 10k+ homepage entity counts to nearest thousands place. (10,500 -> 10.5k) +- Added tooltip hover feature on count entities. + - Ensure that lineup pages' data all have necessary keys and report any incomplete metadata in console +- Trim publication sub header characters to 100 max with trailing ellisis. +- Bump `portal-visualization` to 0.0.12. +- Remove publications and other dataset subtypes from dataset charts. +- Remove globus link for lifted publication ancillary entities on publication pages. + + ## v0.73.0 - 2023-06-20 - Fix donor metadata table display. From dcf231e7af22ebde1d15468b49add49abcb9a449 Mon Sep 17 00:00:00 2001 From: Nikolay Akhmetov Date: Fri, 30 Jun 2023 11:20:59 -0400 Subject: [PATCH 05/12] Update CHANGELOG-lint-updates.md Co-authored-by: John Conroy <62477388+john-conroy@users.noreply.github.com> --- CHANGELOG-lint-updates.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG-lint-updates.md b/CHANGELOG-lint-updates.md index 7517bbe58d..b5abb14fee 100644 --- a/CHANGELOG-lint-updates.md +++ b/CHANGELOG-lint-updates.md @@ -1,3 +1,3 @@ -- Updated project ESLint configuration and dependencies -- Removed Babel -- Introduced TypeScript \ No newline at end of file +- Update project ESLint configuration and dependencies. +- Remove Babel. +- Introduce TypeScript. \ No newline at end of file From 80e1093fe62e77c5fa9280e2e28341e0239a08bb Mon Sep 17 00:00:00 2001 From: John Conroy <62477388+john-conroy@users.noreply.github.com> Date: Fri, 30 Jun 2023 11:32:49 -0400 Subject: [PATCH 06/12] John conroy/fix provenance HMP-213 HMP-206 (#3146) * Fix flask data destructure * Add changelog --------- Co-authored-by: John Conroy --- CHANGELOG-fix-provenance. | 1 + .../js/components/detailPage/provenance/ProvTabs/ProvTabs.jsx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG-fix-provenance. diff --git a/CHANGELOG-fix-provenance. b/CHANGELOG-fix-provenance. new file mode 100644 index 0000000000..0ea92bd3b0 --- /dev/null +++ b/CHANGELOG-fix-provenance. @@ -0,0 +1 @@ +- Fix flask data context destructuring to restore provenance features. \ No newline at end of file diff --git a/context/app/static/js/components/detailPage/provenance/ProvTabs/ProvTabs.jsx b/context/app/static/js/components/detailPage/provenance/ProvTabs/ProvTabs.jsx index 3edd15a6b6..07a5216f92 100644 --- a/context/app/static/js/components/detailPage/provenance/ProvTabs/ProvTabs.jsx +++ b/context/app/static/js/components/detailPage/provenance/ProvTabs/ProvTabs.jsx @@ -8,7 +8,9 @@ import ProvAnalysisDetails from '../ProvAnalysisDetails'; import { hasDataTypes } from './utils'; function ProvTabs({ provData }) { - const { uuid, metadata, entity_type, ancestors, data_types } = useFlaskDataContext(); + const { + entity: { uuid, metadata, entity_type, ancestors, data_types }, + } = useFlaskDataContext(); const [open, setOpen] = React.useState(0); const handleChange = (event, newValue) => { From d3f92ea7074f3588e40f2104fbb1ff0feffdbae7 Mon Sep 17 00:00:00 2001 From: kevinyooky <45410262+kevinyooky@users.noreply.github.com> Date: Fri, 30 Jun 2023 10:31:42 -0700 Subject: [PATCH 07/12] Kevin yoo/hmp 156 update text for access permissions for workspaces (#3144) * text update * if else logic for text rendering * update text * changelog * changelog * text change * code refactor --- ...t-for-access-permissions-for-workspaces.md | 1 + .../static/js/pages/Workspaces/Workspaces.jsx | 39 ++++++++++++++----- 2 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 CHANGELOG-hmp-156-update-text-for-access-permissions-for-workspaces.md diff --git a/CHANGELOG-hmp-156-update-text-for-access-permissions-for-workspaces.md b/CHANGELOG-hmp-156-update-text-for-access-permissions-for-workspaces.md new file mode 100644 index 0000000000..40745efec6 --- /dev/null +++ b/CHANGELOG-hmp-156-update-text-for-access-permissions-for-workspaces.md @@ -0,0 +1 @@ +- Update workspaces landing page messaging to instruct users without membership in the workspaces Globus group to request access. \ No newline at end of file diff --git a/context/app/static/js/pages/Workspaces/Workspaces.jsx b/context/app/static/js/pages/Workspaces/Workspaces.jsx index 3c58e91e7d..4ced35c652 100644 --- a/context/app/static/js/pages/Workspaces/Workspaces.jsx +++ b/context/app/static/js/pages/Workspaces/Workspaces.jsx @@ -1,25 +1,44 @@ import React from 'react'; +import EmailIconLink from 'js/shared-styles/Links/iconLinks/EmailIconLink'; import { useAppContext } from 'js/components/Contexts'; import WorkspacesTitle from 'js/components/workspaces/WorkspacesTitle'; import { LightBlueLink } from 'js/shared-styles/Links'; import WorkspacesAuthenticated from 'js/components/workspaces/WorkspacesAuthenticated'; - import { StyledDescription } from './style'; -function Workspaces() { +function WorkspacesContent() { const { isAuthenticated, isWorkspacesUser } = useAppContext(); + + if (!isAuthenticated) { + return ( + + The workspaces feature is only available if you are logged in and part of the allowed Globus group.{' '} + Log in to view saved workspaces or to begin a new workspace. + + ); + } + + if (!isWorkspacesUser) { + return ( + + You must be a member of the allowed Globus group to access this feature. Email{' '} + + help@hubmapconsortium.org + {' '} + to gain access. + + ); + } + + return ; +} + +function Workspaces() { return ( <> - {!(isAuthenticated && isWorkspacesUser) ? ( - - The workspaces feature is only available if logged in. Log in to - view saved workspaces or to begin a new workspace. - - ) : ( - - )} + ); } From b1f2751b43e6c64943c1f778234b23660577585c Mon Sep 17 00:00:00 2001 From: Nikolay Akhmetov Date: Fri, 30 Jun 2023 14:58:53 -0400 Subject: [PATCH 08/12] NickAkhmetov / Hotfix null user groups case (#3148) --- context/app/static/js/components/App.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/app/static/js/components/App.jsx b/context/app/static/js/components/App.jsx index 4cfa6dfac6..9915da75d1 100644 --- a/context/app/static/js/components/App.jsx +++ b/context/app/static/js/components/App.jsx @@ -31,7 +31,7 @@ function App(props) { const { endpoints, globalAlertMd } = flaskData; delete flaskData.endpoints; delete flaskData.globalAlertMd; - const isWorkspacesUser = userGroups.includes('Workspaces') || workspacesUsers.includes(userEmail); + const isWorkspacesUser = userGroups?.includes('Workspaces') || workspacesUsers.includes(userEmail); return ( Date: Wed, 5 Jul 2023 10:17:03 -0400 Subject: [PATCH 09/12] NickAkhmetov/HMP-151 Fixed homepage Vitessce demonstration link (#3150) * HMP-151 Fixed homepage Vitessce demonstration link * fix formatting errors --- CHANGELOG-fix-homepage-vitessce-link.md | 1 + .../home/ImageCarouselContainer/ImageCarouselContainer.jsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG-fix-homepage-vitessce-link.md diff --git a/CHANGELOG-fix-homepage-vitessce-link.md b/CHANGELOG-fix-homepage-vitessce-link.md new file mode 100644 index 0000000000..fce3fc79bc --- /dev/null +++ b/CHANGELOG-fix-homepage-vitessce-link.md @@ -0,0 +1 @@ +- Fixed homepage Vitessce demonstration link. \ No newline at end of file diff --git a/context/app/static/js/components/home/ImageCarouselContainer/ImageCarouselContainer.jsx b/context/app/static/js/components/home/ImageCarouselContainer/ImageCarouselContainer.jsx index 60ce9600b7..f223eb47e4 100644 --- a/context/app/static/js/components/home/ImageCarouselContainer/ImageCarouselContainer.jsx +++ b/context/app/static/js/components/home/ImageCarouselContainer/ImageCarouselContainer.jsx @@ -17,7 +17,7 @@ function ImageCarouselContainer() { body: 'View multi-modal single-cell resolution measurements with reusable interactive components such as a scatterplot, spatial+imaging plot, genome browser tracks, statistical plots, and controller components.', image: , buttonHref: - '/browse/dataset/69d9c52bc9edb625b496cecb623ec081#vitessce_conf_length=5973&vitessce_conf_version=0.0.1&vitessce_conf=N4Igxg9hBOAmCWA7AhgF3hRBlADssApiAFyixrIDOBqJoAgiSIwL4A0IBAtgEYGwJEAcwAqATxxFSzJqgC0WAHIBREOxAQelcZLozi4AgBsjajgDMCaAK7QCOqQyZCCiIuss27ANWRHr9hKO+pwAHjh2lJQYiGacvPyCQgBaUFx6jMQATABsAHRZAJw5WQAMABwAzADsACyFdaWF6tx8AkhCAEoQqGgxGSSlLQntwiLI0C6oABoDxHKVeU0AjA2V9YWbW+UArARy1cNtSeOTNACac3I7eTm1teW1NRtbm-uHHK2JHadTyXNDT4jJIAeS0WBoAAUIEYxEJMJRvPBojwjMFMuY-NQjt9hGDKBDUAAZZB8IyI5HwVHokiY8kEHGjIT4wkkslYeAALxpxGWtUZoK0nWQCGslDmywFHXxwtFlAAshBYDyQMhrKgIHEvkz8SC8GB4KgxBKpXitHr8IaxIrlXNVerNepKHh0H5UhB0tJMnJanlNllljtSllqqVKoUdk8djsnS74H5ur10JgAbG+n5fjRZl6SLVquVlnlKqUdgWsjtKuVipKOM700ZM6hLjniA9S3knoU+dUA7l7jHa3GMxM-nNENYTGnXUZE31MNmnMRx5PB-XZ8nEM3F8ujFP4zOenPEP8Wzu9wnDxuQdAeIbU6vp9fb6h6KFkWOJ7uH-vX8iAGLwKE-BzHS2IcAAFlYqBcMgODulwC76ICICQWgMFwWkW5IeoqHQbBjaIZkyG4ehjZYUR6iaJQAFGKgBDQB+K4aFoAAS8BCOBRjseBtCnp+lHgjQEJomAG5zAA2uJIAAMLGEYAAEADScjylYiCUPJ4moEoygAPr0CYul-l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0HihCtq-cjw+iOZHoTqqACSlAXq6SnCsgQa+Sna7UE4RMgG0at2yGJGyapGomyal2jofS524EDofyhSgOsYDamYcOkOyOs4JsGO44H4KO7yyGCO5kKG6EWEeEdSJELdYOpOs0dKJLMkCkfO6y9O6rEu4wQ81lHyyuoUfzQLAu3EDOygWUALBUJUOutO2Otui0A0I9FunUc0bzL9Ha36kbAFCe1iFG4Gme4uzGiGka4upWtG924uhGgm6pNehSjG8Gp1be0yImvG2CPenGtZEm2CLZcmheqm85WmnaiWw0GIaW4u2Wkq9WiqzW4gWNEAGq7ldikAAZfW2ClqtGlnQkcUcSjC227C2Sx29eyG7QT2lewkJew+jewkXeheoqaWI+uwDBttH6rQe+mmy5J+irFAIwKuj+1W3+mi5VSq1FJi3NQB761QVOZq3itG65RomBnqmIPq+2k9RB8+1S1Bj7dBg+4hnypGv6tKuR8GHBghggIhimshi5YQN8kqzVFGBPHnPQexWJUkUbNkYwEETlO3RTJgcKdAa5OIcq-DH+5YVh+DXWgwP8UBw21qlCKCGZARm2oRu2hB3rJ2khlBqbJRiRqJr2i+2anakiWCeCI6yGJJjCD0c6tJ-x-CKO1JiCHJnAbaiJhRimlRrBsG6DTB5B7Bue2G3BmgLe6J6pUpxG5Rup5W1R9Rtpwmma0+nAcRzSvpq+nAG+nulezRx+6y5+qWmhmWnR+hr6fRrzLHO9Z0CAagZUsFXxakSgcxmhqx2JW0bQ+x1wRxkgP+qw+i5i9hpgAAcXfJACjKYDHNhLBXojrgMELH2T5DUCAA', + '/browse/dataset/69d9c52bc9edb625b496cecb623ec081#vitessce_conf_length=5937&vitessce_conf_version=0.0.1&vitessce_conf=N4Igxg9hBOAmCWA7AhgF3hRBlADssApiAFyixrIDOBqJoAgiSIwL4A0IBAtgEYGwJEAcwAqATxxFSzJqgC0WAHIBREOxAQelcZLozi4AgBsjajgDMCaAK7QCOqQyZCCiIuss27ANWRHr9hKO+pwAHjh2lJQYiGacvPyCQgBaUFx6jMQATABsAHRZAJw5WQAMAB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Wk9IBte8GUBz6pByBoawG7ujhnyGBvhue6DZB47TG9By5YWlCchlGP3KnPQQA+MakSgZOnBzlHXRTJgcKdAa5OIIh1K1FMh+DGWgwP8N+xWwqlCKCGZRhnW5hvWwBirI22Bm2zhy25qlZCZVqkiWCeCJayGPxjCD0AOoJ2x-CL2wJiCCJnACa2BgR3e1iYGp6pJ8Onh8ejKFJn6tJie-2BBuwRJgpoGrKVJ4pjJ2ehGjelenAQR8S6p6ZLe1GjulByR7G6RzSrBs+nB7m-BkW1sDgCIbI0HO9Z0CAagIUsFXxVR9RkETR2JW0KQvR1wAxkge+zQ3CwiihpgAAcRPIQM+NbL4Ipkhk0brgMELH2T5DUCAA', }, { title: 'Navigate healthy human cells with the Common Coordinate Framework', From 4bb78f8db5ca55db15f3dd8681541a56db5f4116 Mon Sep 17 00:00:00 2001 From: Nikolay Akhmetov Date: Wed, 5 Jul 2023 13:56:40 -0400 Subject: [PATCH 10/12] NickAkhmetov/Rename CHANGELOG-fix-provenance. to CHANGELOG-fix-provenance.md (#3153) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * NickAkhmetov/Rename CHANGELOG-fix-provenance. to CHANGELOG-fix-provenance.md This PR fixes the Changelog file extension for the changes in #3146 * add changelog for changelog 😵‍💫 --- CHANGELOG-fix-provenance. => CHANGELOG-fix-provenance.md | 2 +- CHANGELOG-hotfix.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) rename CHANGELOG-fix-provenance. => CHANGELOG-fix-provenance.md (90%) create mode 100644 CHANGELOG-hotfix.md diff --git a/CHANGELOG-fix-provenance. b/CHANGELOG-fix-provenance.md similarity index 90% rename from CHANGELOG-fix-provenance. rename to CHANGELOG-fix-provenance.md index 0ea92bd3b0..2abe8bc4fb 100644 --- a/CHANGELOG-fix-provenance. +++ b/CHANGELOG-fix-provenance.md @@ -1 +1 @@ -- Fix flask data context destructuring to restore provenance features. \ No newline at end of file +- Fix flask data context destructuring to restore provenance features. diff --git a/CHANGELOG-hotfix.md b/CHANGELOG-hotfix.md new file mode 100644 index 0000000000..9687aa60bb --- /dev/null +++ b/CHANGELOG-hotfix.md @@ -0,0 +1 @@ +- Fixed changelog file format. \ No newline at end of file From ce3d5aeee0da192a123eae6fa09e7426c9a3bff2 Mon Sep 17 00:00:00 2001 From: Nikolay Akhmetov Date: Wed, 5 Jul 2023 15:10:11 -0400 Subject: [PATCH 11/12] NickAkhmetov/HMP-207 Fix publication header (#3151) * HMP-207 Fix publication header * past tense changelog --- CHANGELOG-hmp-207-fix-line-break.md | 1 + .../detailPage/summary/SummaryData/SummaryData.jsx | 6 ++++-- .../publications/PublicationSummary/PublicationSummary.jsx | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 CHANGELOG-hmp-207-fix-line-break.md diff --git a/CHANGELOG-hmp-207-fix-line-break.md b/CHANGELOG-hmp-207-fix-line-break.md new file mode 100644 index 0000000000..e5bb5696e7 --- /dev/null +++ b/CHANGELOG-hmp-207-fix-line-break.md @@ -0,0 +1 @@ +- Adjusted publication header to appear on one line only. \ No newline at end of file diff --git a/context/app/static/js/components/detailPage/summary/SummaryData/SummaryData.jsx b/context/app/static/js/components/detailPage/summary/SummaryData/SummaryData.jsx index bef7b81455..e2d17fa0ca 100644 --- a/context/app/static/js/components/detailPage/summary/SummaryData/SummaryData.jsx +++ b/context/app/static/js/components/detailPage/summary/SummaryData/SummaryData.jsx @@ -24,17 +24,19 @@ function SummaryData({ children, mapped_external_group_name, }) { + const isPublication = entity_type === 'Publication'; + const LeftTextContainer = isPublication ? React.Fragment : 'div'; return ( <> {entity_type} + {title} {children && {children}} - + } buttons={ diff --git a/context/app/static/js/components/publications/PublicationSummary/PublicationSummary.jsx b/context/app/static/js/components/publications/PublicationSummary/PublicationSummary.jsx index 9c88dfff2b..bed978e9c5 100644 --- a/context/app/static/js/components/publications/PublicationSummary/PublicationSummary.jsx +++ b/context/app/static/js/components/publications/PublicationSummary/PublicationSummary.jsx @@ -43,7 +43,7 @@ function PublicationSummary({ > {hubmap_id} {hasDOI && ( - + {doiURL} )} From a6e959317d3a5cb6000cf161373dcf31ff9e5d89 Mon Sep 17 00:00:00 2001 From: John Conroy <62477388+john-conroy@users.noreply.github.com> Date: Wed, 5 Jul 2023 15:21:34 -0400 Subject: [PATCH 12/12] John conroy/fair data messaging HMP-202 (#3149) * Add section footer component * Add caption colors to theme * Add data caption component * Use section footer in visualization * Remove prop * Pull visualization footer into own component * Refactor to hubmap data footer component * Show data footer on dataset files sections * Pull typography into section footer * Use prop with key instead of children * Update homepage text * Add changelog * Add flask provider to files tests * Fix import * Fix cy test * Pass testid * Fix changelog extension * Remove click * Fix story consistency --------- Co-authored-by: John Conroy --- CHANGELOG-fair-data-messaging.md | 1 + .../components/Header/Dropdown/Dropdown.jsx | 4 +- .../components/Header/UserLinks/UserLinks.jsx | 9 +- .../files/FileBrowser/FileBrowser.jsx | 58 +++++++------ .../files/FileBrowser/FileBrowser.spec.js | 13 +-- .../detailPage/files/Files/Files.spec.js | 9 +- .../HubmapDataFooter/HubmapDataFooter.jsx | 35 ++++++++ .../files/HubmapDataFooter/index.js | 3 + .../files/HubmapDataFooter/style.js | 8 ++ .../Visualization/Visualization.jsx | 9 +- .../visualization/Visualization/style.js | 7 -- .../VisualizationFooter.jsx | 24 ++++++ .../VisualizationFooter/index.js | 3 + .../DataUseGuidelines/DataUseGuidelines.jsx | 84 ++++++++++++++++--- .../home/DataUseGuidelines/style.js | 4 +- .../sections/SectionFooter/SectionFooter.jsx | 18 ++++ .../SectionFooter/SectionFooter.stories.js | 17 ++++ .../sections/SectionFooter/index.js | 3 + .../sections/SectionFooter/style.js | 32 +++++++ context/app/static/js/theme.jsx | 4 + end-to-end/cypress/e2e/portal/portal-ui.cy.js | 4 +- 21 files changed, 283 insertions(+), 66 deletions(-) create mode 100644 CHANGELOG-fair-data-messaging.md create mode 100644 context/app/static/js/components/detailPage/files/HubmapDataFooter/HubmapDataFooter.jsx create mode 100644 context/app/static/js/components/detailPage/files/HubmapDataFooter/index.js create mode 100644 context/app/static/js/components/detailPage/files/HubmapDataFooter/style.js create mode 100644 context/app/static/js/components/detailPage/visualization/VisualizationFooter/VisualizationFooter.jsx create mode 100644 context/app/static/js/components/detailPage/visualization/VisualizationFooter/index.js create mode 100644 context/app/static/js/shared-styles/sections/SectionFooter/SectionFooter.jsx create mode 100644 context/app/static/js/shared-styles/sections/SectionFooter/SectionFooter.stories.js create mode 100644 context/app/static/js/shared-styles/sections/SectionFooter/index.js create mode 100644 context/app/static/js/shared-styles/sections/SectionFooter/style.js diff --git a/CHANGELOG-fair-data-messaging.md b/CHANGELOG-fair-data-messaging.md new file mode 100644 index 0000000000..d06a76d27c --- /dev/null +++ b/CHANGELOG-fair-data-messaging.md @@ -0,0 +1 @@ +- Add messaging for fair data principles to homepage, vitessce, and the dataset file browser. \ No newline at end of file diff --git a/context/app/static/js/components/Header/Dropdown/Dropdown.jsx b/context/app/static/js/components/Header/Dropdown/Dropdown.jsx index 1c6d06f36b..c8709d552d 100644 --- a/context/app/static/js/components/Header/Dropdown/Dropdown.jsx +++ b/context/app/static/js/components/Header/Dropdown/Dropdown.jsx @@ -9,13 +9,13 @@ import MenuList from '@material-ui/core/MenuList'; import { OffsetPopper } from './style'; -function Dropdown({ title, children, menuListId }) { +function Dropdown({ title, children, menuListId, ...rest }) { const [open, toggle] = useReducer((v) => !v, false); const anchorRef = useRef(null); return ( <> - diff --git a/context/app/static/js/components/Header/UserLinks/UserLinks.jsx b/context/app/static/js/components/Header/UserLinks/UserLinks.jsx index f10fe095ec..7dfb8f76ca 100644 --- a/context/app/static/js/components/Header/UserLinks/UserLinks.jsx +++ b/context/app/static/js/components/Header/UserLinks/UserLinks.jsx @@ -11,14 +11,19 @@ function UserLinks({ isAuthenticated, userEmail }) { const { isWorkspacesUser } = useAppContext(); return ( - {isAuthenticated ? userEmail || 'User' : 'User Profile'}}> + {isAuthenticated ? userEmail || 'User' : 'User Profile'}} + data-testid="user-profile-dropdown" + > My Lists {isWorkspacesUser && My Workspaces} {isAuthenticated ? ( Log Out ) : ( - Log In + + Log In + )} ); diff --git a/context/app/static/js/components/detailPage/files/FileBrowser/FileBrowser.jsx b/context/app/static/js/components/detailPage/files/FileBrowser/FileBrowser.jsx index 869dc00faf..e2d06aaa33 100644 --- a/context/app/static/js/components/detailPage/files/FileBrowser/FileBrowser.jsx +++ b/context/app/static/js/components/detailPage/files/FileBrowser/FileBrowser.jsx @@ -7,6 +7,8 @@ import TableRow from '@material-ui/core/TableRow'; import TableBody from '@material-ui/core/TableBody'; import Chip from '@material-ui/core/Chip'; +import HubmapDataFooter from 'js/components/detailPage/files/HubmapDataFooter'; +import { useFlaskDataContext } from 'js/components/Contexts'; import useFilesStore from 'js/stores/useFilesStore'; import { relativeFilePathsToTree } from './utils'; import FileBrowserNode from '../FileBrowserNode'; @@ -19,6 +21,9 @@ const filesStoreSelector = (state) => ({ function FileBrowser({ files }) { const { displayOnlyQaQc, toggleDisplayOnlyQaQc } = useFilesStore(filesStoreSelector); + const { + entity: { entity_type }, + } = useFlaskDataContext(); const fileTrees = useMemo( () => ({ @@ -29,31 +34,34 @@ function FileBrowser({ files }) { ); return ( - - - : undefined} - component="button" - disabled={Object.keys(fileTrees.qa).length === 0} - /> - - - - - - - - - - - - -
NameTypeSize
-
+ <> + + + : undefined} + component="button" + disabled={Object.keys(fileTrees.qa).length === 0} + /> + + + + + + + + + + + + +
NameTypeSize
+
+ {['Dataset', 'Support'].includes(entity_type) && } + ); } diff --git a/context/app/static/js/components/detailPage/files/FileBrowser/FileBrowser.spec.js b/context/app/static/js/components/detailPage/files/FileBrowser/FileBrowser.spec.js index 0eaa98f95d..1798a0667a 100644 --- a/context/app/static/js/components/detailPage/files/FileBrowser/FileBrowser.spec.js +++ b/context/app/static/js/components/detailPage/files/FileBrowser/FileBrowser.spec.js @@ -3,6 +3,7 @@ import React from 'react'; import userEvent from '@testing-library/user-event'; import { render, screen } from 'test-utils/functions'; +import { FlaskDataContext } from 'js/components/Contexts'; import DetailContext from 'js/components/detailPage/context'; import FileBrowser from './FileBrowser'; import FilesContext from '../Files/context'; @@ -13,11 +14,13 @@ const uuid = 'fakeuuid'; const FilesProviders = ({ children }) => { return ( - - - {children} - - + + + + {children} + + + ); }; diff --git a/context/app/static/js/components/detailPage/files/Files/Files.spec.js b/context/app/static/js/components/detailPage/files/Files/Files.spec.js index 7c9ebeca56..4fb922c6a9 100644 --- a/context/app/static/js/components/detailPage/files/Files/Files.spec.js +++ b/context/app/static/js/components/detailPage/files/Files/Files.spec.js @@ -5,6 +5,7 @@ import { render, screen, waitForElementToBeRemoved, appProviderEndpoints } from import { rest } from 'msw'; import { setupServer } from 'msw/node'; +import { FlaskDataContext } from 'js/components/Contexts'; import DetailContext from 'js/components/detailPage/context'; import Files from './Files'; @@ -64,9 +65,11 @@ test('handles DUA flow', async () => { ]; render( - - - , + + + + + , ); userEvent.click(screen.getByRole('button', { name: 'fake5.txt' })); diff --git a/context/app/static/js/components/detailPage/files/HubmapDataFooter/HubmapDataFooter.jsx b/context/app/static/js/components/detailPage/files/HubmapDataFooter/HubmapDataFooter.jsx new file mode 100644 index 0000000000..238a62a89c --- /dev/null +++ b/context/app/static/js/components/detailPage/files/HubmapDataFooter/HubmapDataFooter.jsx @@ -0,0 +1,35 @@ +import React from 'react'; + +import SectionFooter from 'js/shared-styles/sections/SectionFooter'; +import { SecondaryBackgroundTooltip } from 'js/shared-styles/tooltips'; +import { StyledInfoIcon } from './style'; + +const tooltipText = + 'HuBMAP data is managed and published in the Data Portal and Human Reference Atlas according to FAIR Principles, including standardized processing with reproducible pipelines. HuBMAP data may also be processed by other methods in scientific results published by HuBMAP consortium collaborations.'; + +function DataCaptionWithTooltip() { + return ( + <> + About this Data + + + + + ); +} + +function HubmapDataFooter({ items = [] }) { + return ( + , + }, + ]} + /> + ); +} + +export default HubmapDataFooter; diff --git a/context/app/static/js/components/detailPage/files/HubmapDataFooter/index.js b/context/app/static/js/components/detailPage/files/HubmapDataFooter/index.js new file mode 100644 index 0000000000..07c35c704e --- /dev/null +++ b/context/app/static/js/components/detailPage/files/HubmapDataFooter/index.js @@ -0,0 +1,3 @@ +import HubmapDataFooter from './HubmapDataFooter'; + +export default HubmapDataFooter; diff --git a/context/app/static/js/components/detailPage/files/HubmapDataFooter/style.js b/context/app/static/js/components/detailPage/files/HubmapDataFooter/style.js new file mode 100644 index 0000000000..0a103a6948 --- /dev/null +++ b/context/app/static/js/components/detailPage/files/HubmapDataFooter/style.js @@ -0,0 +1,8 @@ +import styled from 'styled-components'; +import { InfoIcon } from 'js/shared-styles/icons'; + +const StyledInfoIcon = styled(InfoIcon)` + margin-left: ${(props) => props.theme.spacing(0.5)}px; +`; + +export { StyledInfoIcon }; diff --git a/context/app/static/js/components/detailPage/visualization/Visualization/Visualization.jsx b/context/app/static/js/components/detailPage/visualization/Visualization/Visualization.jsx index 81b4474883..1baec6d120 100644 --- a/context/app/static/js/components/detailPage/visualization/Visualization/Visualization.jsx +++ b/context/app/static/js/components/detailPage/visualization/Visualization/Visualization.jsx @@ -7,7 +7,6 @@ import { Vitessce } from 'vitessce'; import packageInfo from 'package'; -import OutboundIconLink from 'js/shared-styles/Links/iconLinks/OutboundIconLink'; import { Alert } from 'js/shared-styles/alerts'; import DropdownListbox from 'js/shared-styles/dropdowns/DropdownListbox'; import DropdownListboxOption from 'js/shared-styles/dropdowns/DropdownListboxOption'; @@ -17,6 +16,8 @@ import useVisualizationStore from 'js/stores/useVisualizationStore'; import VisualizationNotebookButton from '../VisualizationNotebookButton'; import VisualizationShareButton from '../VisualizationShareButton'; import VisualizationThemeSwitch from '../VisualizationThemeSwitch'; +import VisualizationFooter from '../VisualizationFooter'; + import { useVitessceConfig } from './hooks'; import { ErrorSnackbar, @@ -25,7 +26,6 @@ import { Flex, SelectionButton, StyledDetailPageSection, - StyledFooterText, StyledSectionHeader, VitessceInfoSnackbar, bodyExpandedCSS, @@ -204,10 +204,7 @@ function Visualization({ vitData, uuid, uuidSuffix, hasNotebook, shouldDisplayHe )} - - Powered by  - Vitessce v{version} - + ) diff --git a/context/app/static/js/components/detailPage/visualization/Visualization/style.js b/context/app/static/js/components/detailPage/visualization/Visualization/style.js index cb6e288c93..c368f1a97f 100644 --- a/context/app/static/js/components/detailPage/visualization/Visualization/style.js +++ b/context/app/static/js/components/detailPage/visualization/Visualization/style.js @@ -1,6 +1,5 @@ import styled, { css } from 'styled-components'; import Button from '@material-ui/core/Button'; -import Typography from '@material-ui/core/Typography'; import Snackbar from '@material-ui/core/Snackbar'; import { WhiteBackgroundIconButton } from 'js/shared-styles/buttons'; @@ -67,11 +66,6 @@ const ExpandableDiv = styled.div` } `; -const StyledFooterText = styled(Typography)` - line-height: 1.5; - text-align: right; -`; - const StyledDetailPageSection = styled(DetailPageSection)` width: 100%; ${(props) => @@ -98,7 +92,6 @@ export { ErrorSnackbar, VitessceInfoSnackbar, ExpandableDiv, - StyledFooterText, SelectionButton, StyledDetailPageSection, }; diff --git a/context/app/static/js/components/detailPage/visualization/VisualizationFooter/VisualizationFooter.jsx b/context/app/static/js/components/detailPage/visualization/VisualizationFooter/VisualizationFooter.jsx new file mode 100644 index 0000000000..7ca8b0f0d1 --- /dev/null +++ b/context/app/static/js/components/detailPage/visualization/VisualizationFooter/VisualizationFooter.jsx @@ -0,0 +1,24 @@ +import React from 'react'; + +import HubmapDataFooter from 'js/components/detailPage/files/HubmapDataFooter'; +import OutboundIconLink from 'js/shared-styles/Links/iconLinks/OutboundIconLink'; + +function VisualizationFooter({ version }) { + return ( + + Powered by  + Vitessce v{version} + + ), + }, + ]} + /> + ); +} + +export default VisualizationFooter; diff --git a/context/app/static/js/components/detailPage/visualization/VisualizationFooter/index.js b/context/app/static/js/components/detailPage/visualization/VisualizationFooter/index.js new file mode 100644 index 0000000000..e9bf041ef3 --- /dev/null +++ b/context/app/static/js/components/detailPage/visualization/VisualizationFooter/index.js @@ -0,0 +1,3 @@ +import VisualizationFooter from './VisualizationFooter'; + +export default VisualizationFooter; diff --git a/context/app/static/js/components/home/DataUseGuidelines/DataUseGuidelines.jsx b/context/app/static/js/components/home/DataUseGuidelines/DataUseGuidelines.jsx index c2de0f48e3..a36bf2c567 100644 --- a/context/app/static/js/components/home/DataUseGuidelines/DataUseGuidelines.jsx +++ b/context/app/static/js/components/home/DataUseGuidelines/DataUseGuidelines.jsx @@ -1,24 +1,82 @@ import React from 'react'; import EmailIconLink from 'js/shared-styles/Links/iconLinks/EmailIconLink'; -import { StyledPaper, MainText } from './style'; +import OutboundLink from 'js/shared-styles/Links/OutboundLink'; +import { StyledPaper, StyledTypography } from './style'; -function DataUseGuidelines() { - return ( - - - The majority of data available on the HuBMAP Portal is open access data to be used for research of human - biology. Certain data types with potential for re-identification are available in restricted access either - directly through this portal by login-dependent permissions or through dbGAP. All data users are expected to - respect the privacy and confidentiality of the donors who provided samples. Data are not to be used to - re-identify donors or their family members without further approval from HuBMAP. - - +const paragraphs = [ + { + key: 'intro', + component: ( + <> + The HuBMAP Data Portal allows access to both open and restricted access data and will be guided by the rules set + by existing NIH GDH Policy and other applicable laws. There may be both controlled and uncontrolled access data + available through the Data Portal. Permission to access controlled data will be reviewed and granted by a + designated NIH Data Access Committee. + + ), + }, + + { + key: 'users', + component: ( + <> + Users of HuBMAP open-data or processed data agree not to use the requested datasets, either alone or in concert + with any other information, to identify or contact individual participants (or family members) from whom data + and/or samples were collected. + + ), + }, + + { + key: 'licenses', + component: ( + <> + All published HuBMAP data is licensed under a{' '} + + Creative Commons Attribution 4.0 International License (CC BY 4.0). + {' '} + Data is also governed by the{' '} + + External Data Sharing Policy + + . + + ), + }, + + { + key: 'fair-principles', + component: ( + <> + HuBMAP data is managed and published in the Data Portal and Human Reference Atlas according to{' '} + FAIR Principles, including + standardized processing with reproducible pipelines. HuBMAP data may also be processed by other methods in + scientific results published by HuBMAP consortium collaborations. + + ), + }, + { + key: 'help', + component: ( + <> Please direct any questions to{' '} help@hubmapconsortium.org - + + ), + }, +]; + +function DataUseGuidelines() { + return ( + + {paragraphs.map(({ key, component }, i) => ( + + {component} + + ))} ); } diff --git a/context/app/static/js/components/home/DataUseGuidelines/style.js b/context/app/static/js/components/home/DataUseGuidelines/style.js index 16b494de15..9504d83b6e 100644 --- a/context/app/static/js/components/home/DataUseGuidelines/style.js +++ b/context/app/static/js/components/home/DataUseGuidelines/style.js @@ -6,8 +6,8 @@ const StyledPaper = styled(Paper)` padding: ${(props) => props.theme.spacing(2)}px; `; -const MainText = styled(Typography)` +const StyledTypography = styled(Typography)` margin-top: ${(props) => props.theme.spacing(props.mt)}px; `; -export { StyledPaper, MainText }; +export { StyledPaper, StyledTypography }; diff --git a/context/app/static/js/shared-styles/sections/SectionFooter/SectionFooter.jsx b/context/app/static/js/shared-styles/sections/SectionFooter/SectionFooter.jsx new file mode 100644 index 0000000000..98e9715a55 --- /dev/null +++ b/context/app/static/js/shared-styles/sections/SectionFooter/SectionFooter.jsx @@ -0,0 +1,18 @@ +import React, { Fragment } from 'react'; + +import { StyledPaper, StyledDivider, StyledTypography } from './style'; + +function SectionFooter({ items }) { + return ( + + {items.map(({ key, component }, index) => ( + + {index !== 0 && } + {component} + + ))} + + ); +} + +export default SectionFooter; diff --git a/context/app/static/js/shared-styles/sections/SectionFooter/SectionFooter.stories.js b/context/app/static/js/shared-styles/sections/SectionFooter/SectionFooter.stories.js new file mode 100644 index 0000000000..e5177604ad --- /dev/null +++ b/context/app/static/js/shared-styles/sections/SectionFooter/SectionFooter.stories.js @@ -0,0 +1,17 @@ +import React from 'react'; + +import SectionFooter from './SectionFooter'; + +export default { + title: 'Sections/SectionFooter', + component: SectionFooter, +}; + +export const Basic = { + args: { + items: [ + { key: '1', component: <>Item 1 }, + { key: '2', component: <>Item 2 }, + ], + }, +}; diff --git a/context/app/static/js/shared-styles/sections/SectionFooter/index.js b/context/app/static/js/shared-styles/sections/SectionFooter/index.js new file mode 100644 index 0000000000..ae8cee45ab --- /dev/null +++ b/context/app/static/js/shared-styles/sections/SectionFooter/index.js @@ -0,0 +1,3 @@ +import SectionFooter from './SectionFooter'; + +export default SectionFooter; diff --git a/context/app/static/js/shared-styles/sections/SectionFooter/style.js b/context/app/static/js/shared-styles/sections/SectionFooter/style.js new file mode 100644 index 0000000000..2e16abae94 --- /dev/null +++ b/context/app/static/js/shared-styles/sections/SectionFooter/style.js @@ -0,0 +1,32 @@ +import styled, { css } from 'styled-components'; + +import Paper from '@material-ui/core/Paper'; +import Divider from '@material-ui/core/Divider'; + +import Typography from '@material-ui/core/Typography'; + +const StyledTypography = styled(Typography)` + display: flex; + align-items: center; +`; + +const StyledDivider = styled(Divider)` + ${({ theme: { spacing, palette } }) => css` + margin: 0 ${spacing(1)}px; + background-color: ${palette.primary.main}; + `} +`; + +const StyledPaper = styled(Paper)` + display: flex; + align-items: center; + justify-content: end; + ${({ theme: { spacing, palette } }) => css` + padding: 0 ${spacing(2)}px; + background-color: ${palette.caption.background}; + min-height: ${spacing(3)}px; + `} + border-radius: 0px 0px 4px 4px; +`; + +export { StyledDivider, StyledPaper, StyledTypography }; diff --git a/context/app/static/js/theme.jsx b/context/app/static/js/theme.jsx index 0f7cef25ed..6793283ebf 100644 --- a/context/app/static/js/theme.jsx +++ b/context/app/static/js/theme.jsx @@ -40,6 +40,10 @@ const theme = createTheme({ light: '#89a05f', dark: '#4b5f27', }, + caption: { + background: '#EEEEFF', + link: '#3781D1', + }, white: { main: '#fff', hover: 'brightness(96%)', diff --git a/end-to-end/cypress/e2e/portal/portal-ui.cy.js b/end-to-end/cypress/e2e/portal/portal-ui.cy.js index f983fcc23e..33803d4c8d 100644 --- a/end-to-end/cypress/e2e/portal/portal-ui.cy.js +++ b/end-to-end/cypress/e2e/portal/portal-ui.cy.js @@ -28,9 +28,11 @@ describe('portal-ui', () => { // Static pages are tested separately. + cy.findByTestId('user-profile-dropdown').contains('User Profile').click(); + // login - cy.contains('login'); // Don't click! We shouldn't depend on Globus in tests. + cy.findByTestId('login-link').contains('Log In') // TODO: groups_token is now required for search results, so we can pass it // back to the client to make the Elasticsearch request. I don't want to go