-
Notifications
You must be signed in to change notification settings - Fork 49
fix: bug in color loading text in file viewer #2011
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
Conversation
✅ Deploy Preview for kleros-v2-testnet ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for kleros-v2-neo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for kleros-v2-testnet-devtools ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughA new CSS rule was added to the Changes
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Code Climate has analyzed commit 20ee602 and detected 0 issues on this pull request. View more on Code Climate. |
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
web/src/components/FileViewer/index.tsx (1)
28-30
: Document intent and enforce override
Add a comment explaining the rule’s purpose and use!important
to ensure it overrides the default viewer styles. For example:@@ styled(DocViewer)` #pdf-controls { z-index: 3; } - [class*="--loading"] { - color: ${({ theme }) => theme.secondaryText}; - } + /* Apply secondaryText color to all loading state elements within the DocViewer */ + && [class*="--loading"] { + color: ${({ theme }) => theme.secondaryText} !important; + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
web/src/components/FileViewer/index.tsx
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (15)
- GitHub Check: Redirect rules - kleros-v2-testnet-devtools
- GitHub Check: Redirect rules - kleros-v2-testnet
- GitHub Check: Redirect rules - kleros-v2-testnet
- GitHub Check: Redirect rules - kleros-v2-neo
- GitHub Check: SonarCloud
- GitHub Check: contracts-testing
- GitHub Check: Analyze (javascript)
- GitHub Check: Header rules - kleros-v2-testnet-devtools
- GitHub Check: Header rules - kleros-v2-testnet
- GitHub Check: Header rules - kleros-v2-testnet
- GitHub Check: Header rules - kleros-v2-neo
- GitHub Check: Pages changed - kleros-v2-neo
- GitHub Check: Pages changed - kleros-v2-testnet-devtools
- GitHub Check: Pages changed - kleros-v2-testnet
- GitHub Check: Pages changed - kleros-v2-testnet
🔇 Additional comments (1)
web/src/components/FileViewer/index.tsx (1)
28-30
: Verify the CSS selector scope and specificity
The attribute selector[class*="--loading"]
targets any descendant whose class contains--loading
, which may unintentionally match other elements. Consider narrowing the scope (e.g., prefixing with&&
to increase specificity) or targeting the exact BEM class name thatreact-doc-viewer
uses for its loading state.Can you confirm this selector only affects the intended loading indicators and doesn’t conflict with other components?
❌ Deploy Preview for kleros-v2-university failed. Why did it fail? →
|
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.
lgtm
(before)

PR-Codex overview
This PR focuses on adding a new CSS rule for loading states in the
FileViewer
component, enhancing its styling during loading.Detailed summary
--loading
.color
property to thesecondaryText
value from the theme.Summary by CodeRabbit