diff --git a/.github/workflows/deploy-catalog.yaml b/.github/workflows/deploy-catalog.yaml
index 94e31bfda51..fc4f8aed0fe 100644
--- a/.github/workflows/deploy-catalog.yaml
+++ b/.github/workflows/deploy-catalog.yaml
@@ -4,7 +4,6 @@ on:
push:
branches:
- master
- - selective-package-download
paths:
- '.github/workflows/deploy-catalog.yaml'
- 'catalog/**'
diff --git a/catalog/CHANGELOG.md b/catalog/CHANGELOG.md
index a834a3e8d46..5bb0bf9fd17 100644
--- a/catalog/CHANGELOG.md
+++ b/catalog/CHANGELOG.md
@@ -17,6 +17,7 @@ where verb is one of
## Changes
+- [Changed] Show stack release version in footer ([#4200](https://github.com/quiltdata/quilt/pull/4200))
- [Added] Selective package downloading ([#4173](https://github.com/quiltdata/quilt/pull/4173))
- [Added] Qurator Omni: initial public release ([#4032](https://github.com/quiltdata/quilt/pull/4032), [#4181](https://github.com/quiltdata/quilt/pull/4181))
- [Added] Admin: UI for configuring longitudinal queries (Tabulator) ([#4135](https://github.com/quiltdata/quilt/pull/4135), [#4164](https://github.com/quiltdata/quilt/pull/4164), [#4165](https://github.com/quiltdata/quilt/pull/4165))
diff --git a/catalog/app/components/Footer/Footer.js b/catalog/app/components/Footer/Footer.tsx
similarity index 84%
rename from catalog/app/components/Footer/Footer.js
rename to catalog/app/components/Footer/Footer.tsx
index 28850786fa1..d10b6299b3a 100644
--- a/catalog/app/components/Footer/Footer.js
+++ b/catalog/app/components/Footer/Footer.tsx
@@ -9,7 +9,6 @@ import * as style from 'constants/style'
import * as URLS from 'constants/urls'
import * as Notifications from 'containers/Notifications'
import * as CatalogSettings from 'utils/CatalogSettings'
-import HashLink from 'utils/HashLink'
import * as NamedRoutes from 'utils/NamedRoutes'
import copyToClipboard from 'utils/clipboard'
@@ -36,42 +35,50 @@ function Version() {
const classes = useVersionStyles()
const { push } = Notifications.use()
const handleCopy = React.useCallback(() => {
- copyToClipboard(process.env.REVISION_HASH)
+ copyToClipboard(cfg.stackVersion)
push('Web catalog container hash has been copied to clipboard')
}, [push])
return (
-
-
- Revision: {process.env.REVISION_HASH.substring(0, 8)}
-
-
+
+ Version: {cfg.stackVersion}
+
)
}
const FooterLogo = () =>
-const NavLink = (props) => (
-
+const NavLink = (props: M.LinkProps) => (
+
)
const NavSpacer = () =>
-const NavIcon = ({ icon, ...props }) => (
-
-
-
-)
+const useNavIconStyles = M.makeStyles({
+ root: {
+ display: 'block',
+ height: '18px',
+ },
+})
+
+interface NavIconProps extends M.BoxProps {
+ href: string
+ icon: string
+ target: string
+}
+
+const NavIcon = ({ icon, ...props }: NavIconProps) => {
+ const classes = useNavIconStyles()
+ return (
+
+
+
+ )
+}
const useStyles = M.makeStyles((t) => ({
root: {
@@ -80,7 +87,7 @@ const useStyles = M.makeStyles((t) => ({
'0px -12px 24px 0px rgba(25, 22, 59, 0.05)',
'0px -16px 40px 0px rgba(25, 22, 59, 0.07)',
'0px -24px 88px 0px rgba(25, 22, 59, 0.16)',
- ],
+ ].join(', '),
height: 230,
paddingTop: t.spacing(6),
position: 'relative',
@@ -114,6 +121,9 @@ const useStyles = M.makeStyles((t) => ({
`,
},
},
+ logoLink: {
+ display: 'block',
+ },
}))
export default function Footer() {
@@ -137,9 +147,9 @@ export default function Footer() {
) : (
-
+
-
+
)}
diff --git a/catalog/app/components/Footer/index.js b/catalog/app/components/Footer/index.ts
similarity index 100%
rename from catalog/app/components/Footer/index.js
rename to catalog/app/components/Footer/index.ts
diff --git a/catalog/app/components/Layout/Layout.tsx b/catalog/app/components/Layout/Layout.tsx
index f74da8f2b7d..f9c3c4d2435 100644
--- a/catalog/app/components/Layout/Layout.tsx
+++ b/catalog/app/components/Layout/Layout.tsx
@@ -53,7 +53,7 @@ export function Layout({ bare = false, dark = false, children, pre }: LayoutProp
{!!pre && pre}
{!!children && {children}}
- {!!isHomepage && isHomepage.isExact && }
+ {isHomepage?.isExact && }
{bookmarks && }
diff --git a/catalog/app/containers/Notifications/Notification.js b/catalog/app/containers/Notifications/Notification.tsx
similarity index 70%
rename from catalog/app/containers/Notifications/Notification.js
rename to catalog/app/containers/Notifications/Notification.tsx
index a8ead6821f5..d8de1f354fa 100644
--- a/catalog/app/containers/Notifications/Notification.js
+++ b/catalog/app/containers/Notifications/Notification.tsx
@@ -1,4 +1,3 @@
-import PT from 'prop-types'
import React from 'react'
import * as M from '@material-ui/core'
@@ -8,7 +7,24 @@ const useStyles = M.makeStyles((t) => ({
},
}))
-export default function Notification({ id, ttl, message, action, dismiss }) {
+interface NotificationProps {
+ id: string
+ ttl?: number | null
+ message: React.ReactNode
+ action: {
+ onClick: () => void
+ label: React.ReactNode
+ }
+ dismiss: (id: string) => void
+}
+
+export default function Notification({
+ id,
+ ttl,
+ message,
+ action,
+ dismiss,
+}: NotificationProps) {
const classes = useStyles()
const handleClose = React.useCallback(() => dismiss(id), [dismiss, id])
@@ -40,14 +56,3 @@ export default function Notification({ id, ttl, message, action, dismiss }) {
/>
)
}
-
-Notification.propTypes = {
- id: PT.string.isRequired,
- ttl: PT.oneOf([null, PT.number.isRequired]),
- message: PT.node.isRequired,
- action: PT.shape({
- label: PT.string.isRequired,
- onClick: PT.func.isRequired,
- }),
- dismiss: PT.func.isRequired,
-}
diff --git a/catalog/app/utils/Config.ts b/catalog/app/utils/Config.ts
index 977015fe6a7..ae388d62766 100644
--- a/catalog/app/utils/Config.ts
+++ b/catalog/app/utils/Config.ts
@@ -47,6 +47,7 @@ export interface ConfigJson {
qurator?: boolean
build_version?: string // not sure where this comes from
+ stackVersion: string
}
const ajv = new Ajv({ allErrors: true, removeAdditional: true })
diff --git a/catalog/app/utils/Sentry.ts b/catalog/app/utils/Sentry.ts
index 210b9659412..02b99626958 100644
--- a/catalog/app/utils/Sentry.ts
+++ b/catalog/app/utils/Sentry.ts
@@ -6,14 +6,12 @@ import * as Sentry from '@sentry/react'
import * as AuthSelectors from 'containers/Auth/selectors'
import type { Config } from 'utils/Config'
-const RELEASE = `catalog@${process.env.REVISION_HASH}`
-
export function init(cfg: Config, history?: History) {
if (!cfg.sentryDSN) return false
Sentry.init({
dsn: cfg.sentryDSN,
- release: RELEASE,
+ release: cfg.stackVersion,
environment: process.env.NODE_ENV === 'development' ? 'dev' : 'prod',
integrations: [
history
diff --git a/catalog/app/utils/tracking.js b/catalog/app/utils/tracking.js
index a99b0c70ec8..10b3da94020 100644
--- a/catalog/app/utils/tracking.js
+++ b/catalog/app/utils/tracking.js
@@ -76,7 +76,7 @@ export function TrackingProvider({ userSelector, children }) {
origin: window.location.origin,
location,
user,
- catalog_release: process.env.REVISION_HASH,
+ catalog_release: cfg.stackVersion,
}),
[location, user],
)
diff --git a/catalog/config-schema.json b/catalog/config-schema.json
index 33a9476a46f..b17071fe0ba 100644
--- a/catalog/config-schema.json
+++ b/catalog/config-schema.json
@@ -96,6 +96,10 @@
"qurator": {
"type": "boolean",
"description": "Enable Qurator AI Assistant (powered by Amazon Bedrock)"
+ },
+ "stackVersion": {
+ "type": "string",
+ "description": "Stack release version"
}
},
"required": [
@@ -109,7 +113,8 @@
"s3Proxy",
"serviceBucket",
"ssoAuth",
- "ssoProviders"
+ "ssoProviders",
+ "stackVersion"
],
"definitions": {
"Url": {
diff --git a/catalog/config.js.example b/catalog/config.js.example
index ecc830da567..95b99240161 100644
--- a/catalog/config.js.example
+++ b/catalog/config.js.example
@@ -7,4 +7,5 @@ window.QUILT_CATALOG_CONFIG = {
"passwordAuth": "ENABLED",
"ssoAuth": "SIGN_IN_ONLY",
"ssoProviders": "google",
+ "stackVersion": "local-dev"
}
diff --git a/catalog/config.json.tmpl b/catalog/config.json.tmpl
index 45bfe147d87..24f8250c5a7 100644
--- a/catalog/config.json.tmpl
+++ b/catalog/config.json.tmpl
@@ -15,5 +15,6 @@
"serviceBucket": "${SERVICE_BUCKET}",
"mode": "${CATALOG_MODE}",
"chunkedChecksums": ${CHUNKED_CHECKSUMS},
- "qurator": ${QURATOR}
+ "qurator": ${QURATOR},
+ "stackVersion": "${STACK_VERSION}"
}
diff --git a/catalog/internals/webpack/webpack.base.js b/catalog/internals/webpack/webpack.base.js
index e20cb0ede1f..4bf9c41743a 100644
--- a/catalog/internals/webpack/webpack.base.js
+++ b/catalog/internals/webpack/webpack.base.js
@@ -9,9 +9,6 @@ const CopyWebpackPlugin = require('copy-webpack-plugin')
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const webpack = require('webpack')
-const { execSync } = require('child_process')
-
-const revisionHash = execSync('git rev-parse HEAD').toString()
class RevertPathOverwriteByPerspective {
apply(compiler) {
@@ -144,7 +141,6 @@ module.exports = (options) => ({
// NODE_ENV is exposed automatically based on the "mode" option
new webpack.EnvironmentPlugin({
LOGGER_REDUX: process.env.LOGGER_REDUX || 'enabled',
- REVISION_HASH: revisionHash,
}),
new webpack.ProvidePlugin({