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

[TypeScript] Add inline documentation for most common components #9234

Merged
merged 5 commits into from
Aug 30, 2023

Conversation

fzaninotto
Copy link
Member

Problem

The analytics for the react-admin docs show that developers mostly visit the pages dedicated to the <Admin>, <List>, and <Datagrid> components.

If they need to read the doc, it means they don't have the necessary information at hand.

Solution

Document the proptypes of these components, so that IntelliSense can provide inline usage and doc link.

This is a limited experiment to see if it facilitates onboarding of new developers.

@fzaninotto fzaninotto changed the title [Doc] Add inline documentation for most common components [TypeScript] Add inline documentation for most common components Aug 30, 2023
Copy link
Contributor

@djhi djhi left a comment

Choose a reason for hiding this comment

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

Nice!

filter?: FilterPayload;

/**
* The filter to apply when calling getList if the filter is empty.
Copy link
Contributor

Choose a reason for hiding this comment

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

Aren't those the default values of the always on filter inputs?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, but we don't need to go into details here. The link to the doc is enough.

packages/ra-core/src/controller/list/useListController.ts Outdated Show resolved Hide resolved
Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
@djhi djhi added this to the 4.13.3 milestone Aug 30, 2023
@djhi djhi merged commit 85221a3 into master Aug 30, 2023
4 checks passed
@djhi djhi deleted the inline-component-doc branch August 30, 2023 15:28
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.

2 participants