Skip to content

🎨 Palette: Standardize loading spinners across multiple pages#889

Open
is0692vs wants to merge 2 commits into
stagingfrom
ux-spinner-refactor-16286244941977723172
Open

🎨 Palette: Standardize loading spinners across multiple pages#889
is0692vs wants to merge 2 commits into
stagingfrom
ux-spinner-refactor-16286244941977723172

Conversation

@is0692vs
Copy link
Copy Markdown
Contributor

@is0692vs is0692vs commented May 24, 2026

💡 What: The inline loading spinners (raw HTML with .animate-spin classes) in upload/page.tsx, settings/page.tsx, collections/new/page.tsx, papers/[id]/edit/page.tsx, and orgs/new/page.tsx were replaced with the shared <Spinner /> component. Associated tests were also updated to query for the correct selector [aria-hidden="true"].motion-safe\:animate-spin.
🎯 Why: Using a shared component for loading states ensures visual consistency across the application and makes future updates to the spinner easier to manage.
📸 Before/After: Visually identical, but cleaner code under the hood.
Accessibility: No direct changes, but standardizes the aria-hidden="true" behavior applied within the <Spinner /> component.


PR created automatically by Jules for task 16286244941977723172 started by @is0692vs

Greptile Summary

5つのページ(uploadsettingscollections/newpapers/[id]/editorgs/new)でインラインのローディングスピナー実装を共通の <Spinner /> コンポーネントに統一したリファクタリングPRです。関連するテストも motion-safe:animate-spin セレクタに合わせて更新されています。

  • animate-spin から motion-safe:animate-spin への変更により、prefers-reduced-motion 設定を尊重するアクセシビリティ改善が副次的に導入されています。
  • upload/page.tsx では元の実装に aria-hidden="true" がなかったため、<Spinner /> 適用後に新たに付与されます(アクセシビリティ上は改善)。なお、対応するテストファイルは PR 以前から存在しません。

Confidence Score: 4/5

スピナーの置き換えは全ページで機能的に同等であり、テストも適切に更新されています。マージしても問題ありません。

変更はすべて機械的なコンポーネント置き換えで、ロジックへの影響はありません。.Jules/palette.md の年号タイポが唯一の指摘事項で、コード動作には無影響です。

.Jules/palette.md の年号修正のみ確認が必要です。

Important Files Changed

Filename Overview
.Jules/palette.md Spinner 統一に関するラーニングエントリを追加。ただし日付が 2024-05-24 と誤っており、正しくは 2026-05-24
apps/web/src/app/upload/page.tsx インラインの animate-spin スパンを <Spinner /> に置換。元の実装には aria-hidden="true" がなかったが、Spinner コンポーネントにより付与されるためアクセシビリティ的には改善。テストファイルが存在しないため、スピナーのテストカバレッジなし(PR 以前から未存在)。
apps/web/src/app/collections/new/page.tsx インラインスピナーを <Spinner /> に置換。テストも同様に更新済み。問題なし。
apps/web/src/app/orgs/new/page.tsx インラインスピナーを <Spinner /> に置換。テストも更新済み。問題なし。
apps/web/src/app/papers/[id]/edit/page.tsx インラインスピナーを <Spinner /> に置換。テストも更新済み。問題なし。
apps/web/src/app/settings/page.tsx インラインスピナーを <Spinner /> に置換。テストも更新済み。問題なし。
apps/web/src/app/tests/collections-new.test.tsx スピナーのセレクタを .animate-spin から motion-safe\:animate-spin に更新。Spinner コンポーネントの DOM 構造に合致。
apps/web/src/app/tests/orgs-new.test.tsx スピナーのセレクタを motion-safe\:animate-spin に更新。問題なし。
apps/web/src/app/tests/paper-edit-page.test.tsx スピナーのセレクタを motion-safe\:animate-spin に更新。問題なし。
apps/web/src/app/tests/settings-page.test.tsx スピナーのセレクタを motion-safe\:animate-spin に更新。問題なし。

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[ユーザーがフォーム送信] --> B{submitting / saving / uploading}
    B -- true --> C["<Spinner /> を表示\n(motion-safe:animate-spin, aria-hidden=true)"]
    B -- true --> D[ボタンテキスト: ローディング中...]
    B -- false --> E[ボタンテキスト: 通常ラベル]
    C --> F[ボタン disabled=true]
    D --> F
    F --> G[API レスポンス待機]
    G --> H[submitting=false]
    H --> I[スピナー非表示 / ボタン再活性化]

    subgraph 共通SpinnerComponent
        C
    end
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
.Jules/palette.md:25
パレットログの年号が `2024` になっていますが、現在は 2026 年です。他のエントリ(例: `2026-05-21`)と統一するため、修正が必要です。

