Repository navigation
Add a Component Tree panel to workspace - #330
dustinwhuang wants to merge 27 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new 'Component Tree' debug panel to visualize A2UI surface hierarchies and refactors the property editor into a standalone, reusable component, significantly cleaning up the gallery implementation. Feedback on these changes suggests adding a guard clause in the property editor template to safely handle undefined values when formatting JSON, and adding aria-level attributes to the component tree template to improve accessibility for screen readers.
⚡ A2UI Composer PR PreviewYour automated preview is successfully live (commit
|
jgindin
left a comment
There was a problem hiding this comment.
The component tree builder and status badges (missing, cycle, each <path>, shared) are a great addition to the workspace. Left inline comments covering:
- A2UI v1.0 support (
$defs/Childsingle-child slots, inlinecreateSurface.components, andmergedActiveCatalog()) - Restored
DOCKVIEW_LAYOUTmigration for existing users, cross-surfacecollapsedkey collisions, and WAI-ARIArole="tree"/ keyboard accessibility - Repo conventions (DRY draft parsing & component collection,
Object.hasOwn$defsguard,ReferenceSchemacaching) - Missing test coverage per
.agents/rules/testing_and_qa_workflow.md(ComponentTreehas nocomponent-tree.spec.tsor CDKComponentHarnessin this PR, missingMAX_NODEStruncation & layout-migration unit tests, and missing Playwright E2E journey)
(Stack note: this PR targets main so #329's commits appear in the diff, and #331 branched from d4183aa4 prior to b706cecd — stacking base branches or rebasing #331 onto #330 will avoid duplicate diffs and a conflict in component-tree.ng.html.)
|
When a component is selected in the Component Tree, is there any way we could highlight that component in the Rendered view? |
b706cec to
606c9bd
Compare
Will address highlighting in a follow up since it involves renderer changes. |
606c9bd to
8ee50f6
Compare
Description
buildComponentTrees(component-tree-builder.ts) to expand A2UI v0.9 surface messages into a hierarchical component tree from therootcomponent usingComponentIdandChildList$refdefinitions from the active catalog schema (with fallback tochild/children).missing), ancestor reference loops (cycle), multiply-referenced components (shared), data-bound template children (each <path>), and components unreachable fromroot.ComponentTreeAngular component (component-tree.ts,component-tree.ng.html,component-tree.scss) with collapsible tree nodes, status badges, and diagnostic tooltips.ComposerPanelId.ComponentTreeinComposerDockviewand mount theComponent Treetab alongsideRendered A2UI PreviewandA2UI JSON Editorin the default workspace layout.Pre-launch Checklist