feat(#3361): add JSDocs comments to wrappers and common types#3715
feat(#3361): add JSDocs comments to wrappers and common types#3715
Conversation
ba51038 to
1813a47
Compare
| * // similar to app-footer-meta-section & app-footer-nav-section | ||
| */ | ||
| export class GoabFormItemSlot { | ||
| /** Sets which form-item slot this content should render into. */ |
There was a problem hiding this comment.
Should this have the @required in the comment?
There was a problem hiding this comment.
Added @required to the slot comment in b76d497: /** @required Sets which form-item slot this content should render into. */
|
@copilot Make the following changes:
|
Done in b76d497:
|
vanessatran-ddi
left a comment
There was a problem hiding this comment.
I see some properties in angular documented as Sets the ... while some are not. I checked this rule https://github.com/GovAlta/ui-components/blob/dev/CLAUDE.md?plain=1#L109 and looks like we should follow the rule starts vs Sets the .. pattern. However it is not a blocker for me.
libs/angular-components/src/lib/components/file-upload-card/file-upload-card.ts
Outdated
Show resolved
Hide resolved
libs/angular-components/src/lib/components/file-upload-input/file-upload-input.ts
Outdated
Show resolved
Hide resolved
libs/angular-components/src/lib/components/radio-item/radio-item.ts
Outdated
Show resolved
Hide resolved
|
@copilot Address the above review comments. |
All review comments addressed in 97bf331:
|
Co-Authored-By: bdfranck <1479091+bdfranck@users.noreply.github.com> Co-Authored-By: Copilot <198982749+Copilot@users.noreply.github.com>
97bf331 to
d4fcb29
Compare
| constructor(private cdr: ChangeDetectorRef) {} | ||
|
|
There was a problem hiding this comment.
You need to remove this line.
React and Angular wrappers lacked JSDoc comments, giving consumers no inline documentation in their IDE when using components or inspecting props.
JSDoc added across all wrappers
Sets the...phrasing, with@default,@required, and@deprecatedtags where applicableGoabInputOnChangeDetail, etc.) documented for IDE hover tooltipsRequired/optional corrections (found during audit)
file-upload-card.tssize→@Input({ required: true }), aligned with React + Sveltefile-upload-input.tsvariant→ optional with@default "dragdrop", aligned with React + Svelteaccordion.tsxheading→ optional, aligned with Angularpopover.tsxtarget→ required, aligned with Angulardrawer.ts,modal.ts,radio-item.ts@requiredJSDoc tags from optional fieldsBefore (the change)
No inline documentation when consuming React/Angular wrapper components — no component descriptions, no prop hints, no type documentation visible in IDEs.
After (the change)
Hovering a component or prop in any IDE shows descriptions, defaults, deprecation notices, and required flags sourced directly from the wrapper source.
Make sure that you've checked the boxes below before you submit the PR
Steps needed to test
Open a project consuming
@abgov/react-componentsor@abgov/angular-componentsand hover over any component or prop to verify JSDoc descriptions appear. Check@required,@default, and@deprecatedtags render correctly in the IDE tooltip.