From 6812c170fef7ed054a87c6ba395b31e98e9322e0 Mon Sep 17 00:00:00 2001 From: Alexandra Goff Date: Fri, 22 Dec 2023 11:18:03 -0700 Subject: [PATCH 1/5] [C] use original URL for GIF --- lib/api/fragments/image.js | 3 +++ lib/utils.js | 17 ++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/api/fragments/image.js b/lib/api/fragments/image.js index 0ae71545..f499d98d 100644 --- a/lib/api/fragments/image.js +++ b/lib/api/fragments/image.js @@ -38,4 +38,7 @@ cantoAssetSingle { CaptionES Credit } + fileInfo: metadata { + fileType: FileTypeExtension + } }`; diff --git a/lib/utils.js b/lib/utils.js index f19f8bd1..a488ad24 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -418,7 +418,13 @@ export const imageShaper = (site, data, className) => { const key = localeKeys[site]; - const { metadata, url, width, height } = data; + const { + metadata, + url, + width, + height, + fileInfo: { fileType }, + } = data; const { directUrlPreview = "", directUrlOriginal = "", preview = "" } = url; const urlWithoutConstraint = directUrlPreview.slice(0, -3); @@ -427,10 +433,15 @@ export const imageShaper = (site, data, className) => { const altText = metadata[`AltText${key}`]; const caption = metadata[`Caption${key}`]; const credit = metadata.Credit; + const useOriginal = fileType === "gif"; return { - url: `${urlWithoutConstraint}${Math.floor(constraint / 3)}`, - url2x: `${urlWithoutConstraint}${Math.floor(constraint / 2)}`, + url: useOriginal + ? directUrlOriginal + : `${urlWithoutConstraint}${Math.floor(constraint / 3)}`, + url2x: useOriginal + ? directUrlOriginal + : `${urlWithoutConstraint}${Math.floor(constraint / 2)}`, url3x: directUrlOriginal, thumb: preview, width: Number(width), From e2e547139c3cadc1f2e949074758297ff56aea93 Mon Sep 17 00:00:00 2001 From: Blake Mason Date: Wed, 17 Jan 2024 15:40:14 -0800 Subject: [PATCH 2/5] [C] Update caniuse-lite --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6553cf5d..af19b73a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4325,9 +4325,9 @@ camelize@^1.0.0: integrity sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ== caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001406, caniuse-lite@^1.0.30001449, caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.30001503: - version "1.0.30001508" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001508.tgz" - integrity sha512-sdQZOJdmt3GJs1UMNpCCCyeuS2IEGLXnHyAo9yIO5JJDjbjoVRij4M1qep6P6gFpptD1PqIYgzM+gwJbOi92mw== + version "1.0.30001578" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001578.tgz" + integrity sha512-J/jkFgsQ3NEl4w2lCoM9ZPxrD+FoBNJ7uJUpGVjIg/j0OwJosWM36EPDv+Yyi0V4twBk9pPmlFS+PLykgEvUmg== case-sensitive-paths-webpack-plugin@^2.4.0: version "2.4.0" From 84626e3da3ea87165d7525249d8b4156f0e4ae4f Mon Sep 17 00:00:00 2001 From: Blake Mason Date: Mon, 5 Feb 2024 10:07:56 -0800 Subject: [PATCH 3/5] [C] Removes Rockman's pop up survey --- .env.local.sample | 1 - .github/workflows/dev-pull-request.yaml | 1 - .github/workflows/dev-push.yaml | 1 - .github/workflows/master-pr.yaml | 1 - .github/workflows/master-push.yaml | 1 - .github/workflows/prod-push.yaml | 1 - Dockerfile | 1 - pages/_app.js | 6 +++--- 8 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.env.local.sample b/.env.local.sample index 99c5675c..2daa9b84 100644 --- a/.env.local.sample +++ b/.env.local.sample @@ -13,4 +13,3 @@ NEXT_PUBLIC_DEBUG_LOGGING= NEXT_PUBLIC_RELEASE_URL= NEXT_PUBLIC_EFD_URL= NEXT_PUBLIC_HASURA_SECRET= -NEXT_PUBLIC_SURVEY_SPARROW= diff --git a/.github/workflows/dev-pull-request.yaml b/.github/workflows/dev-pull-request.yaml index f1c5c923..7388bdd0 100644 --- a/.github/workflows/dev-pull-request.yaml +++ b/.github/workflows/dev-pull-request.yaml @@ -45,7 +45,6 @@ jobs: --build-arg NEXT_PUBLIC_EFD_URL=https://hasura-e3g4rcii3q-uc.a.run.app/v1/graphql \ --build-arg NEXT_PUBLIC_HASURA_SECRET=_qfq_tMbyR4brJ@KHCzuJRU7 \ --build-arg NEXT_PUBLIC_RELEASE_URL=`https://noirlab.edu/public/api/v2/releases/{{ID}}/?lang={{SITE}}&translation_mode=fallback` \ - --build-arg NEXT_PUBLIC_SURVEY_SPARROW=true \ . - name: Configure Docker Auth diff --git a/.github/workflows/dev-push.yaml b/.github/workflows/dev-push.yaml index ea07650a..dca62ef0 100644 --- a/.github/workflows/dev-push.yaml +++ b/.github/workflows/dev-push.yaml @@ -39,7 +39,6 @@ jobs: --build-arg NEXT_PUBLIC_EFD_URL=https://hasura-e3g4rcii3q-uc.a.run.app/v1/graphql \ --build-arg NEXT_PUBLIC_HASURA_SECRET=_qfq_tMbyR4brJ@KHCzuJRU7 \ --build-arg NEXT_PUBLIC_RELEASE_URL=`https://noirlab.edu/public/api/v2/releases/{{ID}}/?lang={{SITE}}&translation_mode=fallback` \ - --build-arg NEXT_PUBLIC_SURVEY_SPARROW=true \ . - name: Configure Docker Auth diff --git a/.github/workflows/master-pr.yaml b/.github/workflows/master-pr.yaml index 28754090..dc3777cb 100644 --- a/.github/workflows/master-pr.yaml +++ b/.github/workflows/master-pr.yaml @@ -45,7 +45,6 @@ jobs: --build-arg NEXT_PUBLIC_EFD_URL=https://hasura-e3g4rcii3q-uc.a.run.app/v1/graphql \ --build-arg NEXT_PUBLIC_HASURA_SECRET=_qfq_tMbyR4brJ@KHCzuJRU7 \ --build-arg NEXT_PUBLIC_RELEASE_URL=`https://noirlab.edu/public/api/v2/releases/{{ID}}/?lang={{SITE}}&translation_mode=fallback` \ - --build-arg NEXT_PUBLIC_SURVEY_SPARROW=true \ . - name: Configure Docker Auth diff --git a/.github/workflows/master-push.yaml b/.github/workflows/master-push.yaml index c847e266..f9839403 100644 --- a/.github/workflows/master-push.yaml +++ b/.github/workflows/master-push.yaml @@ -39,7 +39,6 @@ jobs: --build-arg NEXT_PUBLIC_EFD_URL=https://hasura-e3g4rcii3q-uc.a.run.app/v1/graphql \ --build-arg NEXT_PUBLIC_HASURA_SECRET=_qfq_tMbyR4brJ@KHCzuJRU7 \ --build-arg NEXT_PUBLIC_RELEASE_URL=`https://noirlab.edu/public/api/v2/releases/{{ID}}/?lang={{SITE}}&translation_mode=fallback` \ - --build-arg NEXT_PUBLIC_SURVEY_SPARROW=true \ . - name: Configure Docker Auth diff --git a/.github/workflows/prod-push.yaml b/.github/workflows/prod-push.yaml index 9c79cc69..f1eaa181 100644 --- a/.github/workflows/prod-push.yaml +++ b/.github/workflows/prod-push.yaml @@ -45,7 +45,6 @@ jobs: --build-arg NEXT_PUBLIC_EFD_URL=https://hasura-e3g4rcii3q-uc.a.run.app/v1/graphql \ --build-arg NEXT_PUBLIC_HASURA_SECRET=_qfq_tMbyR4brJ@KHCzuJRU7 \ --build-arg NEXT_PUBLIC_RELEASE_URL=`https://noirlab.edu/public/api/v2/releases/{{ID}}/?lang={{SITE}}&translation_mode=fallback` \ - --build-arg NEXT_PUBLIC_SURVEY_SPARROW=true \ . - name: Configure Docker Auth run: gcloud --quiet auth configure-docker diff --git a/Dockerfile b/Dockerfile index 8497f48e..aabfb314 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,6 @@ ARG CLOUD_ENV=PROD ARG NEXT_PUBLIC_EFD_URL=https://hasura-e3g4rcii3q-uc.a.run.app/v1/graphql ARG NEXT_PUBLIC_HASURA_SECRET=_qfq_tMbyR4brJ@KHCzuJRU7 ARG NEXT_PUBLIC_RELEASE_URL=`https://noirlab.edu/public/api/v2/releases/{{ID}}/?lang={{SITE}}&translation_mode=fallback` -ARG NEXT_PUBLIC_SURVEY_SPARROW=true RUN npx browserslist@latest --update-db && yarn static:build diff --git a/pages/_app.js b/pages/_app.js index 9c35e57e..f563171c 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -11,7 +11,7 @@ import GlobalStyles from "@/styles/globalStyles"; import styles from "@/styles/styles.scss"; const PLAUSIBLE_DOMAIN = process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN; -const SURVEY_SPARROW = process.env.NEXT_PUBLIC_SURVEY_SPARROW; +// const SURVEY_SPARROW = process.env.NEXT_PUBLIC_SURVEY_SPARROW; function Client({ Component, pageProps }) { const lang = pageProps?.data?.language || "en-US"; @@ -33,7 +33,7 @@ function Client({ Component, pageProps }) { strategy="afterInteractive" /> )} - {SURVEY_SPARROW && ( + {/* {SURVEY_SPARROW && ( <>