-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat: improve JSDocs for RenderOptions #909
feat: improve JSDocs for RenderOptions #909
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 4f419ec:
|
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.
Awesome. Really looking forward to having more in-editor docs. I have some minor wording/formatting suggestions.
types/index.d.ts
Outdated
/** If the container is specified, then this defaults to that, otherwise this defaults to document.body. This is used as | ||
* the base element for the queries as well as what is printed when you use debug(). | ||
* | ||
* [BaseElement](https://testing-library.com/docs/react-testing-library/api/#baseelement) |
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.
Not a fan of these non-descriptive links. What do you think about just
* [BaseElement](https://testing-library.com/docs/react-testing-library/api/#baseelement) | |
* @see https://testing-library.com/docs/react-testing-library/api/#baseelement |
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.
The think with @see is that you loose the hyperlink on the hint :(
Will check. I was under the impression VSCode did make these clickable.
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.
Just checked the links and they all work without any JSDoc tags. Will just use @see
tags.
Co-authored-by: Sebastian Silbermann <[email protected]>
624b86c
to
94b04f2
Compare
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.
+1
Codecov Report
@@ Coverage Diff @@
## main #909 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 4
Lines 140 140
Branches 28 28
=========================================
Hits 140 140 Continue to review full report at Codecov.
|
@ImADrafter Much appreciated, thanks! @all-contributors add @ImADrafter for docs |
I've put up a pull request to add @ImADrafter! 🎉 |
🎉 This PR is included in version 12.1.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What: Improve JS docs for type definitions, including JSDocs for RenderOptions.
Im just not sure if
docs
commit type is the proper for this oneWhy: While using react-testing library, sometimes you will need to review the docs. By filling props description with just a brief stract of the docs, the library would be easier to use for IDEs with JSDoc support, specially for newcommers.
How: JSDocs syntax
Checklist:
docs site