Skip to content
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

[charts] Fix docs/translations/errors typos #12941

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

JCQuintas
Copy link
Member

I just ran cspell on the x-charts folder and fixed what didn't look like intentional 😅

@JCQuintas JCQuintas added enhancement This is not a bug, nor a new feature component: charts This is the name of the generic UI component, not the React module! labels Apr 29, 2024
@JCQuintas JCQuintas requested review from LukasTy and noraleonte April 29, 2024 12:33
@mui-bot
Copy link

mui-bot commented Apr 29, 2024

Deploy preview: https://deploy-preview-12941--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 4bf4bff

Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

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

Super nice chance! 👍
Great tool that you've used.
Have you considered running it in CI? Is it fast? Does it have a way to be run only on changes compared to a branch (i.e. like we do with prettier)?

@@ -8,7 +8,7 @@ import ChartsContinuousGradient from './ChartsContinuousGradient';
export function useChartGradient() {
const { chartId } = React.useContext(DrawingContext);
return React.useCallback(
(axisId: string, direction: 'x' | 'y') => `${chartId}-graient-${direction}-${axisId}`,
(axisId: string, direction: 'x' | 'y') => `${chartId}-gradient-${direction}-${axisId}`,
Copy link
Member

Choose a reason for hiding this comment

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

This is technically a BC, albeit, so small that, IMHO, we could go ahead with it...
Did you think about it? What do you think? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Hum, I didn't look much into because no docs changed due to this.

Upon further understanding what it does, it doesn't look like it is documented for external use nor it affects any of the tests.

Do you have more concrete examples of what issues this change could create?

Copy link
Member

Choose a reason for hiding this comment

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

It's only the fact that an id DOM attribute changes and someone could be relying on it, hence, essentially it is a breaking change.
However, as you have also pointed out, it is not documented and essentially nothing changes functionality wise, that's why I mentioned that, IMHO, it is fine to go ahead with this change.
I just asked if you have considered it. 👍
If it were any more important, we could add a breaking change note in the release changelog, but I'm not sure if it is even worth that. 🙈 😆

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you think we should put a small note in the changelog about it? "Fixed a typo in an undocumented x-charts gradient css class that could have unintended sideeffects"?

Copy link
Member

Choose a reason for hiding this comment

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

It won't hurt. :)
However, am I missing something or does it end up in the id field instead of a class? 🤔
Screenshot 2024-04-29 at 16 24 02

Copy link
Member Author

Choose a reason for hiding this comment

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

You are correct 👍

@@ -8,7 +8,7 @@ import ChartsContinuousGradient from './ChartsContinuousGradient';
export function useChartGradient() {
const { chartId } = React.useContext(DrawingContext);
return React.useCallback(
(axisId: string, direction: 'x' | 'y') => `${chartId}-graient-${direction}-${axisId}`,
(axisId: string, direction: 'x' | 'y') => `${chartId}-gradient-${direction}-${axisId}`,
Copy link
Member

Choose a reason for hiding this comment

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

It's only the fact that an id DOM attribute changes and someone could be relying on it, hence, essentially it is a breaking change.
However, as you have also pointed out, it is not documented and essentially nothing changes functionality wise, that's why I mentioned that, IMHO, it is fine to go ahead with this change.
I just asked if you have considered it. 👍
If it were any more important, we could add a breaking change note in the release changelog, but I'm not sure if it is even worth that. 🙈 😆

@JCQuintas
Copy link
Member Author

Have you considered running it in CI? Is it fast?

Didn't consider, but should be pretty simple to run in CI, and yes it is fast. I just think it needs to be a bit more thoughtful process. Because it flags a lot of "fake/tech" words as "wrong". Eg: Stackable, while not necessarily correct, conveys the correct meaning. So we would have to add those to an "allow list"

Does it have a way to be run only on changes compared to a branch (i.e. like we do with prettier)?

I believe you can do that with anything using some shell scripting magic 😛

@JCQuintas JCQuintas merged commit f1114f0 into mui:master Apr 29, 2024
19 checks passed
@JCQuintas JCQuintas deleted the fix-x-charts-docs-typos branch April 29, 2024 13:42
DungTiger pushed a commit to DungTiger/mui-x that referenced this pull request Jul 23, 2024
thomasmoon pushed a commit to thomasmoon/mui-x that referenced this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: charts This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants