Skip to content

tailwind v2 staging: all batch-2 page migrations (step-zero + homepage/profile/settings/leaderboard/stats)#622

Merged
kokonut121 merged 6 commits into
pfeng_devfrom
tailwind-v2-staging
May 8, 2026
Merged

tailwind v2 staging: all batch-2 page migrations (step-zero + homepage/profile/settings/leaderboard/stats)#622
kokonut121 merged 6 commits into
pfeng_devfrom
tailwind-v2-staging

Conversation

@kokonut121

Copy link
Copy Markdown
Collaborator

Summary

Combines every Tailwind V2 page migration shipped so far into a single staging PR against `pfeng_dev` for full pre-production testing. After the master merges of #610 and #619 broke the live frontend, both have been reverted from `master` (commits `8ccb686` and `ee4c5de`); this PR is the consolidated replacement that lets us validate the whole batch before going to production.

Each commit is independently reviewable — see the commit list for the per-page split.

Commits in this PR

  1. step-zero prerequisites — fix the silent error-flash bug at `flashesV2.ejs:15`, port form-state preservation into `views/public/signupV2.ejs`, define `views/layouts/empty.ejs` as a real bare-shell layout, delete stale root `signupV2.ejs`/`teamV2.ejs` drafts
  2. homepage — `views/private/homepageV2.ejs` + `/homepage` route. Drops the bottom search widget (jQuery-MultiSelect + Bootstrap, deferred to search.ejs PR) and the AOS scroll animations
  3. profile — `views/private/profileV2.ejs` + `/profile/:username` route. Two-column responsive grid; rating tracker + correct/wrong pie chart with the custom `correctwrongPlugin`; collapsed three duplicated EJS blocks for tag rendering into one forEach
  4. settings — `views/private/settingsV2.ejs` + `/settings` route. Profile/Personalization/Account/Delete forms; Alpine.js for unsaved-changes alert and delete-confirm modal (replacing jQuery + Bootstrap)
  5. leaderboard — `views/private/leaderboardV2.ejs` + `/leaderboard` route. Rating leaderboard 4-col grid, Rush leaderboard, Experience leaderboard; four near-identical rating tables consolidated into one forEach
  6. stats — `views/private/statsV2.ejs` + `/stats/:username` route. 5 subject sections + performance/experience/rush block; five near-identical subject sections consolidated into one forEach

