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

[DataGrid] Remove unnecessary syntax in JSDoc #10567

Merged
merged 4 commits into from
Oct 11, 2023

Conversation

Lev-Shapiro
Copy link
Contributor

@Lev-Shapiro Lev-Shapiro commented Oct 3, 2023

This PR fixes #10568

@Lev-Shapiro Lev-Shapiro marked this pull request as draft October 3, 2023 16:32
@mui-bot
Copy link

mui-bot commented Oct 3, 2023

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

Generated by 🚫 dangerJS against 238dc5c

@Lev-Shapiro Lev-Shapiro marked this pull request as ready for review October 3, 2023 16:46
@Lev-Shapiro Lev-Shapiro closed this Oct 3, 2023
@Lev-Shapiro Lev-Shapiro deleted the optimize-documentation branch October 3, 2023 18:18
@LukasTy
Copy link
Member

LukasTy commented Oct 4, 2023

Hello @Lev-Shapiro
Did you intend to close this PR or was it an accident? 🤔

@Lev-Shapiro Lev-Shapiro restored the optimize-documentation branch October 4, 2023 13:19
@Lev-Shapiro Lev-Shapiro reopened this Oct 4, 2023
@Lev-Shapiro
Copy link
Contributor Author

An accident, but could you help me understand what it means when ci/circleci test fails? I've only changed comments so I have no idea how could it change something that will give any error

@LukasTy
Copy link
Member

LukasTy commented Oct 4, 2023

An accident, but could you help me understand what it means when ci/circleci test fails? I've only changed comments so I have no idea how could it change something that will give any error

Gotcha. 👌
Well, you have updated JSDoc for props and we use that to generate PropTypes as well as our API documentation.
https://github.com/mui/material-ui/blob/HEAD/CONTRIBUTING.md#updating-the-component-api-documentation
Please run yarn docs:api locally and commit the resulting diff to avoid the error. 😉

@LukasTy LukasTy added core Infrastructure work going on behind the scenes component: data grid This is the name of the generic UI component, not the React module! labels Oct 4, 2023
@LukasTy LukasTy changed the title Remove unneccessary syntax in JS Comment Docs [DataGrid] Remove unnecessary syntax in JSDoc Oct 4, 2023
@LukasTy LukasTy requested a review from a team October 4, 2023 13:48
@@ -15,7 +15,7 @@ export interface GridGroupingColDefOverride<R extends GridValidRowModel = any>
* The field from which we want to apply the sorting and the filtering for the grouping column.
* It is only useful when `props.rowGroupingColumnMode === "multiple"` to decide which grouping criteria should be used for sorting and filtering.
* Do not have any effect when building the tree with the `props.treeData` feature.
* @default: The sorting and filtering is applied based on the leaf field in any, otherwise based on top level grouping criteria.
* @default The sorting and filtering is applied based on the leaf field in any, otherwise based on top level grouping criteria.
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 not the intended usage of the @default directive. @cherniavskii do we use it that way in the codebase very often?

Copy link
Contributor Author

@Lev-Shapiro Lev-Shapiro Oct 4, 2023

Choose a reason for hiding this comment

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

I guess I could also answer this question. I've found yesterday many incorrect usages of the @default directive some have syntax problems and some incorrect usages of that directive, I could try make a more global PR and an issue to fix it, sounds good?

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 used in a similar way in the Pickers codebase a few times as well. 🤔
Maybe it's not the most correct usage, but it works and helps us to build the API documentation that would be useful. 🙈

Copy link
Member

Choose a reason for hiding this comment

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

@Lev-Shapiro thanks, but that's not what I intended with that comment. I know it is not the correct usage of it, but my intention was to know if we use it that way elsewhere or if it is the only time.

As mentioned by @LukasTy it does not pose any threat and if it is a valuable tool we should continue using it like this! 💯

@@ -1008,7 +1008,7 @@ DataGridPremiumRaw.propTypes = {
/**
* If `true`, the grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
* If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
* @default: false
* @default false
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 touching non-MIT code.
Do we need to go with the SLA process for even non-functional changes?
cc @joserodolfofreitas @DanailH

Copy link
Member

Choose a reason for hiding this comment

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

@LukasTy I believe we need a CLA for any change in the commercially licensed folder.

Copy link
Member

Choose a reason for hiding this comment

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

Although in our CLA docs it says:

If the change is nontrivial and user-facing, the CLA needs to be signed.

Copy link
Member

@oliviertassinari oliviertassinari Oct 10, 2023

Choose a reason for hiding this comment

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

I have updated https://www.notion.so/mui-org/CLA-Contributor-License-Agreement-92ece655b1584b10b00e4de9e67eedb0?pvs=4#ede845886e494cb4b802a67563152130 to detail my take on this topic, inspired by OpenSSL.

Here, I think we can consider it's a trivial change, if the author agrees too, we could move forward without signing a CLA.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, sure, let's move forward

@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation and removed core Infrastructure work going on behind the scenes labels Oct 10, 2023
Co-authored-by: Olivier Tassinari <[email protected]>
Signed-off-by: Lev-Shapiro <[email protected]>
Copy link
Member

@cherniavskii cherniavskii left a comment

Choose a reason for hiding this comment

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

Thanks!

@cherniavskii cherniavskii merged commit 87815c0 into mui:master Oct 11, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[core] Remove unnecessary syntax from JS Docs
6 participants