Skip to content

refactor(auth): refresh auth entry layout#192

Merged
quan0715 merged 3 commits into
devfrom
codex/auth-experience-refresh
Jun 25, 2026
Merged

refactor(auth): refresh auth entry layout#192
quan0715 merged 3 commits into
devfrom
codex/auth-experience-refresh

Conversation

@quan0715

Copy link
Copy Markdown
Owner

變更目標

  • 修正 auth entry 在 iPad/mobile 版型下圖片、內容區與 fixed action footer 的高度關係,避免底部內容被吃掉。
  • 將註冊頁的校園認證改成通用入口,進入 /register/campus-sso 再選學校,避免直接展開 NYCU provider。
  • 清理登入相關 i18n 舊 key,補上 login email divider 文案。
  • 將原本集中在 AuthPages.scss 的大型 SCSS 拆成 layout/forms/providers/callback,並收斂重複 mobile screen 特例。

非目標

  • 不處理 contest/backend 既有 worktree 變更。
  • 不新增大量測例或擴大重構登入流程。
  • 不處理 repo-wide 既有 naming lint debt。

影響範圍

  • frontend/src/features/auth/**
  • frontend/src/i18n/locales/*/common.json
  • 登入、註冊、校園 SSO、OAuth authorize/callback 的 auth shell 視覺與行動版捲動行為。

驗證

  • npm test -- AuthProviderOptionsScreen.test.tsx:通過,7 tests。
  • npm run check:i18n:通過。
  • bash .codex/skills/qjudge-quality-gates-owner/scripts/check-carbon-style.sh:通過。
  • npm run build:通過;仍有既有 _scrollbar.scss slash-div deprecation 與 chunk size warning。
  • mobile Playwright geometry check:通過,card bottom 與 footer top 對齊,confirm password 可捲到 footer 上方。
  • pre-push hook:ESLint / TypeScript / frontend build / Docker Compose config 通過;hook 內 E2E 依既有設定跳過。
  • node .codex/skills/qjudge-quality-gates-owner/scripts/lint-architecture.js --root frontend/src:通過。
  • node .codex/skills/qjudge-quality-gates-owner/scripts/lint-naming.js --root frontend/src:失敗於 repo-wide 既有命名違規,未指向本次新增 auth SCSS 檔。

風險與回滾

  • 主要風險在 auth shell responsive layout;已用 build、測試與 mobile geometry check 覆蓋。
  • 回滾方式:revert 此 PR,可回到原 auth layout 與 i18n 結構。

# Conflicts:
#	frontend/src/features/auth/components/layout/AuthLayout.tsx
#	frontend/src/features/auth/screens/AuthPages.scss

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f862857c15

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<AuthProviderButton
label={t("auth.login.schoolAuth", "學校認證")}
variant="sso"
onClick={() => navigate(buildAuthLink("/register/campus-sso"))}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Filter registration SSO choices to supported providers

When auth options contain multiple campus providers and only some have supports_registration: true, this new registration button sends users to /register/campus-sso, but CampusSsoScreen still renders every provider with category === "campus"; since the OAuth callback creates or links users without checking supports_registration, login-only campus providers become selectable for account creation. The registration flow needs to pass/filter the supported providers on this screen before exposing them.

Useful? React with 👍 / 👎.

@quan0715 quan0715 merged commit 8ff2df6 into dev Jun 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant