Skip to content

Commit

Permalink
Merge branch 'main' into MP-1323-cookies-tab-rework
Browse files Browse the repository at this point in the history
  • Loading branch information
argl committed Dec 5, 2024
2 parents 422428b + e11f62e commit dc5e9c7
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prod-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ jobs:

# Surveys.
REACT_APP_SURVEY_START_HOMEPAGE_FEEDBACK_2024: 1731369600000 # new Date("2024-11-12Z").getTime()
REACT_APP_SURVEY_END_HOMEPAGE_FEEDBACK_2024: 1733184000000 # new Date("2024-12-03Z").getTime()
REACT_APP_SURVEY_END_HOMEPAGE_FEEDBACK_2024: 1733616000000 # new Date("2024-12-08Z").getTime()
REACT_APP_SURVEY_RATE_FROM_HOMEPAGE_FEEDBACK_2024: 0.0
REACT_APP_SURVEY_RATE_TILL_HOMEPAGE_FEEDBACK_2024: 1 # 100%
REACT_APP_SURVEY_START_WEBDX_EDITING_2024: 1731628800000 # new Date("2024-11-15Z").getTime()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stage-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ jobs:
yarn rari content sync-translated-content
yarn rari git-history
yarn rari build --issues client/build/issues.json --templ-stats
yarn rari build --all --issues client/build/issues.json --templ-stats
# Sort DE search index by en-US popularity.
node scripts/reorder-search-index.mjs client/build/en-us/search-index.json client/build/de/search-index.json
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ jobs:
yarn rari content sync-translated-content
yarn rari git-history
yarn rari build --issues client/build/issues.json --templ-stats
yarn rari build --all --issues client/build/issues.json --templ-stats
# SSR all pages
yarn render:html
Expand Down
12 changes: 7 additions & 5 deletions client/src/playground/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,13 @@ export default function Playground() {

// We're using a random subdomain for origin isolation.
const url = new URL(
`${window.location.protocol}//${
PLAYGROUND_BASE_HOST.startsWith("localhost")
? ""
: `${subdomain.current}.`
}${PLAYGROUND_BASE_HOST}`
window.location.hostname.endsWith("localhost")
? window.location.origin
: `${window.location.protocol}//${
PLAYGROUND_BASE_HOST.startsWith("localhost")
? ""
: `${subdomain.current}.`
}${PLAYGROUND_BASE_HOST}`
);
setVConsole([]);
url.searchParams.set("state", state);
Expand Down
12 changes: 7 additions & 5 deletions client/src/playground/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,17 @@ export async function initPlayIframe(
JSON.stringify(editorContent)
);
const path = iframe.getAttribute("data-live-path");
const host = PLAYGROUND_BASE_HOST.startsWith("localhost")
? PLAYGROUND_BASE_HOST
: `${hash}.${PLAYGROUND_BASE_HOST}`;
const url = new URL(
`${path || ""}${path?.endsWith("/") ? "" : "/"}runner.html`,
window.location.origin
);
url.port = "";
url.host = host;
if (!window.location.hostname.endsWith("localhost")) {
const host = PLAYGROUND_BASE_HOST.startsWith("localhost")
? PLAYGROUND_BASE_HOST
: `${hash}.${PLAYGROUND_BASE_HOST}`;
url.port = "";
url.host = host;
}
url.search = "";
url.searchParams.set("state", state);
iframe.src = url.href;
Expand Down
2 changes: 2 additions & 0 deletions client/src/setupProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ function config(app) {
app.use(`**/*.(gif|jpeg|jpg|mp3|mp4|ogg|png|svg|webm|webp|woff2)`, proxy);
// All those root-level images like /favicon-48x48.png
app.use("/*.(png|webp|gif|jpe?g|svg)", proxy);
// Proxy play runner
app.use("/**/runner.html", proxy);
}

export default config;

0 comments on commit dc5e9c7

Please sign in to comment.