feat(#3159): Add JSDoc comments to React and Angular component wrappers#3671
Draft
feat(#3159): Add JSDoc comments to React and Angular component wrappers#3671
Conversation
Adds comprehensive JSDoc comments to all React and Angular component wrapper properties, extracted from the Svelte source-of-truth. Changes include: - JSDoc descriptions for all React wrapper interface props - JSDoc descriptions for all Angular @input() decorators - @default tags showing default values from Svelte source - @required tags for required props - @deprecated tags preserved from Svelte source - Margins interface in common.ts updated with JSDoc - Covers all 70+ components in lib and experimental directories Closes #3159 Co-authored-by: bdfranck <1479091+bdfranck@users.noreply.github.com> Agent-Logs-Url: https://github.com/GovAlta/ui-components/sessions/394aef6d-753c-4f64-8ac6-89a3a4049341
Copilot
AI
changed the title
[WIP] Add JSDocs to component wrappers for better developer guidance
feat(#3159): Add JSDoc comments to React and Angular component wrappers
Mar 24, 2026
Collaborator
|
Here's the script Copilot created: |
…sed by initial script
The previous codegen script used regex `(\w+)\??\s*[=:]` which only
handled optional (`?`) TypeScript props but not non-null assertion (`!`)
props. Every `@Input({ required: true }) prop!: Type` line was silently
skipped.
Fixed 27 Angular wrapper files (lib + experimental) across:
- pagination (itemCount, pageNumber)
- microsite-header (type)
- skeleton (type)
- grid (minChildWidth)
- drawer (open, position)
- icon-button (icon)
- details (heading)
- icon (type)
- card-image (src, height)
- side-menu-group (heading) — lib and experimental
- file-upload-input (variant) — lib and experimental
- file-upload-card (filename) — lib and experimental
- data-grid (keyboardNav)
- menu-button/menu-action (text, action) — lib and experimental
- work-side-menu (heading, url)
- work-side-menu-item (label)
- work-side-menu-group (heading)
- work-side-notification-item (description)
- form-item-slot (slot) — lib and experimental
- popover (target)
Co-authored-by: bdfranck <1479091+bdfranck@users.noreply.github.com>
Agent-Logs-Url: https://github.com/GovAlta/ui-components/sessions/ba06df3b-2f1f-426c-bdd6-92845ab33b0c
…ing JSDoc gaps - Add scripts/add-jsdocs.js: re-runnable codegen that reads JSDoc from Svelte source-of-truth and injects into React/Angular wrapper files where missing - Supports --dry-run mode, @required/@deprecated/@default tag handling, boolean normalisation ("false" -> false), and experimental/ directories - Update scripts/README.md with full usage docs for the new script - Apply script to fix 43 wrapper files with missing JSDoc that were missed by the initial two commits - Fix pre-existing corruption in experimental/checkbox-list/checkbox-list.tsx where original codegen incorrectly injected Svelte implementation code into the GoabxCheckboxListProps interface Closes #3159 Co-authored-by: bdfranck <1479091+bdfranck@users.noreply.github.com> Agent-Logs-Url: https://github.com/GovAlta/ui-components/sessions/16e49495-0ec3-4557-8540-b3fa171bcc11
Collaborator
|
@copilot There some properties that aren't in the Svelte component but are in the React and Angular Wrappers. They are
Here's what to do:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scripts/add-jsdocs.js— re-runnable script that reads JSDoc from Svelte source and injects into React/Angular wrappers--dry-runmode for previewing changes without writing@required,@deprecated,@defaulttags"false"/"true"string defaults →false/truebooleanslib/andexperimental/Angular wrappers@internalSvelte propsexperimental/checkbox-list/checkbox-list.tsx(Svelte imports injected into interface by original codegen)scripts/README.mdwith full usage documentation for the new scriptOriginal prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.