Skip to content

Conversation

Mash707
Copy link
Contributor

@Mash707 Mash707 commented Mar 27, 2025

Towards #11719

The following examples of ChartArea will be converted to TypeScript:

  • Basic with right aligned legend
  • Teal with bottom aligned legend and axis label
  • Multi-color (unordered) bottom-left aligned legend and responsive container

@Mash707 Mash707 mentioned this pull request Mar 27, 2025
18 tasks
@patternfly-build
Copy link
Contributor

patternfly-build commented Mar 27, 2025

@Mash707
Copy link
Contributor Author

Mash707 commented Mar 27, 2025

@thatblindgeye, could you also check the filenames while reviewing this. I am not sure if they are good to go.

@Mash707 Mash707 force-pushed the convert-chart-area-to-typescript branch from 259daa1 to e6cc2b7 Compare March 31, 2025 08:54
Copy link
Contributor

@thatblindgeye thatblindgeye left a 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 = () => {
Copy link
Contributor

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 = () => {
Copy link
Contributor

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

Copy link
Contributor Author

@Mash707 Mash707 Apr 8, 2025

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 = () => {
Copy link
Contributor

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

@Mash707 Mash707 force-pushed the convert-chart-area-to-typescript branch from e6cc2b7 to 68b98a8 Compare April 8, 2025 18:13
@Mash707 Mash707 requested a review from thatblindgeye April 8, 2025 18:22
@nicolethoen nicolethoen merged commit 53ecdc5 into patternfly:main Apr 21, 2025
13 checks passed
@Mash707 Mash707 deleted the convert-chart-area-to-typescript branch April 21, 2025 17:15
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.

4 participants