Skip to content

Improve graph UX with smoother curves and visual polish#13

Open
jbingham17 wants to merge 1 commit intomainfrom
improved-ux
Open

Improve graph UX with smoother curves and visual polish#13
jbingham17 wants to merge 1 commit intomainfrom
improved-ux

Conversation

@jbingham17
Copy link
Contributor

Summary

  • Increase chart height from 120px to 160px for better data readability
  • Switch from linear to monotone curve interpolation for smoother graph lines
  • Add subtle CartesianGrid, enhanced gradients, animated value glow, and container styling to both CPU and Memory graphs

Test plan

  • Verify CPU and Memory graphs render correctly with the new height and smooth curves
  • Confirm the subtle grid lines appear without being distracting
  • Check the glow animation on graph values, and verify it respects prefers-reduced-motion
  • Test responsiveness across different screen sizes

🤖 Generated with Claude Code

…ects

- Increase chart height from 120px to 160px for better readability
- Switch graph interpolation from linear to monotone for smoother curves
- Add subtle CartesianGrid to CPU and Memory graphs
- Enhance gradient opacity and stroke width for more vibrant fills
- Add animated glow effect on graph values with reduced-motion support
- Add inset shadow and subtle border to graph containers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Style
    • Enhanced graph value visibility with larger text and glowing animation (respects reduced-motion preferences).
    • Improved visual depth of graph containers with shadows and borders.
    • Increased chart heights and added grid lines for better readability.
    • Enhanced gradient effects with smoother area curves and thicker lines for improved chart visibility.

Walkthrough

Visual enhancements applied to graph components and styling. Graph values display size increased with added glow animation, chart heights expanded from 120px to 160px, CartesianGrid added to both charts, gradient opacity values adjusted, Area interpolation changed to monotone curves, and stroke widths increased.

Changes

Cohort / File(s) Summary
Graph Chart Visualization
src/components/CpuGraph.tsx, src/components/MemoryGraph.tsx
Chart height increased to 160px, CartesianGrid added, gradient opacity values adjusted (stronger at 0%, weaker at 100%), Area interpolation changed from linear to monotone, stroke width increased.
Graph Value Styling
src/App.css
Graph value display size increased to 32px, enhanced with dual shadow glow effect, looping value-glow animation added with prefers-reduced-motion guard, graph container enhanced with inset shadow and border.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • Disable graph line smoothing #2 — Modifies Area interpolation type in graph components but applies opposite change (linear instead of monotone), suggesting potential conflict or alternative styling approach.
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: improving graph UX through smoother curves and visual polish, which aligns with all substantive modifications across CSS and React components.
Description check ✅ Passed The description is clearly related to the changeset, detailing the key modifications (chart height, curve interpolation, grid addition, gradients, glow animation) and providing a test plan that corresponds to the actual changes made.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch improved-ux

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/App.css`:
- Around line 254-266: Change all occurrences of the CSS keyword "currentColor"
to lowercase "currentcolor" to satisfy the Stylelint value-keyword-case rule:
update the .graph-value rule (text-shadow and any animation declarations) and
both frames in the `@keyframes` value-glow definition to use "currentcolor"
instead of "currentColor".

Comment on lines +254 to +266
text-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
animation: value-glow 2s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
.graph-value {
animation: none;
}
}

@keyframes value-glow {
from { text-shadow: 0 0 20px currentColor, 0 0 40px currentColor; }
to { text-shadow: 0 0 10px currentColor, 0 0 25px currentColor; }
Copy link

@coderabbitai coderabbitai bot Feb 20, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use lowercase currentcolor to satisfy Stylelint rules.

Static analysis reports value-keyword-case violations. CSS keywords should use lowercase per your project's Stylelint configuration.

🔧 Proposed fix
 .graph-value {
   font-size: 32px;
   font-weight: 700;
-  text-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
+  text-shadow: 0 0 20px currentcolor, 0 0 40px currentcolor;
   animation: value-glow 2s ease-in-out infinite alternate;
 }
 
 `@media` (prefers-reduced-motion: reduce) {
   .graph-value {
     animation: none;
   }
 }
 
 `@keyframes` value-glow {
-  from { text-shadow: 0 0 20px currentColor, 0 0 40px currentColor; }
-  to { text-shadow: 0 0 10px currentColor, 0 0 25px currentColor; }
+  from { text-shadow: 0 0 20px currentcolor, 0 0 40px currentcolor; }
+  to { text-shadow: 0 0 10px currentcolor, 0 0 25px currentcolor; }
 }
🧰 Tools
🪛 Stylelint (17.3.0)

[error] 254-254: Expected "currentColor" to be "currentcolor" (value-keyword-case)

(value-keyword-case)


[error] 254-254: Expected "currentColor" to be "currentcolor" (value-keyword-case)

(value-keyword-case)


[error] 265-265: Expected "currentColor" to be "currentcolor" (value-keyword-case)

(value-keyword-case)


[error] 265-265: Expected "currentColor" to be "currentcolor" (value-keyword-case)

(value-keyword-case)


[error] 266-266: Expected "currentColor" to be "currentcolor" (value-keyword-case)

(value-keyword-case)


[error] 266-266: Expected "currentColor" to be "currentcolor" (value-keyword-case)

(value-keyword-case)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/App.css` around lines 254 - 266, Change all occurrences of the CSS
keyword "currentColor" to lowercase "currentcolor" to satisfy the Stylelint
value-keyword-case rule: update the .graph-value rule (text-shadow and any
animation declarations) and both frames in the `@keyframes` value-glow definition
to use "currentcolor" instead of "currentColor".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

