Repository navigation
Respect iPhone safe-area for bottom menu and surface build version from image tag - #35
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2e1d091cb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @media (max-width: 650px) { .arcade-account { top: auto; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); position: fixed; } } | ||
| @media (max-width: 520px) { .arcade-account > a:first-of-type { display:none; } .arcade-account { max-width:calc(100% - 20px); } } | ||
| @media (max-width: 480px) { .result-share-content { padding: 17px; } .result-share-actions button { flex: 1; } } | ||
| .arcade-build-version { margin: 24px auto calc(18px + env(safe-area-inset-bottom)); padding: 0 16px; color: var(--arcade-dialog-muted); font: 12px/1.4 system-ui, sans-serif; text-align: center; } |
There was a problem hiding this comment.
Reserve space for the fixed mobile account control
On screens at or below 650px, especially iPhones with a nonzero bottom safe-area inset, this footer ends only 18px above the safe area while the fixed account control extends upward from that same boundary. The account control has z-index: 1000 and is wide enough on typical phone screens to cover the centered build text when the page is scrolled to the bottom, defeating the new version display. Add mobile bottom clearance for the control's height as well as the safe-area inset.
Useful? React with 👍 / 👎.
Motivation
Description
env(safe-area-inset-bottom)andposition: fixedfor the mobile account control and add a safe-area-aware.arcade-build-versionfooter inarcade.css.arcade.jsthat fetchesGET /api/versionand displaysBuild <version>, hiding the footer on error./api/versioninserver/index.jsbacked byprocess.env.BUILD_VERSIONwith a default ofdev.BUILD_VERSIONin the image viaDockerfile(ARG,ENV, andLABEL), updatecompose.yamlto tag the image and forward the build arg, and update the GitHub Actions workflow to compute and pass aBUILD_VERSION(semantic tag when releasing orsha-...for commits).viewport-fit=coverto the page meta viewport across arcade pages so iOS exposes safe-area insets, and add a test asserting the CSS and script changes.Testing
npm test; all tests pass (38/38).npm run check(JavaScript syntax checks); it completed successfully.BUILD_VERSION=sha-test123and verifiedcurl http://127.0.0.1:<port>/api/versionreturned{"version":"sha-test123"}.docker compose configto validate Compose integration but Docker is not available in the environment, so image/compose validation could not be executed here.Codex Task