-
Notifications
You must be signed in to change notification settings - Fork 499
fix: Improve spinner visibility on primary-colored backgrounds #676
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
fix: Improve spinner visibility on primary-colored backgrounds #676
Conversation
Add variant prop to Spinner component to support different color contexts: - 'primary' (default): Uses text-primary for standard backgrounds - 'foreground': Uses text-primary-foreground for primary backgrounds - 'muted': Uses text-muted-foreground for subtle contexts Updated components where spinners were invisible against primary backgrounds: - TaskProgressPanel: Active task indicators now visible - Button: Auto-detects spinner variant based on button style - Various dialogs and setup views using buttons with loaders Fixes #670 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ 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. Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughReworks Spinner to accept a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
Summary of ChangesHello @Shironex, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical UI visibility issue where loading spinners on primary-colored backgrounds were invisible due to insufficient color contrast. The solution involves enhancing the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request effectively addresses the spinner visibility issue on primary-colored backgrounds by introducing variants to the Spinner component and intelligently updating the Button component. The changes are well-executed across multiple files. I've included a couple of suggestions for refactoring that will improve type safety and leverage the new abstractions more effectively. Overall, this is a solid fix.
- Introduced a new memoized function to collect running auto tasks from all worktrees associated with the current project. - Updated the WorktreeTab component to utilize the aggregated running tasks for improved task management visibility. - Enhanced spinner visibility by applying a variant based on the selected state, ensuring better UI feedback during loading states.
Summary
Spinnercomponent with avariantprop supportingprimary,foreground, andmutedcolor variantsButtoncomponent to automatically detect and use the correct spinner variant based on button style (foreground for colored backgrounds like default/destructive)TaskProgressPanelfor active task indicatorsRoot Cause
After commit 832d10e unified all loading indicators to use the new
Spinnercomponent, spinners on primary-colored backgrounds became invisible because the spinner defaulted totext-primarywhich blended intobg-primarybackgrounds.Solution
The
Spinnercomponent now accepts avariantprop:'primary'(default): Usestext-primaryfor standard backgrounds'foreground': Usestext-primary-foregroundfor primary backgrounds'muted': Usestext-muted-foregroundfor subtle contextsThe
Buttoncomponent automatically selects the correct spinner variant based on its style variant.Files Modified
apps/ui/src/components/ui/spinner.tsx- Added variant propapps/ui/src/components/ui/button.tsx- Auto-detect spinner variantapps/ui/src/components/ui/task-progress-panel.tsx- Use foreground variantTest Plan
Closes #670
🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.