Skip to content

feat: Get Template Ready for Showcase#197

Merged
kiyarose merged 9 commits intomainfrom
kr/expage
Mar 26, 2026
Merged

feat: Get Template Ready for Showcase#197
kiyarose merged 9 commits intomainfrom
kr/expage

Conversation

@kiyarose
Copy link
Copy Markdown
Member

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

  • Added useAnimatedScroll custom hook for smooth, animated scrolling with fade and scale effects, respecting user reduced-motion preferences (src/hooks/useAnimatedScroll.ts)
  • Added useBodyScrollLock custom hook to lock and unlock body scroll, handling scrollbar compensation to avoid layout shift (src/hooks/useBodyScrollLock.ts)

Internationalization

  • Added full translation files for Catalan (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

  • Added GitHub Actions workflow for automated deployment to GitHub Pages (.github/workflows/github-pages.yml)

Dependency Updates

  • Updated eslint-plugin-react-hooks to a newer canary version in package.json

UI and Localization Improvements

  • Made small improvements to the skills section header, including icon addition and translation usage (src/sections/SkillsSection.tsx) [1] [2]
  • Fixed environment variable fallback logic for Turnstile site key (src/sections/ContactSection.tsx)

@kiyarose kiyarose requested a review from Copilot March 26, 2026 11:01
@kiyarose kiyarose self-assigned this Mar 26, 2026
@kiyarose kiyarose added bug Something isn't working enhancement New feature or request javascript Pull requests that update javascript code labels Mar 26, 2026
@github-actions github-actions bot added the help wanted Extra attention is needed label Mar 26, 2026
@kiyarose kiyarose merged commit 0a7ac4e into main Mar 26, 2026
14 checks passed
@kiyarose kiyarose deleted the kr/expage branch March 26, 2026 11:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
run: npm clean-install --progress=false
run: npm ci --progress=false

Copilot uses AI. Check for mistakes.
Comment on lines +33 to +39
- name: Build
run: npm run build:pages

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
"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",
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
"eslint-plugin-react-hooks": "7.1.0-canary-ab18f33d-20260220",
"eslint-plugin-react-hooks": "^7.1.0",

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +34
// For reduced motion, use instant browser scroll
if (prefersReducedMotion) {
element.scrollIntoView({ behavior: "auto", block: "start" });
return;
}
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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").

Copilot uses AI. Check for mistakes.
Comment on lines +58 to +61
// 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
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +104 to +107
// Trigger reflow to ensure style changes are applied
// eslint-disable-next-line @typescript-eslint/no-unused-expressions

requestAnimationFrame(() => {
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request help wanted Extra attention is needed javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task: Update Project to be ready for pages template presentation

3 participants