feat(web): beforeLoad中の白画面対策としてローディング表示を追加#235
Merged
Conversation
TanStack Router の pendingComponent を使い、セッション確認 API 呼び出し中に スピナーを表示して白画面を防ぐ。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
role="status" / aria-live="polite" と sr-only テキストを付与し、 スクリーンリーダーにローディング状態が伝わるようにする。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
🚀 プレビュー環境がデプロイされました! URL: https://tascal-pr-235-197260822086.asia-northeast1.run.app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #221
目的
TanStack Router の
beforeLoadでセッション確認 API を呼び出している間、画面が真っ白になる問題を解消する。Cloud Run のコールドスタート時など
authClient.getSession()に数秒かかるケースで、白画面の代わりにスピナーを表示する。変更内容
apps/web/src/components/LoadingScreen.tsx— スピナーを表示する共通ローディングコンポーネントを追加(アクセシビリティ属性role="status"/aria-live="polite"/sr-onlyテキスト付き)apps/web/src/routes/login.tsx—pendingComponent: LoadingScreenを設定apps/web/src/routes/signup.tsx—pendingComponent: LoadingScreenを設定apps/web/src/routes/app.tsx—pendingComponent: LoadingScreenを設定ローカル検証手順
pnpm devで開発サーバーを起動/login//signup//appにアクセスし、セッション確認中にスピナーが表示されることを確認