Skip to content

Update: Add JSDoc to core models, views, and collections (fixes #851)#861

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

Update: Add JSDoc to core models, views, and collections (fixes #851)#861
joe-replin wants to merge 1 commit into
masterfrom
issue/851

Conversation

@joe-replin
Copy link
Copy Markdown
Contributor

Fixes #851

Update

  • Added @file, @class, and method-level JSDoc to adaptModel.js, covering hierarchy traversal, completion checking, trackable state, type group queries, locking, and relative navigation
  • Added full JSDoc to lockingModel.js, documenting the cooperative locking API (setLocking, unsetLocking, isLocking, getLockCount, setLockState)
  • Added @file, @class, and method-level JSDoc to adaptView.js, covering rendering lifecycle, child view management, visibility toggling, and removal events
  • Added @file and @class JSDoc to adaptCollection.js and adaptSubsetCollection.js
  • Omitted JSDoc from self-evident one-liners and standard Backbone lifecycle methods (e.g. initialize, defaults, attributes) to avoid over-documentation

Testing

  1. Run grunt dev and confirm the build completes without errors
  2. Open a course in the browser and verify that completion, locking, and navigation behaviour is unchanged
  3. Confirm no JSDoc-related console errors or build warnings on the five changed files

Add comprehensive JSDoc file/class/method documentation across core modules: AdaptCollection, AdaptSubsetCollection, AdaptModel, LockingModel and AdaptView. Descriptions clarify responsibilities, public events, parameter/return types and internal behaviours (e.g. trackable state APIs, cooperative locking, JSX render pause/resume, child/parent caching and on-screen animation). Also make a small API clarification: AdaptModel.reset now has explicit defaults (type = 'hard', canReset = this.get('_canReset')). These changes are primarily documentation and developer-facing API clarification; no significant runtime logic changes are intended.
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 - Base Model/View/Collection Classes

1 participant