Skip to content

feat(dashboard): add GroupWidget container with panel/collapsible/tabbed modes#33

Merged
HanSur94 merged 16 commits into
mainfrom
feature/dashboard-groupwidget
Mar 18, 2026
Merged

feat(dashboard): add GroupWidget container with panel/collapsible/tabbed modes#33
HanSur94 merged 16 commits into
mainfrom
feature/dashboard-groupwidget

Conversation

@HanSur94
Copy link
Copy Markdown
Owner

Summary

  • New GroupWidget class extending DashboardWidget — container that organizes child widgets into titled panels, collapsible sections, or tabbed views
  • Three modes: panel (always visible), collapsible (expand/collapse with position tracking), tabbed (tab switching with per-tab child sets)
  • Full integration: DashboardEngine (addWidget('group', ...)), DashboardSerializer (JSON round-trip with createWidgetFromStruct refactor), DashboardLayout (reflow() method), DashboardTheme (5 new group fields across all 6 presets), web bridge (JS rendering + CSS)
  • 20+ tests covering construction, rendering, modes, nesting depth enforcement, serialization round-trip, engine integration, and time-range cascade

Known follow-ups

  • collapse()/expand() update Position(4) but don't trigger grid reflow yet (needs engine-level LayoutRef wiring)
  • exportScript doesn't emit addChild calls for group children

Test plan

  • Run TestGroupWidget.m in MATLAB — all tests pass
  • Run TestDashboardEngine.m — no regressions
  • Run TestDashboardSerializer.m — no regressions
  • Run example_dashboard_groups.m — renders 3 groups (panel, collapsible, tabbed)

🤖 Generated with Claude Code

HanSur94 and others added 16 commits March 18, 2026 22:04
13-task TDD plan covering: GroupWidget scaffold, panel/collapsible/tabbed
modes, theme integration, serialization, engine/serializer/layout
integration, web bridge export, and example script.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…agement

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move ExpandedHeight/ParentGroup to SetAccess=protected
- Error on invalid removeChild index instead of silent no-op
- Add toStruct stub to prevent broken serialization
- Use sentinel idiom for default Position override

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add GroupHeaderBg, GroupHeaderFg, GroupBorderColor, TabActiveBg, and
TabInactiveBg to DashboardTheme for all presets (dark, light, industrial,
scientific, ocean, default), with shared fallback defaults. Add
testThemeHasGroupFields to TestGroupWidget to verify presence across all
presets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace collapse/expand stubs with real implementations that save/restore
the expanded height and toggle child panel visibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace renderTabbedChildren and switchTab stubs with real implementations.
Tab buttons are placed in the header, content panels toggle visibility on
tab switch, and button backgrounds update to reflect active/inactive state.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verify that one level of nesting (depth=2) succeeds and that attempting
to nest three levels deep throws GroupWidget:maxDepth.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ruct)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add struct-array normalization in fromStruct for JSON round-trip
  (jsondecode converts cell arrays to struct arrays)
- Force header panel in tabbed mode even with empty Label
  (tab buttons need a parent panel)
- Document reflow() TODO in collapse/expand (requires engine wiring)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'FastSense Performance'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.10.

Benchmark suite Current: b4816da Previous: 2df32a9 Ratio
Downsample mean (1M) 4.142 ms 2.095 ms 1.98
Downsample mean std(1M) 0.097 ms 0.069 ms 1.41
Downsample mean (5M) 20.758 ms 9.935 ms 2.09
Downsample mean (10M) 42.632 ms 19.713 ms 2.16
Downsample mean std10M) 0.84 ms 0.087 ms 9.66
Instantiation mean std10M) 2.416 ms 0.376 ms 6.43
Downsample mean (50M) 213.479 ms 97.95 ms 2.18
Downsample mean std50M) 2.909 ms 0.221 ms 13.16
Render mean std50M) 1.532 ms 0.405 ms 3.78
Downsample mean (100M) 421.531 ms 196.073 ms 2.15
Downsample mean ( std00M) 3.554 ms 1.567 ms 2.27
Render mean ( std00M) 3.855 ms 2.483 ms 1.55
Downsample mean (500M) 2132.945 ms 986.499 ms 2.16
Downsample mean ( std00M) 17.372 ms 1.567 ms 11.09
Instantiation mean ( std00M) 346.466 ms 188.372 ms 1.84
Render mean ( std00M) 49.673 ms 2.483 ms 20.01

This comment was automatically generated by workflow using github-action-benchmark.

CC: @HanSur94

@HanSur94 HanSur94 merged commit 58157fc into main Mar 18, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant