docs: add full JSDoc to createDemoLayout#388
Merged
Conversation
Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com> Agent-Logs-Url: https://github.com/ormidales/microgl/sessions/a93cc6e4-b16c-48c4-b1a1-bdd749318178
Copilot
AI
changed the title
[WIP] Add JSDoc comment to createDemoLayout function
docs: add full JSDoc to Mar 26, 2026
createDemoLayout
2 tasks
ormidales
approved these changes
Mar 26, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Improves contributor-facing documentation for the shared demo DOM helper createDemoLayout (used by all demo scenes) and adds a test to enforce presence of key JSDoc tags, consistent with the repo’s “JSDoc-contract via source assertions” approach.
Changes:
- Expanded
createDemoLayoutJSDoc to document parameters and return value. - Added a Vitest assertion ensuring
@param title,@param controls, and@returnsexist insrc/demoLayout.ts.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/demoLayout.ts |
Adds full JSDoc block describing behavior, params, and return value for createDemoLayout. |
tests/demo-layout.test.ts |
Adds a contract-style test asserting JSDoc tags are present in the layout source. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ormidales
approved these changes
Mar 26, 2026
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.
createDemoLayout— called by every demo scene — had only a bare one-liner JSDoc with no@paramor@returnsdocumentation, leaving its signature opaque for contributors.Changes
src/demoLayout.ts— expanded the JSDoc block to document both parameters and theDemoLayoutreturn value:tests/demo-layout.test.ts— added an assertion that@param title,@param controls, and@returnsare present in the source, consistent with the existing JSDoc-contract test pattern used across the repo.Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.