Skip to content

Update: Add JSDoc documentation to core view classes (fixes #854)#864

Open
joe-replin wants to merge 1 commit into
masterfrom
issue/854
Open

Update: Add JSDoc documentation to core view classes (fixes #854)#864
joe-replin wants to merge 1 commit into
masterfrom
issue/854

Conversation

@joe-replin
Copy link
Copy Markdown
Contributor

Fixes #854

Update

  • Added @file, @module, and @class/@classdesc/@extends block to contentObjectView.js, including @fires tags for all lifecycle events and full JSDoc for render(), remove(), and renderTo()
  • Added @file, @module, and @class block to pageView.js; documented remove() override explaining $pageLabel cleanup
  • Added @file, @module, and @class block to menuView.js
  • Added @file, @module, and @class block to menuItemView.js
  • Added @file, @module, and @class block to articleView.js
  • Added @file, @module, and @class block to blockView.js
  • Added @file, @module, and @class block to componentView.js; added @returns {void} to setupInviewCompletion()
  • Added @file, @module, and @class block to questionView.js with full documentation of the submit pipeline, feedback, reset, and correct-answer reveal methods; documented all @protected override hooks and all @deprecated compatibility-layer methods with @returns types and {@link} cross-references

Testing

  1. Run grunt dev and confirm no build errors are introduced by the JSDoc changes
  2. Run the JSDoc generator and confirm all eight files appear in the output with correct module paths and class entries
  3. Open each file in an editor with JSDoc support (e.g. VS Code) and confirm hover tooltips display the new descriptions, @param types, and @deprecated warnings on the compatibility-layer methods
  4. Confirm log.deprecated() runtime calls remain intact in questionView.js by opening a course in the browser, triggering a legacy question component, and verifying the deprecation warnings appear in the console

Add comprehensive JSDoc comments and method documentation to multiple view classes to improve IDE hints and developer understanding. Updates include file/module/class-level descriptions, @class/@classdesc annotations, param/returns/throws tags, @fires and @deprecated notices, and clarifications for lifecycle and question APIs. Files changed: js/views/articleView.js, js/views/blockView.js, js/views/componentView.js, js/views/contentObjectView.js, js/views/menuItemView.js, js/views/menuView.js, js/views/pageView.js, js/views/questionView.js. These are documentation-only changes and do not alter runtime behaviour.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs Reviewing

Development

Successfully merging this pull request may close these issues.

JSDocs - Content Views

1 participant