-
Notifications
You must be signed in to change notification settings - Fork 371
chore(chart area): convert to typescript #11721
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
chore(chart area): convert to typescript #11721
Conversation
Preview: https://patternfly-react-pr-11721.surge.sh A11y report: https://patternfly-react-pr-11721-a11y.surge.sh |
@thatblindgeye, could you also check the filenames while reviewing this. I am not sure if they are good to go. |
259daa1
to
e6cc2b7
Compare
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.
The file names for chart examples may be trickier since the example names may be a bit more verbose. Typically we've tried to have the individual files (and the exported component) be similar to the example name (or otherwise indicative of the example purpose). At the same time we also want to try and achieve that without the file names being super long, so a bit of a balancing act.
Left some comments below, let me know what you think
y: number; | ||
} | ||
|
||
export const ChartAreaRightAlignedLegend: React.FunctionComponent = () => { |
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.
I think ChartAreaRightAlignedLegend would make for a good file name as well rather than ChartAreaBasic.
Also can we look into removing the commented out imports in these files
x: string; | ||
y: number; | ||
} | ||
export const MultiColorChart: React.FunctionComponent = () => { |
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.
Another convention we try to keep for the file names/exported component in the examples is [Component][Example title/description/etc]
. So for this file maybe ChartAreaMultiColorResponsive
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.
Thanks for specifying, this convention makes the naming much simpler, will make the necessary changes.
I'll keep this mind for future also
y: number; | ||
} | ||
|
||
export const BottomAlignedLegend: React.FunctionComponent = () => { |
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.
Following the above comment, maybe just ChartAreaBottomLegend
e6cc2b7
to
68b98a8
Compare
Towards #11719
The following examples of ChartArea will be converted to TypeScript: