Skip to content

tweaked positioning and spacing#7537

Merged
kruulik merged 7 commits intomainfrom
chart-component-refinements
Mar 2, 2026
Merged

tweaked positioning and spacing#7537
kruulik merged 7 commits intomainfrom
chart-component-refinements

Conversation

@kruulik
Copy link
Copy Markdown
Contributor

@kruulik kruulik commented Mar 2, 2026

Refinements to chart components and dark theme config.

  • Switch chart imports from antd to antd/lib
  • Add animation state management (charts stop animating after first run)
  • Add aspect prop to RadarChart
  • Add Card colorBgContainer to dark theme config

@kruulik kruulik requested a review from a team as a code owner March 2, 2026 15:45
@kruulik kruulik requested review from speaker-ender and removed request for a team March 2, 2026 15:45
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 2, 2026

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

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Mar 2, 2026 8:44pm
fides-privacy-center Ignored Ignored Mar 2, 2026 8:44pm

Request Review

@kruulik kruulik marked this pull request as draft March 2, 2026 15:45
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 2, 2026

Greptile Summary

This PR refines chart components with optimized imports, animation state management, and dark theme improvements. The changes switch from antd to antd/lib imports for better tree-shaking, introduce a useChartAnimation hook to stop charts from continuously animating after their initial render, add an aspect prop to RadarChart for flexible sizing, and configure Card background colors in the dark theme.

  • Switched chart imports from antd to antd/lib for tree-shaking optimization
  • Implemented animation state management via new useChartAnimation hook that disables animation after first run (600ms default)
  • Added aspect prop to RadarChart (defaults to 1) and changed from fixed height to aspect-based sizing
  • Added Card colorBgContainer configuration to dark theme
  • Animation state issue with theme changes previously noted in review threads

Confidence Score: 4/5

  • This PR is safe to merge with minor refinements to chart components and theme configuration
  • The implementation is clean and well-structured. Import optimizations and theme changes are straightforward. The animation state management works as intended for the stated goal. The previously flagged animation/theme-change behavior is a known tradeoff rather than a blocking issue
  • The chart component files (RadarChart.tsx, Sparkline.tsx) have a known animation limitation with theme changes that was previously flagged, but all changes are otherwise safe

Important Files Changed

Filename Overview
clients/fidesui/src/components/charts/RadarChart.tsx Added animation state management, aspect ratio prop, and switched to antd/lib import. Animation theme-change issue previously flagged
clients/fidesui/src/components/charts/Sparkline.tsx Added animation state management and switched to antd/lib import. Animation theme-change issue previously flagged
clients/fidesui/src/components/charts/chart-utils.ts New utility hook to manage chart animation state (stops animating after first run)

Last reviewed commit: c3478e1

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

6 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@kruulik kruulik marked this pull request as ready for review March 2, 2026 16:08
Copy link
Copy Markdown
Contributor

@speaker-ender speaker-ender left a comment

Choose a reason for hiding this comment

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

Overall looks good and approving.
Left some comments/questions but nothing that's a blocker.

@@ -1,4 +1,4 @@
import { theme } from "antd";
import { theme } from "antd/lib";
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.

What is the rationale for the import change?
I think the normal import should export things correctly via esm and if not I think it's a different path.

Copy link
Copy Markdown
Contributor Author

@kruulik kruulik Mar 2, 2026

Choose a reason for hiding this comment

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

You are correct - it should all be imported from antd, however, the reason this worked was because it matched FidesUIProvider importing from antd/lib. Importing from antd breaks theming because they were resolving to two different modules.
FidesUIProvider should also be corrected, since importing from /lib is deprecated, but it will cause breaking changes to anything else that imports from antd/lib.

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.

yuck. yea we can deal with that later

@kruulik kruulik enabled auto-merge March 2, 2026 20:51
@kruulik kruulik added this pull request to the merge queue Mar 2, 2026
Merged via the queue into main with commit fa16ce1 Mar 2, 2026
43 of 45 checks passed
@kruulik kruulik deleted the chart-component-refinements branch March 2, 2026 21:03
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.

2 participants