feat(collapsibleElements): Initial checkin of new Collapsible meta-da… #39

Merged
darinkelkhoff merged 3 commits from feature/collapsible-sections-and-widgets into develop 2026-02-10 02:22:21 +00:00
darinkelkhoff commented 2026-02-05 17:05:03 +00:00 (Migrated from github.com)

Summary

Frontend-core counterpart to QRun-IO/qqq#396 — adds the Collapsible TypeScript model and wires it into QTableSection and QWidgetMetaData so the frontend can read collapsible metadata from the backend.

  • New Collapsible class (isCollapsible, initiallyOpen) with constructor and clone() support
  • QTableSection gains an optional collapsible property, deserialized in the constructor and properly cloned
  • QWidgetMetaData gains the same optional collapsible property with constructor deserialization

Details

Collapsible (new file)

  • Simple model with two boolean fields: isCollapsible and initiallyOpen
  • Constructor hydrates from a plain object (matching the JSON shape from the backend's CollapsibleMetaData)
  • clone() via spread operator for immutable copy support

QTableSection

  • Optional collapsible?: Collapsible field added
  • Constructor conditionally instantiates Collapsible when present in the source object
  • clone() updated to deep-copy the collapsible property

QWidgetMetaData

  • Optional collapsible?: Collapsible field added
  • Constructor conditionally instantiates Collapsible when present in the source object

Test plan

  • Verify Collapsible correctly deserializes { isCollapsible: true, initiallyOpen: false }
  • Verify QTableSection round-trips collapsible through constructor and clone()
  • Verify QWidgetMetaData populates collapsible from backend JSON
  • Verify sections/widgets without collapsible in the JSON remain undefined
  • Integration: confirm frontend renders collapse controls once the UI layer consumes these models

🤖 Generated with Claude Code and 🤓Darin Code

## Summary Frontend-core counterpart to QRun-IO/qqq#396 — adds the **`Collapsible`** TypeScript model and wires it into `QTableSection` and `QWidgetMetaData` so the frontend can read collapsible metadata from the backend. - New `Collapsible` class (`isCollapsible`, `initiallyOpen`) with constructor and `clone()` support - `QTableSection` gains an optional `collapsible` property, deserialized in the constructor and properly cloned - `QWidgetMetaData` gains the same optional `collapsible` property with constructor deserialization ## Details ### Collapsible (new file) - Simple model with two boolean fields: `isCollapsible` and `initiallyOpen` - Constructor hydrates from a plain object (matching the JSON shape from the backend's `CollapsibleMetaData`) - `clone()` via spread operator for immutable copy support ### QTableSection - Optional `collapsible?: Collapsible` field added - Constructor conditionally instantiates `Collapsible` when present in the source object - `clone()` updated to deep-copy the collapsible property ### QWidgetMetaData - Optional `collapsible?: Collapsible` field added - Constructor conditionally instantiates `Collapsible` when present in the source object ## Test plan - [x] Verify `Collapsible` correctly deserializes `{ isCollapsible: true, initiallyOpen: false }` - [x] Verify `QTableSection` round-trips `collapsible` through constructor and `clone()` - [x] Verify `QWidgetMetaData` populates `collapsible` from backend JSON - [x] Verify sections/widgets without `collapsible` in the JSON remain `undefined` - [ ] Integration: confirm frontend renders collapse controls once the UI layer consumes these models 🤖 Generated with [Claude Code](https://claude.com/claude-code) and 🤓[Darin Code](https://kelkhoff.com/)
tim-chamberlain (Migrated from github.com) approved these changes 2026-02-09 16:49:10 +00:00
Sign in to join this conversation.