Conversation
WalkthroughThis PR updates the website's styling and components to use CSS variables instead of hardcoded colors, replaces a static GitHub iframe with a theme-aware button component, reorganizes imports for consistency, and refactors export statements from aggregated to individual re-exports. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7063 +/- ##
=======================================
Coverage 90.20% 90.21%
=======================================
Files 526 526
Lines 39648 39676 +28
Branches 5440 5441 +1
=======================================
+ Hits 35766 35794 +28
Misses 3873 3873
Partials 9 9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Bundle ReportBundle size has no change ✅ |
…troke color for consistency style: adjust IndexView block border styling for better layout control
d5e46e3 to
1242ede
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
www/src/views/IndexView/IndexLineChart.tsx (1)
52-73: Optional: extract shared dot styling to avoid duplication.Both lines repeat identical
dot/activeDotobjects. A shared constant would reduce drift risk when tweaking styles later.♻️ Suggested refactor
export default function IndexLineChart() { + const dotStyle = { + fill: 'var(--color-surface-base)', + }; + const activeDotStyle = { + stroke: 'var(--color-surface-base)', + }; + return ( <LineChart style={{ width: '100%', aspectRatio: 1.618, maxWidth: 800, margin: 'auto' }} responsive data={data}> <CartesianGrid stroke="var(--color-border-3)" strokeDasharray="5 5" /> <XAxis dataKey="name" stroke="var(--color-text-3)" /> <YAxis width="auto" stroke="var(--color-text-3)" /> <Line type="monotone" dataKey="uv" stroke="var(--color-chart-1)" - dot={{ - fill: 'var(--color-surface-base)', - }} - activeDot={{ - stroke: 'var(--color-surface-base)', - }} + dot={dotStyle} + activeDot={activeDotStyle} /> <Line type="monotone" dataKey="pv" stroke="var(--color-chart-2)" - dot={{ - fill: 'var(--color-surface-base)', - }} - activeDot={{ - stroke: 'var(--color-surface-base)', - }} + dot={dotStyle} + activeDot={activeDotStyle} /> <RechartsDevtools /> </LineChart> ); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@www/src/views/IndexView/IndexLineChart.tsx` around lines 52 - 73, The two <Line> components (dataKey="uv" and dataKey="pv") duplicate the same dot and activeDot style objects; extract a shared constant (e.g., const sharedDotStyle = { dot: { fill: 'var(--color-surface-base)' }, activeDot: { stroke: 'var(--color-surface-base)' } }) and replace the inline dot/activeDot props on the Line components with the shared constant (or spread it into each <Line>) so both lines reference the same style object and avoid drift.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@www/src/views/IndexView/IndexLineChart.tsx`:
- Around line 52-73: The two <Line> components (dataKey="uv" and dataKey="pv")
duplicate the same dot and activeDot style objects; extract a shared constant
(e.g., const sharedDotStyle = { dot: { fill: 'var(--color-surface-base)' },
activeDot: { stroke: 'var(--color-surface-base)' } }) and replace the inline
dot/activeDot props on the Line components with the shared constant (or spread
it into each <Line>) so both lines reference the same style object and avoid
drift.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
package-lock.jsonis excluded by!**/package-lock.jsontest-vr/__snapshots__/tests/www/IndexView.spec-vr.tsx-snapshots/Index-Line-Chart-1-chromium-linux.pngis excluded by!**/*.pngtest-vr/__snapshots__/tests/www/IndexView.spec-vr.tsx-snapshots/Index-Line-Chart-1-firefox-linux.pngis excluded by!**/*.pngtest-vr/__snapshots__/tests/www/IndexView.spec-vr.tsx-snapshots/Index-Line-Chart-1-webkit-linux.pngis excluded by!**/*.png
📒 Files selected for processing (10)
test-vr/tests/www/IndexView.spec-vr.tsxwww/package.jsonwww/src/layouts/Frame.tsxwww/src/layouts/RechartsLogo.tsxwww/src/styles/_scaffolding.csswww/src/utils/SuccessIcon.tsxwww/src/views/IndexView/IndexLineChart.tsxwww/src/views/IndexView/IndexView.csswww/src/views/IndexView/index.tsxwww/src/views/index.ts
PavelVanecek
left a comment
There was a problem hiding this comment.
I'm still hoping for the native theme switcher so that we don't have to modify hundreds of example files
Description
Review the homepage details to improve the dark mode
Related Issue
#6825
Motivation and Context
I'm splitting up the first attempt #6882
How Has This Been Tested?
Visual regression tests
Screenshots (if appropriate):
Types of changes
Checklist:
Summary by CodeRabbit
New Features
Style