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

Compile a list of properties that have incorrect JsDocs [2 days] #162

Closed
yuriy-fix opened this issue Dec 7, 2023 · 6 comments
Closed

Compile a list of properties that have incorrect JsDocs [2 days] #162

yuriy-fix opened this issue Dec 7, 2023 · 6 comments
Assignees

Comments

@yuriy-fix
Copy link

As a part of this task we need to create a list of APIs that have incorrect JsDocs:

  • Missing proper documentation
  • Have references to the protected APIs
@yuriy-fix yuriy-fix changed the title Compile a list of properties that have incorrect JsDocs Compile a list of properties that have incorrect JsDocs ] Dec 7, 2023
@yuriy-fix yuriy-fix changed the title Compile a list of properties that have incorrect JsDocs ] Compile a list of properties that have incorrect JsDocs [2 days] Dec 7, 2023
@web-padawan
Copy link
Member

web-padawan commented Dec 7, 2023

ContextMenu: for some reason IntelliJ can't correctly resolve this component and doesn't show code completion popup:

Screenshot 2023-12-07 at 15 35 58

Can be tested in the Docs project hilla branch. Note, in react-components code completion popup is shown.

Screenshot 2023-12-07 at 15 41 53

@web-padawan
Copy link
Member

web-padawan commented Dec 7, 2023

Select: same issue as for ContextMenu above. Note, these components use almost identical tsx files.

Screenshot 2023-12-07 at 15 44 52

UPD: also applies to Dialog component which also uses same forwardRef syntax in the tsx file:

Screenshot 2023-12-07 at 15 59 27

Same also applies to DateTimePicker and TimePicker components (also using tsx files).

@web-padawan
Copy link
Member

web-padawan commented Dec 8, 2023

MultiSelectComboBox in IntelliJ can't resolve properties from mixins (own properties e.g. selectedItems work fine):

Screenshot 2023-12-08 at 11 03 49

Note, this is not the case for the regular ComboBox which resolves mixin properties such as disabled or label.

@web-padawan
Copy link
Member

GridPro exposes some of the protected API e.g. _disabledChanged and _theme.

Screenshot 2023-12-08 at 12 51 06

Note: regular Grid also exposes _scrollToFlatIndex but not _theme and _disabledChanged.

@web-padawan
Copy link
Member

Based on my test project, VSCode correctly shows JSDoc for the following components authored in tsx files:

  • ComboBox
  • ContextMenu
  • Dialog
  • Grid
  • GridPro
  • MultiSelectComboBox
  • Notification
  • Select
  • VirtualList

Pressing Cmd + click on a property / attribute set on these components opens the WC file where it is defined.
Example: with <Select disabled> the disabled attribute "go to definition" will open DisabledMixin.d.ts file.

For other (generated) components, Cmd + click opens the React wrapper .d.ts file, which doesn't have JSDoc.

@web-padawan
Copy link
Member

After #167 is merged, JSDoc comments for generated components are shown correctly.
One exception is placeholder property which is present in React.HTMLAttributes.

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

No branches or pull requests

2 participants