```suggestion
## 2026-05-24 - Spinner Component Usage
```

Reviews (1): Last reviewed commit: "🎨 Palette: Replace inline loading spinn..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

is0692vs and others added 2 commits May 21, 2026 16:48
Release: staging -> main (2026-05-21 07:43)
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
open-shelf Ignored Ignored May 24, 2026 2:44am

@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@qodo-code-review
Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Warning

Review limit reached

@is0692vs, we couldn't start this review because you've used your available PR reviews for now.

Your plan currently allows 1 review/hour. Refill in 56 minutes and 8 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: be1ca5ae-9b19-4eb3-919d-7c95408377d8

📥 Commits

Reviewing files that changed from the base of the PR and between d429569 and 6cb11e8.

📒 Files selected for processing (10)
  • .Jules/palette.md
  • apps/web/src/app/__tests__/collections-new.test.tsx
  • apps/web/src/app/__tests__/orgs-new.test.tsx
  • apps/web/src/app/__tests__/paper-edit-page.test.tsx
  • apps/web/src/app/__tests__/settings-page.test.tsx
  • apps/web/src/app/collections/new/page.tsx
  • apps/web/src/app/orgs/new/page.tsx
  • apps/web/src/app/papers/[id]/edit/page.tsx
  • apps/web/src/app/settings/page.tsx
  • apps/web/src/app/upload/page.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ux-spinner-refactor-16286244941977723172

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot changed the base branch from main to staging May 24, 2026 02:45
@github-actions
Copy link
Copy Markdown

このリポジトリでは staging 先行フローを採用しています。PR のターゲットを staging に変更しました。staging で動作確認後、stagingmain の PR を作成してください。

Comment thread .Jules/palette.md
## 2026-05-21 - Invite Action UX Improvement
**Learning:** 非同期のアクション(招待の承認・拒否など)において、ボタンを押した後にレスポンスが返るまでの間、処理中であることを明示するために `<Spinner />` を表示しボタンを非活性(disabled)にすることが UX/アクセシビリティ観点で重要です。また、成功時・失敗時それぞれに `toast.success` と `toast.error` を用いて明確な結果のフィードバックを行うことで、ユーザー体験が大きく向上します。
**Action:** 今後リスト内の各アイテムに対して非同期アクションを実行する際は、該当する `id` と `action` の種類を状態として保持し、ローディングとフィードバックの UX パターンを適用します。
## 2024-05-24 - Spinner Component Usage
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 パレットログの年号が 2024 になっていますが、現在は 2026 年です。他のエントリ(例: 2026-05-21)と統一するため、修正が必要です。

Suggested change
## 2024-05-24 - Spinner Component Usage
## 2026-05-24 - Spinner Component Usage
Prompt To Fix With AI
This is a comment left during a code review.
Path: .Jules/palette.md
Line: 25

Comment:
パレットログの年号が `2024` になっていますが、現在は 2026 年です。他のエントリ(例: `2026-05-21`)と統一するため、修正が必要です。

```suggestion
## 2026-05-24 - Spinner Component Usage
```

How can I resolve this? If you propose a fix, please make it concise.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors several pages to use the shared component instead of inline HTML for loading states, ensuring consistency across the application. Corresponding test files were updated to use the specific CSS selector required by the new component, and a new entry was added to the palette documentation to record this standard. I have no feedback to provide as there were no review comments to assess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant