-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Conversation
Deploy preview: https://deploy-preview-12941--material-ui-x.netlify.app/ |
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.
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}`, |
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.
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? 🤔
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.
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?
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.
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. 🙈 😆
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.
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"?
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.
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.
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}`, |
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.
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. 🙈 😆
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:
I believe you can do that with anything using some shell scripting magic 😛 |
I just ran cspell on the x-charts folder and fixed what didn't look like intentional 😅