Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
28c1a76
Extract property editor to a standalone component
dustinwhuang Nov 11, 2026
5b7ac86
Fix test
dustinwhuang Nov 11, 2026
12d1f16
Add emitStatus parameter to editProperty
dustinwhuang Nov 16, 2026
91a4f6b
Remove unused input bindings
dustinwhuang Nov 16, 2026
9250ddd
Revise EditableProperty
dustinwhuang Nov 16, 2026
f0828e4
Modify gallery harness to use property editor harness
dustinwhuang Nov 17, 2026
a320ee9
Remove propertyChange output
dustinwhuang Nov 17, 2026
c06f4ac
Use mergedActiveCatalog before falling back to activeCatalog
dustinwhuang Nov 18, 2026
035407a
Rename property-editor-utils to property-control
dustinwhuang Nov 18, 2026
1f20255
Update property-control imports
dustinwhuang Nov 18, 2026
8338993
Add optional input for empty state placeholder message
dustinwhuang Nov 18, 2026
ca4ea72
Add instance specific idPrefixes
dustinwhuang Nov 18, 2026
887b1fa
Add missing test cases
dustinwhuang Nov 18, 2026
638baa5
Add component tree
dustinwhuang Nov 13, 2026
6049908
Add aria level to tree row
dustinwhuang Nov 14, 2026
12a3a50
Remove tree roles
dustinwhuang Nov 17, 2026
3a9dc41
Add component tree to saved layouts
dustinwhuang Nov 17, 2026
161d446
Prefix node keys with surfaceId
dustinwhuang Nov 17, 2026
b534a04
Seed state.components in createSurface
dustinwhuang Nov 18, 2026
f816f2c
Add Child matching to referenceKindOf
dustinwhuang Nov 18, 2026
3d08957
Add mergedActiveCatalog
dustinwhuang Nov 18, 2026
e4a4eb5
Guard $defs with Object.hasOwn and support #/definitions/ prefix
dustinwhuang Nov 18, 2026
fd91d63
Fix docs, memoize ReferenceSchema, add parsedDraft signal
dustinwhuang Nov 19, 2026
2f51f6a
Add fallback item label
dustinwhuang Nov 19, 2026
8ee50f6
Add missing tests, e2e test
dustinwhuang Nov 19, 2026
c6d78ab
Fall back to child/children slots for stub schemas in ReferenceSchema
dustinwhuang Nov 25, 2026
d67de38
Treat blank drafts as empty message lists in ComponentTree
dustinwhuang Nov 26, 2026
05488cd
Add component tree
dustinwhuang Nov 17, 2026
1e2f38b
Open property editor on node select
dustinwhuang Nov 26, 2026
dec930c
Add property editor to saved layouts
dustinwhuang Nov 17, 2026
c62a203
Fix broken tests after rebase
dustinwhuang Nov 19, 2026
a6f1f6a
Move unreachable nodes to their own tree
dustinwhuang Nov 26, 2026
1b27613
Disable property editor while chat is streaming
dustinwhuang Nov 19, 2026
28fa150
Change toggle button to span
dustinwhuang Nov 19, 2026
0e4f2b3
Add showHeader and showStatus options to property editor
dustinwhuang Nov 19, 2026
ae78ad3
Re-resolve selection when tree() changes
dustinwhuang Nov 19, 2026
e27acd3
Add missing getSurfaceComponent test for v1.0
dustinwhuang Nov 19, 2026
44aebb8
Scope PropertyEditor resetKey by occurrence key and draft revision
dustinwhuang Nov 19, 2026
419bf5b
Export TreeNodeRef and refine JSDoc
dustinwhuang Nov 19, 2026
0996b00
Fix selected signal encapsulation violation and session reset clearin…
dustinwhuang Nov 19, 2026
31c7a2b
Skip no-op updateDraft calls & throttle text input side effects
dustinwhuang Nov 19, 2026
b47e699
Add first/last node keyboard navigation via Home/End
dustinwhuang Nov 19, 2026
6e88582
Invert shared badge color when selected
dustinwhuang Nov 19, 2026
0d402bc
Remove host-context in favor of gallery specific styles
dustinwhuang Nov 20, 2026
dd7549e
Add missing test coverage
dustinwhuang Nov 20, 2026
53292f3
Track and check lastPropertyEdit before bumping draftRevision
dustinwhuang Nov 25, 2026
5db0910
Remove statusMessage binding in workspace
dustinwhuang Nov 25, 2026
81a5b60
Retain committed edit in PropertyEditor until next render
dustinwhuang Nov 25, 2026
4ecc2d8
Merge branch 'main' into open-property-editor
dustinwhuang Dec 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions shell/e2e/component-tree.e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
/**
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import {expect, test} from './fixtures';
import {previewFrame} from '../src/app/preview/testing/preview-frame-locators';
import {RENDERER_URLS} from '../src/app/preview/testing/renderer-urls';
import {getMonacoContent, resetStorageOnce} from './helpers';

test.beforeEach(async ({page}) => {
await resetStorageOnce(page, {
a2ui_composer_force_1p: 'true',
});
});

test.describe('Component Tree Panel', () => {
test('opens Component Tree tab and renders collapsible surface hierarchy', async ({page}) => {
const pageErrors: string[] = [];
page.on('pageerror', error => pageErrors.push(error.message));

await page.goto(`/?renderer=${RENDERER_URLS.angular}`);
await expect(previewFrame(page).getByRole('button', {name: 'Search Cars'})).toBeVisible();

await page.locator('.dv-tab', {hasText: /^Component Tree/}).click();

const treeContainer = page.locator('a2ui-composer-component-tree .component-tree-container');
await expect(treeContainer).toBeVisible();
await expect(treeContainer.locator('.surface-header')).toContainText('sample-surface');
await expect(treeContainer.locator('.surface-header')).toContainText('7 components');

const rowIds = treeContainer.locator('.tree-row .id');
await expect(rowIds).toHaveText([
'#root',
'#title',
'#location_input',
'#pickup_input',
'#dropoff_input',
'#book_button',
'#book_button_text',
]);

const bookButtonToggle = treeContainer
.locator('.tree-row', {hasText: '#book_button'})
.first()
.locator('.toggle');
await bookButtonToggle.click();
await expect(rowIds).toHaveText([
'#root',
'#title',
'#location_input',
'#pickup_input',
'#dropoff_input',
'#book_button',
]);

await bookButtonToggle.click();
await expect(rowIds).toHaveText([
'#root',
'#title',
'#location_input',
'#pickup_input',
'#dropoff_input',
'#book_button',
'#book_button_text',
]);
expect(pageErrors).toEqual([]);
});

test('selects a component from the tree, edits its property, and updates the preview and draft', async ({
page,
}) => {
const pageErrors: string[] = [];
page.on('pageerror', error => pageErrors.push(error.message));
await page.goto(`/?renderer=${RENDERER_URLS.angular}`);
await expect(previewFrame(page).getByRole('button', {name: 'Search Cars'})).toBeVisible();

await page.getByRole('tab', {name: 'Component Tree'}).click();
await page.getByRole('treeitem', {name: /#book_button_text/}).click();

await expect(page.getByRole('tab', {name: 'Property Editor', selected: true})).toBeVisible();
const propertyEditor = page.locator('a2ui-composer-property-editor');
await expect(propertyEditor.locator('[data-property-header]')).toContainText(
'Text #book_button_text',
);
const textInput = propertyEditor.getByRole('textbox', {name: 'text', exact: true});
await expect(textInput).toHaveValue('Search Cars');

await textInput.fill('Book Now');

await page.getByRole('tab', {name: 'Rendered A2UI Preview'}).click();
await expect(previewFrame(page).getByRole('button', {name: 'Book Now'})).toBeVisible();
await expect
.poll(async () => {
const draft: unknown = JSON.parse(await getMonacoContent(page));
return draft;
})
.toEqual(
expect.arrayContaining([
expect.objectContaining({
updateComponents: expect.objectContaining({
components: expect.arrayContaining([
{
id: 'book_button_text',
component: 'Text',
text: 'Book Now',
variant: 'body',
},
]),
}),
}),
]),
);
expect(pageErrors).toEqual([]);
});
});
6 changes: 3 additions & 3 deletions shell/e2e/workspace-layout-recovery.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ for (const invalidState of ['retired panel', 'mismatched panel ID']) {

await page.goto(`/?renderer=${rendererUrl}`);
await expect(page.locator('.workspace-container')).toBeVisible();
await expect(page.locator('.dv-tab')).toHaveCount(7);
await expect(page.locator('.dv-tab')).toHaveCount(9);
await expect(page.locator('.dv-tab', {hasText: /^Rendered A2UI Preview/})).toBeVisible();

const preview = previewFrame(page);
Expand Down Expand Up @@ -139,8 +139,8 @@ test('resets modified dockview layout back to default when clicking Reset Layout
);
await expect(page.locator('.dv-tab', {hasText: /^Data Model/})).toHaveClass(/dv-active-tab/);

// Verify all 7 tabs are present
await expect(page.locator('.dv-tab')).toHaveCount(7);
// Verify all 9 tabs are present
await expect(page.locator('.dv-tab')).toHaveCount(9);

// Verify DOCKVIEW_LAYOUT was cleared from localStorage
const savedLayout = await page.evaluate(
Expand Down
Loading