Skip to content

feat(web): add smooth theme transition animation#536

Merged
ShantKhatri merged 3 commits into
Dev-Card:mainfrom
Jai-Shankar1033:feat/smooth-theme-transition
Jun 13, 2026
Merged

feat(web): add smooth theme transition animation#536
ShantKhatri merged 3 commits into
Dev-Card:mainfrom
Jai-Shankar1033:feat/smooth-theme-transition

Conversation

@Jai-Shankar1033

Copy link
Copy Markdown
Contributor

Summary

The theme toggle was switching instantly which felt jarring compared to the rest of the UI. This PR adds smooth transitions so backgrounds, text, borders and shadows all fade gracefully when switching themes. Also polished up the toggle icon so it animates out and back in instead of just swapping abruptly.

Closes #321


Type of Change

  • Bug fix
  • New feature
  • Refactor (no functional change)
  • UI / Design change
  • Tests only
  • Documentation
  • Infrastructure / DevOps
  • Security

What Changed

  • Added a scoped transition rule that only fires during theme switches, so hover/focus animations stay snappy
  • Toggle icon now fades out with a rotation, swaps, then fades back in
  • Added a subtle glow pulse and press effect on the toggle button click
  • Fixed prefers-reduced-motion so users who prefer no animations get instant switches

How to Test

  1. Run pnpm dev inside apps/web
  2. Open http://localhost:5173
  3. Click the theme toggle and check the smooth fade
  4. Try clicking rapidly — should never get stuck

Checklist

  • My code follows the project's coding style (pnpm -r run lint passes).
  • TypeScript compiles without errors (pnpm -r run typecheck).
  • I have added or updated tests for the changes I made.
  • All tests pass locally (pnpm -r run test).
  • I have updated documentation where necessary.
  • No new console.log or debug statements left in the code.
  • Breaking changes are documented in this PR description.

Screenshots / Recordings

ezgif-432dd6536160fc35

Additional Context

Checked performance after the changes — no regression:
LCP 0.12s, CLS 0.01, INP 24ms all in the good range.

@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

@Jai-Shankar1033 is attempting to deploy a commit to the Prashantkumar Khatri's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the web label Jun 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi @Jai-Shankar1033,

Thanks for opening this pull request.

This PR has been automatically classified based on the files modified.

Applied Labels

  • web

Primary Review Area

  • web

Reviewer

@ShantKhatri has been identified as the primary reviewer for this pull request.

If you have any questions regarding the affected area or implementation details, feel free to reach out to the assigned reviewer.

Thank you for your contribution!

@github-actions

Copy link
Copy Markdown
Contributor

CI — Checks Failed

Backend — SKIP

Check Result
Lint -
Test -
Typecheck -

Mobile — SKIP

Check Result
Lint -
Test -

Web — FAIL

Check Result
Check FAIL
Build PASS

Last updated: Thu, 11 Jun 2026 11:37:33 GMT

@Jai-Shankar1033

Copy link
Copy Markdown
Contributor Author

Hey @ShantKhatri, just a heads up — the web-ci lint errors showing up are pre-existing in the codebase and weren't introduced by this PR. I checked the changes and all 4 modified files are clean. Let me know if you have any feedback on the implementation!

@Harxhit Harxhit added the gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. label Jun 11, 2026
@ShantKhatri ShantKhatri merged commit 1b8179d into Dev-Card:main Jun 13, 2026
6 of 8 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Congratulations @Jai-Shankar1033 on getting PR #536 merged!

Thank you for your contribution to the project.

To receive the appropriate GSSoC labels and recognition, please mention @Harxhit in the #get-labels channel on our Discord server and share your merged PR link.

Harxhit pushed a commit to Harxhit/DevCard that referenced this pull request Jun 21, 2026
* fix: improve feature card readability and contrast (Dev-Card#319)

* feat(web): add smooth theme transition animation
ShantKhatri pushed a commit to ShantKhatri/DevCard that referenced this pull request Jun 23, 2026
* fix: improve feature card readability and contrast (Dev-Card#319)

* feat(web): add smooth theme transition animation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Smooth Theme Transition Animation

3 participants