-
Couldn't load subscription status.
- Fork 0
[Feature] [Firstdate] register / login page #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds the Firstdate registration and login flows, server-side health endpoint, global font imports, new layout components, and performance-testing UI on the home page.
- Import IBM Plex Sans Thai and Zen Dots fonts in global CSS
- Enhance
index.astrowith backend health check, 8K image load timing, and performance info panel - Scaffold
/firstdatepages with staff/user register & login forms and updated layouts
Reviewed Changes
Copilot reviewed 41 out of 65 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/styles/global.css | Added custom font imports & body font-family |
| src/pages/index.astro | Integrated API health check & 8K backdrop + performance UI |
| src/pages/api/health.ts | New /api/health route for status & responseTime |
| src/pages/firstdate/** | Created register/login pages for staff & users |
| src/layouts/MainLayout.astro | Switched to English <html lang>, added Header & Footer |
| src/components/common/Navbar.astro | Mobile menu always hidden due to incorrect classes |
| src/components/firstdate/Footer.astro | Stray closing </a> before Website link |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (3)
src/layouts/firstdate/WithoutNavbar.astro:3
- The
Navbarimport isn’t used in this layout; consider removing it to reduce clutter.
import Navbar from "@firstdate/Navbar.astro";
src/pages/index.astro:156
- The newly created
apiLoadTimeElementis never appended or used; you can remove this unused variable.
const apiLoadTimeElement = document.createElement('span');
src/components/firstdate/Footer.astro:48
- There’s a stray closing
</a>tag before the Website link; remove the extra tag to fix the HTML structure.
</a>
| <main class="flex-grow"> | ||
| <slot /> | ||
| </main> | ||
| <Footer varient="firstdate"/> |
Copilot
AI
Jul 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The prop varient appears to be a misspelling of variant; renaming it will improve clarity.
| <Footer varient="firstdate"/> | |
| <Footer variant="firstdate"/> |
src/pages/index.astro
Outdated
| fetch('https://dev.freshmenfest2025.com/api/health') | ||
| .then(() => { | ||
| const apiPerfEntries = performance.getEntriesByName('https://dev.freshmenfest2025.com/api/health'); |
Copilot
AI
Jul 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoding the full dev URL makes this feature environment-specific; consider using a relative path (/api/health) or location.origin for flexibility.
| fetch('https://dev.freshmenfest2025.com/api/health') | |
| .then(() => { | |
| const apiPerfEntries = performance.getEntriesByName('https://dev.freshmenfest2025.com/api/health'); | |
| const apiHealthUrl = `${location.origin}/api/health`; | |
| fetch(apiHealthUrl) | |
| .then(() => { | |
| const apiPerfEntries = performance.getEntriesByName(apiHealthUrl); |
src/pages/firstdate/home/index.astro
Outdated
| <div class="flex w-full justify-center"> | ||
| <div class="flex flex-col w-4/5 gap-y-2 my-3"> | ||
| <DummyButton href="/firstdate/home/"> | ||
| <img src="/firstdate/home/qrcode.svg"> QR CODE |
Copilot
AI
Jul 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This <img> tag lacks an alt attribute; please add meaningful alt text (e.g. alt="QR Code for CU First Date").
| <img src="/firstdate/home/qrcode.svg"> QR CODE | |
| <img src="/firstdate/home/qrcode.svg" alt="QR Code for CU First Date"> QR CODE |
|
|
||
| <div class="text-center"> | ||
| <a | ||
| href="/register" |
Copilot
AI
Jul 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link points to /register, but the registration page is at /firstdate/register; update the href to match the actual route.
| href="/register" | |
| href="/firstdate/register" |
| <label htmlFor="">อาหารที่แพ้</label> | ||
| <div className="flex gap-2 justify-between w-full px-12"> | ||
| <div className="flex items-center gap-2"> | ||
| <input | ||
| type="checkbox" | ||
| className="w-4 h-4" | ||
| checked={healthInfo.hasAllergies === true} | ||
| onChange={() => handleAllergiesChange(true)} | ||
| /> | ||
| <label htmlFor="">มี</label> | ||
| </div> | ||
| <div className="flex items-center gap-2"> | ||
| <input | ||
| type="checkbox" | ||
| className="w-4 h-4" | ||
| checked={healthInfo.hasAllergies === false} | ||
| onChange={() => handleAllergiesChange(false)} | ||
| /> | ||
| <label htmlFor="">ไม่มี</label> | ||
| </div> | ||
| </div> |
Copilot
AI
Jul 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Labels use an empty htmlFor and inputs lack id attributes, which hinders screen-reader association; assign matching id/htmlFor values.
| <label htmlFor="">อาหารที่แพ้</label> | |
| <div className="flex gap-2 justify-between w-full px-12"> | |
| <div className="flex items-center gap-2"> | |
| <input | |
| type="checkbox" | |
| className="w-4 h-4" | |
| checked={healthInfo.hasAllergies === true} | |
| onChange={() => handleAllergiesChange(true)} | |
| /> | |
| <label htmlFor="">มี</label> | |
| </div> | |
| <div className="flex items-center gap-2"> | |
| <input | |
| type="checkbox" | |
| className="w-4 h-4" | |
| checked={healthInfo.hasAllergies === false} | |
| onChange={() => handleAllergiesChange(false)} | |
| /> | |
| <label htmlFor="">ไม่มี</label> | |
| </div> | |
| </div> | |
| <label htmlFor="allergies">อาหารที่แพ้</label> | |
| <div className="flex gap-2 justify-between w-full px-12"> | |
| <div className="flex items-center gap-2"> | |
| <input | |
| type="checkbox" | |
| className="w-4 h-4" | |
| id="allergies-yes" | |
| checked={healthInfo.hasAllergies === true} | |
| onChange={() => handleAllergiesChange(true)} | |
| /> | |
| <label htmlFor="allergies-yes">มี</label> | |
| </div> | |
| <div className="flex items-center gap-2"> | |
| <input | |
| type="checkbox" | |
| className="w-4 h-4" | |
| id="allergies-no" | |
| checked={healthInfo.hasAllergies === false} | |
| onChange={() => handleAllergiesChange(false)} | |
| /> | |
| <label htmlFor="allergies-no">ไม่มี</label> | |
| </div> |
| setValue: UseFormSetValue<LoginFormData>; | ||
| onSubmit: (e?: React.BaseSyntheticEvent) => Promise<void>; | ||
| onBack?: () => void; | ||
| userType: "student" | "staff"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| userType: "student" | "staff"; | |
| userType: "FRESHMAN" | "STAFF"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MasterIceZ done kub
No description provided.