Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into k8s-build-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jtrouth committed Mar 4, 2024
2 parents ec09046 + a2b7ec6 commit ab32917
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 21 deletions.
1 change: 0 additions & 1 deletion .env.local.sample
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ NEXT_PUBLIC_DEBUG_LOGGING=
NEXT_PUBLIC_RELEASE_URL=
NEXT_PUBLIC_EFD_URL=
NEXT_PUBLIC_HASURA_SECRET=
NEXT_PUBLIC_SURVEY_SPARROW=
1 change: 0 additions & 1 deletion .github/workflows/dev-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/dev-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/master-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/master-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/prod-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,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

ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
ENV EDC_LOGGER_API_URL=$EDC_LOGGER_API_URL
Expand Down
4 changes: 2 additions & 2 deletions components/modal/RegisterModal/JoinForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ export default function JoinForm({ onEmailSignup }) {
<SSOButton service="google" type="button" onClick={goToGoogleSignIn}>
{t("join.continue_with_google")}
</SSOButton>
<SSOButton
{/* <SSOButton
service="facebook"
type="button"
onClick={goToFacebookSignIn}
>
{t("join.continue_with_facebook")}
</SSOButton>
</SSOButton> */}
<SSOButton service="email" type="button" onClick={onEmailSignup}>
{t("join.sign_up_with_email")}
</SSOButton>
Expand Down
4 changes: 2 additions & 2 deletions components/modal/SignInModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ export default function SignInModal() {
<SSOButton service="google" onClick={goToGoogleSignIn}>
{t("sign_in.continue_with_google")}
</SSOButton>
<SSOButton service="facebook" onClick={goToFacebookSignIn}>
{/* <SSOButton service="facebook" onClick={goToFacebookSignIn}>
{t("sign_in.continue_with_facebook")}
</SSOButton>
</SSOButton> */}
</Styled.SSOButtons>
<Styled.Form onSubmit={handleSubmit(onSubmit)}>
<AuthModal.Description>
Expand Down
8 changes: 7 additions & 1 deletion hooks/useAuthentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,15 @@ export default function useAuthentication(data) {
push(ssoModalUrl, undefined, {
shallow: true,
});
// eslint-disable-next-line no-console
console.log("onSuccess", response, "onSuccess");
authenticateWithGoogle({ idToken: response.tokenId });
},
onFailure: (error) => console.error(error),
onFailure: (error) => {
// eslint-disable-next-line no-console
console.log("onFailure", error, "onFailure");
console.error(error);
},
});

useEffect(() => {
Expand Down
3 changes: 3 additions & 0 deletions lib/api/fragments/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ cantoAssetSingle {
CaptionES
Credit
}
fileInfo: metadata {
fileType: FileTypeExtension
}
}`;
17 changes: 14 additions & 3 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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),
Expand Down
6 changes: 3 additions & 3 deletions pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -33,7 +33,7 @@ function Client({ Component, pageProps }) {
strategy="afterInteractive"
/>
)}
{SURVEY_SPARROW && (
{/* {SURVEY_SPARROW && (
<>
<div id="ss_survey_widget"></div>
<Script
Expand Down Expand Up @@ -92,7 +92,7 @@ function Client({ Component, pageProps }) {
}}
/>
</>
)}
)} */}
<GlobalStyles />
<Component {...pageProps} />
</AuthenticationContextProvider>
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ab32917

Please sign in to comment.