🎨 Palette: アップロードボタンの非同期処理に一貫したローディングスピナーを適用#877
Conversation
Release: staging -> main (2026-05-21 07:43)
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
このリポジトリでは staging 先行フローを採用しています。PR のターゲットを |
There was a problem hiding this comment.
Code Review
This pull request standardizes the use of the component by replacing an inline SVG spinner in the upload page and updating the project's documentation to reflect this best practice. A review comment suggests removing redundant CSS classes from the Spinner component and improving accessibility for screen readers by adding sr-only text.
| {uploading ? ( | ||
| <span className="flex items-center gap-2"> | ||
| <span className="h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" /> | ||
| <Spinner className="h-4 w-4" /> |
There was a problem hiding this comment.
Spinner コンポーネントは内部で既に h-4 w-4 クラスをデフォルトとして持っているため、冗長なプロパティを削除できます。また、リポジトリのアクセシビリティ方針に基づき、ボタンのテキストをスピナーに置き換える際は、スクリーンリーダーが状態を識別できるように sr-only テキストなどでアクセシブルな名前を維持してください。
| <Spinner className="h-4 w-4" /> | |
| <Spinner /> | |
| <span className="sr-only">読み込み中...</span> |
References
- ボタンのテキストをスピナーに置き換える際は、スクリーンリーダーがボタンの目的や状態を識別できるよう、sr-only テキストなどを用いてアクセシブルな名前を維持する必要があります。
| **Learning:** 非同期のアクション(招待の承認・拒否など)において、ボタンを押した後にレスポンスが返るまでの間、処理中であることを明示するために `<Spinner />` を表示しボタンを非活性(disabled)にすることが UX/アクセシビリティ観点で重要です。また、成功時・失敗時それぞれに `toast.success` と `toast.error` を用いて明確な結果のフィードバックを行うことで、ユーザー体験が大きく向上します。 | ||
| **Action:** 今後リスト内の各アイテムに対して非同期アクションを実行する際は、該当する `id` と `action` の種類を状態として保持し、ローディングとフィードバックの UX パターンを適用します。 | ||
|
|
||
| ## 2024-05-21 - Consistent Loading Spinners for Async Actions |
There was a problem hiding this comment.
ドキュメント内の日付が
2024-05-21 になっていますが、直前のエントリ(2026-05-21)と矛盾しています。2026-05-21 の誤りと思われます。
| ## 2024-05-21 - Consistent Loading Spinners for Async Actions | |
| ## 2026-05-21 - Consistent Loading Spinners for Async Actions |
Prompt To Fix With AI
This is a comment left during a code review.
Path: .Jules/palette.md
Line: 26
Comment:
ドキュメント内の日付が `2024-05-21` になっていますが、直前のエントリ(2026-05-21)と矛盾しています。`2026-05-21` の誤りと思われます。
```suggestion
## 2026-05-21 - Consistent Loading Spinners for Async Actions
```
How can I resolve this? If you propose a fix, please make it concise.| {uploading ? ( | ||
| <span className="flex items-center gap-2"> | ||
| <span className="h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" /> | ||
| <Spinner className="h-4 w-4" /> |
There was a problem hiding this comment.
Spinner コンポーネントは内部で既に h-4 w-4 をデフォルトクラスとして持っています(spinner.tsx の6行目参照)。そのため className="h-4 w-4" を渡すと同じクラスが二重に出力されます。機能的な問題はありませんが、冗長な記述です。
| <Spinner className="h-4 w-4" /> | |
| <Spinner /> |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/src/app/upload/page.tsx
Line: 565
Comment:
`Spinner` コンポーネントは内部で既に `h-4 w-4` をデフォルトクラスとして持っています(`spinner.tsx` の6行目参照)。そのため `className="h-4 w-4"` を渡すと同じクラスが二重に出力されます。機能的な問題はありませんが、冗長な記述です。
```suggestion
<Spinner />
```
How can I resolve this? If you propose a fix, please make it concise.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
概要
アップロード画面 (
apps/web/src/app/upload/page.tsx) における非同期処理中(アップロード中)のローディングスピナーが、インラインの生のHTML要素(<span className="animate-spin ...">)で実装されていました。これを、アプリケーションの他画面で使用されている共通の<Spinner />コンポーネントに置き換えることで、視覚的な一貫性と保守性を向上させました。変更内容
apps/web/src/app/upload/page.tsxにSpinnerコンポーネントをインポートしました。<Spinner className="h-4 w-4" />に置換しました。.Jules/palette.mdに今回の UX/UI の一貫性に関する学び(日本語)を追記しました。検証
vitestとeslintを実行し、既存機能に問題がないことを確認済みです。PR created automatically by Jules for task 2547667791071906187 started by @is0692vs
Greptile Summary
アップロード画面のインラインスピナーを共通の
<Spinner />コンポーネントに置き換え、UI の一貫性と保守性を向上させた小規模なリファクタリングです。apps/web/src/app/upload/page.tsx: ハードコードされた<span className=\"animate-spin ...\">を<Spinner className=\"h-4 w-4\" />に置き換え。なおSpinnerコンポーネントは内部でh-4 w-4を既定クラスとして持つため、渡しているclassNameは冗長です。.Jules/palette.md: 今回の変更から得られた学習をドキュメントに追記。新エントリの年が2024になっており誤字と思われます。Confidence Score: 4/5
変更は局所的で安全にマージできます。
スピナーコンポーネントへの置き換えは正しく機能し、
motion-safe:animate-spinによりアクセシビリティも改善されています。className="h-4 w-4"の冗長な指定と palette.md の年号誤字の2点が残っています。.Jules/palette.mdの日付誤字とupload/page.tsxの冗長な className を確認してください。Important Files Changed
<Spinner />コンポーネントに置き換え。className="h-4 w-4"が冗長。2024-05-21となっており誤字あり。Sequence Diagram
sequenceDiagram actor User as ユーザー participant Button as アップロードボタン participant Spinner as Spinner コンポーネント participant API as apiFetch User->>Button: クリック(送信) Button->>API: アップロードリクエスト Button->>Spinner: "uploading=true でスピナー表示" Note over Spinner: motion-safe:animate-spin / aria-hidden=true API-->>Button: レスポンス返却 Button->>Spinner: "uploading=false でスピナー非表示" Button-->>User: 完了Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "UX/🎨: アップロード画面のローディング状態を共有のSpinnerコンポーネ..." | Re-trigger Greptile