All legacy `.ejs` files left in tree (deletion is in the final cleanup pass per the migration plan in #609). All routes opted into V2 individually via the `expressLayouts` middleware (the global flip is also final-pass only).

Things to test on each page

Run the standard six-item checklist on each route below at both 1280px and 375px:

  1. Page loads without console errors
  2. No horizontal scroll on mobile, navigation collapses correctly
  3. Logged-out vs. logged-in render correctly (where applicable)
  4. Forms round-trip: submit known-good (success flash) AND known-bad (error flash) — confirm flashes render in V2 styling on both
  5. Page-specific JS works (charts render, modals open/close, dropdowns toggle, MathJax renders)
  6. View-source contains exactly one `` and one `` — catches the most likely regression mode (forgetting `expressLayouts` middleware would render a page without nav/footer or render it with both legacy and V2 chrome)

Routes to walk:

  • `/homepage` — sign in fresh, confirm it lands on V2; rating Chart.js renders with 5 subject lines; contributor and admin panels render when applicable
  • `/profile` and `/profile/:someoneElse` — both Chart.js charts render (rating tracker + correct/wrong pie with on-canvas % labels); hideProfile redirect still works
  • `/settings` — edit a field → orange "unsaved changes" alert; submit each form individually with valid + invalid data; click Delete Account → modal opens → Cancel + Delete both work (test with a throwaway account)
  • `/leaderboard` — 4 rating columns side-by-side at desktop, stacked at mobile; medal SVGs in ranks 1-3; row colors per rank; usernames link to profile
  • `/stats` (your own and another user's) — 5 subject sections each render rating + global rank + collected tags + analytics + Chart.js tracker + Change Proficiency button; performance section renders correct/wrong pie + experience bar + rush stats; global ranks fill in after ~1s
  • As a teacher viewing a private student's stats — V2 page should render

Known scope decisions to verify don't break expectations

  • Homepage no longer has the bottom search widget — search is in the nav
  • Homepage no longer has AOS scroll animations
  • Settings delete modal is Alpine, not Bootstrap
  • Leaderboard/profile/stats have collapsed duplicated EJS into forEach loops — output is identical, but visually compare against pre-migration if anything looks off

🤖 Generated with Claude Code

kokonut121 and others added 6 commits May 7, 2026 17:06
- Fix flashesV2.ejs missing comma that silently dropped error flashes
- Port form-state preservation from stale root signupV2.ejs into views/public/signupV2.ejs
- Define empty.ejs as a real bare-shell layout (DOCTYPE + Tailwind, no nav/footer)
- Remove stale root signupV2.ejs and teamV2.ejs drafts (views/public versions are canonical)

Prereq for the broader Tailwind V2 migration tracked in #609.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add views/private/homepageV2.ejs using base.ejs layout: welcome, Tailwind experience bar, contributor controls, 5-subject ratings, Chart.js rating tracker, training-mode + classic-subject + USABO grids, site stats, dailySnippetV2, announcements panel, social-link bar
- Wire /homepage route to render homepageV2.ejs with expressLayouts middleware and layout: 'layouts/base.ejs'
- Drop the bottom search widget on the homepage (jQuery-MultiSelect + Bootstrap; nav already exposes /search and the search.ejs page migrates separately)
- Drop AOS scroll animations and jQuery thumbnail hover; replaced hover with Tailwind opacity-80 hover:opacity-100

Part of the broader Tailwind V2 migration tracked in #609. Legacy homepage.ejs remains in tree until the final cleanup pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add views/private/profileV2.ejs using base.ejs layout: name banner, Tailwind experience bar, info card (name/age/location/bio/achievements), Chart.js rating tracker + correct/wrong pie with custom plugin, Problem Rush highscore, Collected Tags grid (Physics/Chemistry/Biology)
- Wire /profile/:username route to render profileV2.ejs with expressLayouts
- Consolidate three duplicated EJS blocks for collected-tags rendering into a single forEach over subjects (no behavior change)

Part of the broader Tailwind V2 migration tracked in #609. Legacy profile.ejs remains in tree until the final cleanup pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add views/private/settingsV2.ejs using base.ejs layout: profile/personalization/account/delete-account forms with Tailwind grid layouts and native input styling
- Replace jQuery unsaved-changes detector with Alpine.js (already loaded by V2 head); replace Bootstrap delete-confirmation modal with an Alpine-driven custom modal
- Replace Bootstrap form-group/form-control classes with V2 input styling and grid; preserve all field names/IDs/POST endpoints
- Wire /settings route to render settingsV2.ejs with expressLayouts

Part of the broader Tailwind V2 migration tracked in #609. Legacy settings.ejs remains in tree until the final cleanup pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add views/private/leaderboardV2.ejs using base.ejs layout: rating leaderboard 4-col grid (Physics/Chemistry/Biology/USABO), Rush leaderboard, Experience leaderboard
- Consolidate the four near-identical rating tables into a single forEach over [title, list, valueGetter] tuples; preserves row colors (1st/2nd/3rd/4th+) and medal SVGs
- Wire /leaderboard route to render leaderboardV2.ejs with expressLayouts

Part of the broader Tailwind V2 migration tracked in #609.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add views/private/statsV2.ejs using base.ejs layout: 5 subject sections (Physics/Chemistry/Biology/ESS/USABO) each with rating+global rank, collected tags, analytics tags (Areas of Mastery / Currently Studying / Recommended Training / Favorite Units), Chart.js rating tracker, and a Change Proficiency button; plus a Performance section with Chart.js correct/wrong pie, site experience bar, and Problem Rush stats
- Consolidate 5 near-identical subject sections into a single forEach over a config table; preserves all rating/analytics keys and proficiency URL casing (note: USABO uses uppercase "USABO" in /train/USABO/proficiency)
- Wire /stats/:username route (both teacher and self branches) to render statsV2.ejs with expressLayouts

Part of the broader Tailwind V2 migration tracked in #609. Largest page in batch 2 per the migration plan.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@kokonut121 kokonut121 requested a review from a team as a code owner May 8, 2026 00:06
@kokonut121 kokonut121 merged commit ae308df into pfeng_dev May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant