Conversation
- Add Sparkline component using recharts AreaChart - Add Sparkline stories for Storybook - Export Sparkline and SparklineProps from fidesui - Add recharts dependency to fidesui
- Add RadarChart component using recharts RadarChart - Add RadarChart stories for Storybook - Export RadarChart, RadarChartProps, and RadarChartDataPoint from fidesui - Add recharts dependency to fidesui
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
…nto kk-dashboard-card
There was a problem hiding this comment.
Pull request overview
Adds new FidesUI higher-order components (HOCs) to support dashboard “stat card” patterns by extending Ant Design’s Card and Statistic, and demonstrates composition via a Storybook story.
Changes:
- Introduces
CustomCardwith optionalcoverPosition="bottom"and associated SCSS for reorderingcoverplacement. - Introduces
CustomStatisticwith atrendprop that maps to Ant Design theme tokens for value coloring. - Adds a
Dashboard/CardStorybook story and small supporting adjustments (RadarChart layout tweak, Storybook Vite optimizeDeps, changelog entry).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| clients/fidesui/src/index.ts | Switches Card export to the new CustomCard wrapper and exports its props type |
| clients/fidesui/src/hoc/index.tsx | Re-exports newly added HOCs (CustomCard, CustomStatistic) |
| clients/fidesui/src/hoc/CustomCard.tsx | Adds Card wrapper with coverPosition and default clipping class |
| clients/fidesui/src/hoc/CustomCard.module.scss | Adds flex/order styling to place Card cover below the body |
| clients/fidesui/src/hoc/CustomStatistic.tsx | Adds Statistic wrapper with trend-based token color selection |
| clients/fidesui/src/components/dashboard/StatCard.stories.tsx | Adds Storybook examples composing CustomCard + CustomStatistic + charts |
| clients/fidesui/src/components/charts/RadarChart.tsx | Adjusts radar chart radius and axis render ordering |
| clients/fidesui/.storybook/main.ts | Adds antd to Vite optimizeDeps for Storybook |
| changelog/dashboard-card.yaml | Adds changelog entry for the new UI building blocks |
Comments suppressed due to low confidence (2)
clients/fidesui/src/index.ts:304
CustomCardis now re-exported asCard, which changes runtime behavior for every existingimport { Card } from "fidesui"consumer (e.g. always adds theoverflow-clipclass). To avoid unintended clipping regressions, consider adding an opt-out prop (e.g.clipContent?: boolean) or defaulting clipping off unlesscoverPosition="bottom"/coveris used, while still keeping the new functionality available.
export {
CustomAvatar as Avatar,
CustomCard as Card,
CopyTooltip,
CustomDateRangePicker as DateRangePicker,
CustomInput as Input,
CustomList as List,
CustomSelect as Select,
clients/fidesui/src/index.ts:309
- A
CustomStatisticHOC is introduced and exported from./hoc, but it is not re-exported from the package entrypoint (src/index.ts) the way other HOCs are (e.g.CustomCard as Card,CustomInput as Input). If this is intended for external use, consider exportingCustomStatistic(and its props type) here asStatistic/StatisticPropsfor a consistent public API.
// Higher-order components
export type {
CustomAvatarProps as AvatarProps,
CustomCardProps as CardProps,
ICustomMultiSelectProps,
ICustomSelectProps,
CustomInputProps as InputProps,
} from "./hoc";
export {
CustomAvatar as Avatar,
CustomCard as Card,
CopyTooltip,
CustomDateRangePicker as DateRangePicker,
CustomInput as Input,
CustomList as List,
CustomSelect as Select,
CustomTable as Table,
CustomTag as Tag,
CustomTooltip as Tooltip,
CustomTypography as Typography,
} from "./hoc";
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Greptile SummaryThis PR introduces two HOC wrappers —
Confidence Score: 4/5
Important Files Changed
Last reviewed commit: b5fb4a8 |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jpople
left a comment
There was a problem hiding this comment.
Looks good to me, very clean.
Ticket []
Description Of Changes
Created HOC for ant Card to allow re-ordering
covercontent and introduced an option for inline title styling to match designsCreated HOC for Statistic component, ensuring the correct token styles are used
Added a story under
Dashboard/Cardto demonstrate how these could be assembledCode Changes
Steps to Confirm
turbo run storybookand then visitDashboard/CardPre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works