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

Build TypeScript demos for all Joy components #36367

Closed
10 tasks done
hbjORbj opened this issue Feb 28, 2023 · 27 comments
Closed
10 tasks done

Build TypeScript demos for all Joy components #36367

hbjORbj opened this issue Feb 28, 2023 · 27 comments
Assignees
Labels
docs Improvements or additions to the documentation package: joy-ui Specific to @mui/joy umbrella For grouping multiple issues to provide a holistic view

Comments

@hbjORbj
Copy link
Member

hbjORbj commented Feb 28, 2023

We need your help!

Some Joy components do not have TypeScript versions of demos but only JavaScript demos. We need the community's help to ensure that all Joy components have TypeScript demos.

Contribution guides

  1. Pick a component in the “Ready to be picked up” section
  2. Go to docs/data/joy/components/${component} directory.
  3. For the demos that do not have matching typescript (.tsx) versions, create typescript files with the same name. For example, docs/data/joy/components/Checkbox has CheckboxColors.js while it doesn't have CheckboxColors.tsx. Create CheckboxColors.tsx.

Warning ⚠️: For ${Component}Variables.js and ${Component}Usage.js, we DO NOT need typescript versions.

  1. In the typescript file, copy/paste the code from its matching JavaScript demo, and turn it into type-safe code. For example, you can type the states, refs or the arguments of functions inside the demo. In some demos, the TypeScript version can be exactly the same as the JavaScript version. This is fine.
  2. Run yarn docs:typescript:formatted and yarn prettier.
  3. Verify that it works
    1. Run yarn docs:dev.
    2. go to URL /joy-ui/react-{component}/ (e.g., /joy-ui/react-checkbox) and check the demos (it should look the same).
    3. For every demo, both the "js" and "ts" toggle buttons at the left-top of the source code must be enabled as shown in the screenshot below.

Screenshot 2023-02-28 at 11 47 52

  1. Open a PR, put the URL to the the end of the component below (so that everyone knows it has been taken) and check the box.
  2. Tag @mui/core to review

If you come across any issue or are unsure of the changes, feel free to open a PR and describe the problem + tag @mui/core for help.

Example PR

#36366

List of components

Ready to be picked up

@hbjORbj hbjORbj added docs Improvements or additions to the documentation umbrella For grouping multiple issues to provide a holistic view package: joy-ui Specific to @mui/joy labels Feb 28, 2023
@hbjORbj hbjORbj added this to the Joy UI stable release milestone Feb 28, 2023
@varunmulay22
Copy link
Contributor

@hbjORbj may I kindly pick this up? Thanks

@hbjORbj
Copy link
Member Author

hbjORbj commented Feb 28, 2023

@varunmulay22 Would you take a component and create a PR for that :) ? If you finish with that component, then you can create another one. As explained in the description above, after creating a PR, please paste the URL next to the component and check the box in the description.

@varunmulay22
Copy link
Contributor

Sure this works for me thanks a ton

@varunmulay22
Copy link
Contributor

varunmulay22 commented Feb 28, 2023

@hbjORbj I did push changes for the TextArea component here but I'm unable to tag @mui/core. Are you sure this is the tag we should be using thanks again

Edit: Looks like an access issue for me. I cannot edit your comment from above also. Can you help please :)

@hbjORbj
Copy link
Member Author

hbjORbj commented Feb 28, 2023

That's odd. I am not sure about that. Maybe because you are a first-time contributor? I requested a review from the core team on your behalf and added your PR URL as well.

@varunmulay22
Copy link
Contributor

that's awesome Benny! much appreciated 😄

@sai6855
Copy link
Contributor

sai6855 commented Feb 28, 2023

@hbjORbj PR for divider #36374 , also even i'm unable to tag @mui-core

@hbjORbj
Copy link
Member Author

hbjORbj commented Feb 28, 2023

Hmm, okay. I reviewed it for now. Thanks.

@varunmulay22
Copy link
Contributor

varunmulay22 commented Mar 1, 2023

@hbjORbj still unable to tag or edit your comment from above. You may expect a few more PR's till EOI 😅

@sai6855
Copy link
Contributor

sai6855 commented Mar 1, 2023

@varunmulay22 before working on component, can you mention here, which component you started working on so that others can pick another component

@varunmulay22
Copy link
Contributor

@sai6855 You do the same too please. I am picking up switch radio, modal and menu next

@sai6855
Copy link
Contributor

sai6855 commented Mar 1, 2023

@varunmulay22 okay, I'll pick checkbox,list, select

@hbjORbj
Copy link
Member Author

hbjORbj commented Mar 1, 2023

Thanks, both of you! Don't worry, once you create a PR, I will paste the URL.

@hbjORbj
Copy link
Member Author

hbjORbj commented Mar 2, 2023

@varunmulay22 Are you working on Radio as well?

@sai6855
Copy link
Contributor

sai6855 commented Mar 2, 2023

@varunmulay22 if you are not working on radio, i can pick it up

@varunmulay22
Copy link
Contributor

varunmulay22 commented Mar 2, 2023

Hey @sai6855 @hbjORbj I'm a little hands down with work today. Feel free to pick radio up Sai.

@sai6855
Copy link
Contributor

sai6855 commented Mar 2, 2023

Thanks a lot, I'll start radio once list is done

@sai6855
Copy link
Contributor

sai6855 commented Mar 2, 2023

@hbjORbj #36382 pr is ready for review

@sai6855
Copy link
Contributor

sai6855 commented Mar 3, 2023

@hbjORbj PR for radio (#36406)

@theVedanta
Copy link

theVedanta commented Mar 3, 2023

@hbjORbj #36405 PR for Radio is ready to review

@theVedanta
Copy link

@hbjORbj PR for radio (#36406)

Hey! I'm sorry I did not know you had started working on radio.

@sai6855
Copy link
Contributor

sai6855 commented Mar 3, 2023

Hi , yeah I mentioned same in this comment #36367 (comment). You probably might have missed it, Maybe you can work on this issue #35933?

@theVedanta
Copy link

Yeah I’m sorry I missed it, thank for that recommendation!
Also can you check my PR and tell me whats wrong with the checks? It says labels are missing for some reason… cant seem to figure that out

@sai6855
Copy link
Contributor

sai6855 commented Mar 3, 2023

Yeah I’m sorry I missed it, thank for that recommendation! Also can you check my PR and tell me whats wrong with the checks? It says labels are missing for some reason… cant seem to figure that out

You need not be worried about labels, only maintainers can add labels. Once they add labels ci check will pass

@hbjORbj
Copy link
Member Author

hbjORbj commented Mar 3, 2023

Reviewed and approved your PR for the Radio. Thanks! @sai6855
Thanks for the initiative as well! @theVedanta

@varunmulay22
Copy link
Contributor

@hbjORbj 3 PR's are ready for review

@hbjORbj hbjORbj self-assigned this Mar 7, 2023
@hbjORbj
Copy link
Member Author

hbjORbj commented Mar 16, 2023

This is now complete! Thanks for the contributions <3

@hbjORbj hbjORbj closed this as completed Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation package: joy-ui Specific to @mui/joy umbrella For grouping multiple issues to provide a holistic view
Projects
None yet
Development

No branches or pull requests

4 participants