why did you suggest this?

Copy link

Choose a reason for hiding this comment

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

@jbingham17 The suggestion was based on your project's Stylelint configuration, which enforces the value-keyword-case rule requiring CSS keywords to be lowercase.

Both currentColor and currentcolor work identically in CSS—the language is case-insensitive for keywords. However, the linter flagged 6 violations because your project's style guide prefers lowercase keywords for consistency.

This is purely a code style suggestion, not a functional issue. If your team prefers the camelCase currentColor for readability, you can either:

  • Ignore this particular suggestion
  • Adjust the Stylelint rule in your configuration to allow camelCase keywords

The choice is yours based on your team's style preferences!

@jbingham17
Copy link
Contributor Author

@coderabbitai explain the change

@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

Tip

For best results, initiate chat on the files or code changes.

@jbingham17 This PR enhances the visual appearance and user experience of the CPU and Memory graphs. Here's a breakdown of the changes:

📊 Graph Dimensions

  • Increased chart height from 120px to 160px in both CpuGraph and MemoryGraph components, providing more vertical space for better data visualization and readability.

📈 Smoother Curves

  • Changed the Area chart interpolation type from linear to monotone in both graphs, creating smoother, more visually appealing curve transitions that are easier on the eyes.

🎨 Visual Enhancements

Graph Styling:

  • Added CartesianGrid to both CPU and Memory charts for subtle background gridlines that help with data alignment
  • Increased stroke width (CPU: 1.5 → 2, Memory: 2 → 2.5) for more prominent graph lines
  • Enhanced gradient opacity for more vibrant fills:
    • CPU gradient: start opacity 0.6 → 0.8, end opacity 0.1 → 0.05
    • Memory gradient: start opacity 0.7 → 0.9, end opacity 0.1 → 0.05

Graph Container (App.css):

  • Added inset shadow and subtle border to graph containers for better definition
  • Increased graph value font size from 28px to 32px for improved readability
  • Enhanced the existing glow effect with a stronger secondary shadow

Animation:

  • Added a looping glow animation (value-glow) that pulses the graph values for visual interest
  • Includes prefers-reduced-motion guard to respect accessibility preferences and disable the animation for users who prefer reduced motion

These changes work together to create a more polished, modern interface with improved readability and visual appeal while maintaining accessibility standards.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant