Conversation
This workflow automates the deployment of the project to GitHub Pages upon pushes to the main branch and allows manual triggering.
Removed linting step from GitHub Pages workflow.
…lint v10 Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com> Agent-Logs-Url: https://github.com/SillyLittleTech/Portf/sessions/bc4f5bcf-33f8-4a17-bbd2-193ee9558f11
Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com> Agent-Logs-Url: https://github.com/SillyLittleTech/Portf/sessions/4acb4738-f16f-4bd0-9da7-00c279623451
… SkillsSection Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com> Agent-Logs-Url: https://github.com/SillyLittleTech/Portf/sessions/4acb4738-f16f-4bd0-9da7-00c279623451
There was a problem hiding this comment.
Pull request overview
Prepares the Vite + React + TypeScript template for a public “showcase” release by improving navigation/UX behaviour, expanding i18n coverage, and adding GitHub Pages deployment automation.
Changes:
- Added two UI hooks: animated scrolling (
useAnimatedScroll) and body scroll locking (useBodyScrollLock). - Added new translation bundles for ca/fr/ja/nl/ru and wired Skills header text to translations.
- Added a GitHub Actions workflow to deploy the built site to GitHub Pages; updated an eslint devDependency.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/hooks/useAnimatedScroll.ts |
Introduces animated “fade then jump” scrolling utilities and reduced-motion handling. |
src/hooks/useBodyScrollLock.ts |
Adds a hook to lock body scroll with scrollbar compensation for the mobile menu. |
src/sections/SkillsSection.tsx |
Localizes the Skills section header and adds an icon. |
src/sections/ContactSection.tsx |
Improves Turnstile site key env var fallback/normalization. |
src/translations/ca.json |
Adds Catalan translations. |
src/translations/fr.json |
Adds French translations. |
src/translations/ja.json |
Adds Japanese translations. |
src/translations/nl.json |
Adds Dutch translations. |
src/translations/ru.json |
Adds Russian translations. |
.github/workflows/github-pages.yml |
Adds automated deployment pipeline for GitHub Pages. |
package.json |
Pins eslint-plugin-react-hooks to a canary build. |
package-lock.json |
Locks the updated eslint plugin version and peer dependency range. |
| cache: npm | ||
|
|
||
| - name: Install dependencies | ||
| run: npm clean-install --progress=false |
There was a problem hiding this comment.
npm clean-install is inconsistent with the repo’s other workflows (which use npm ci) and may not be available on all npm versions. Using npm ci here will be more standard and ensures installs are reproducible from package-lock.json.
| run: npm clean-install --progress=false | |
| run: npm ci --progress=false |
| - name: Build | ||
| run: npm run build:pages | ||
|
|
||
| - name: Upload Pages artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: dist |
There was a problem hiding this comment.
This workflow builds with npm run build:pages, but the Vite config/scripts don’t appear to set a GitHub Pages base path. For project Pages (served under /<repo>/), this can break asset URLs at runtime. Consider setting base for Pages builds (e.g., via a dedicated build script/env var and conditional base in vite.config.ts).
| "autoprefixer": "^10.4.27", | ||
| "eslint": "^10.1.0", | ||
| "eslint-plugin-react-hooks": "^7.0.1", | ||
| "eslint-plugin-react-hooks": "7.1.0-canary-ab18f33d-20260220", |
There was a problem hiding this comment.
eslint-plugin-react-hooks is pinned to a canary build. If this is only to satisfy the ESLint v10 peer dependency, consider switching to the latest stable release that supports ESLint 10 (if available) to reduce supply-chain and reproducibility risk (canary builds are more likely to be yanked/changed). If the canary is required, it’d help to document the reason in the repo (e.g., in package.json or CONTRIBUTING).
| "eslint-plugin-react-hooks": "7.1.0-canary-ab18f33d-20260220", | |
| "eslint-plugin-react-hooks": "^7.1.0", |
| // For reduced motion, use instant browser scroll | ||
| if (prefersReducedMotion) { | ||
| element.scrollIntoView({ behavior: "auto", block: "start" }); | ||
| return; | ||
| } |
There was a problem hiding this comment.
In the reduced-motion path, offset is ignored because this branch uses scrollIntoView(). That makes useAnimatedScroll({ offset: -80 }) behave differently for users with prefers-reduced-motion (e.g., sticky headers can cover the target). Consider computing the target scroll position and applying the offset even when reduced motion is enabled (still using behavior: "auto").
| // Trigger reflow to ensure style changes are applied | ||
| // eslint-disable-next-line @typescript-eslint/no-unused-expressions | ||
|
|
||
| // Phase 3: Fade in the target content with scale effect |
There was a problem hiding this comment.
The “Trigger reflow” section is currently a no-op: there’s an eslint-disable-next-line @typescript-eslint/no-unused-expressions comment but no expression on the next line. Either add an actual reflow read (as intended) or remove the disable/comment; leaving it blank makes the code misleading and may reduce animation reliability.
| // Trigger reflow to ensure style changes are applied | ||
| // eslint-disable-next-line @typescript-eslint/no-unused-expressions | ||
|
|
||
| requestAnimationFrame(() => { |
There was a problem hiding this comment.
Same as above: the “Trigger reflow” block has an eslint-disable-next-line but no subsequent expression. Add the intended reflow read or remove the unused disable/comment to avoid a misleading no-op.
Fixes #194
This pull request introduces several new features and improvements, including two new custom React hooks for scroll animation and body scroll locking, adds extensive new language support with translations for Catalan, French, Japanese, Dutch, and Russian, and sets up automated deployment to GitHub Pages. It also includes a minor dependency update and some small UI/localization improvements.
New Features
useAnimatedScrollcustom hook for smooth, animated scrolling with fade and scale effects, respecting user reduced-motion preferences (src/hooks/useAnimatedScroll.ts)useBodyScrollLockcustom hook to lock and unlock body scroll, handling scrollbar compensation to avoid layout shift (src/hooks/useBodyScrollLock.ts)Internationalization
src/translations/ca.json), French (src/translations/fr.json), Japanese (src/translations/ja.json), Dutch (src/translations/nl.json), and Russian (src/translations/ru.json) [1] [2] [3] [4] [5]Deployment Automation
.github/workflows/github-pages.yml)Dependency Updates
eslint-plugin-react-hooksto a newer canary version inpackage.jsonUI and Localization Improvements
src/sections/SkillsSection.tsx) [1] [2]src/sections/ContactSection.tsx)