feat(edit-content): auto-populate Site/Folder field when relating content#35154
feat(edit-content): auto-populate Site/Folder field when relating content#35154
Conversation
|
Claude finished @oidacra's task in 2m 21s —— View job Code Review (updated)
Issue 1 is fixed — Issue 2 is still present —
effect(() => {
const valueToSave = this.store.valueToSave();
this.onChange(valueToSave || '');
});
Misleading test at it('should write value to form control', () => {
spectator.detectChanges();
component.writeValue(testValue); // testValue = 'test-site-id' — no colon
expect(component.siteControl.value).toBe('');
});
AC2 unverified — no auto-search on init
Minor —
Summary: The blocking visual-selection bug is fixed. The form-dirty side effect from |
|
Claude finished @oidacra's task in 2m 35s —— View job Code Review
Issue 1 —
|
…arch - Set siteControl to TreeNodeItem in writeValue so PrimeNG TreeSelect displays the pre-selected site correctly - Add store.nodeSelected fallback in getSiteDisplayLabel to show hostname instead of raw UUID in filter chips - Remove doSearch() from ngAfterViewInit to avoid race condition with initLoad that was causing double data loading
…ch preselection When the content type has a Host/Folder field, use the contentlet's host/folder value to pre-populate the relationship dialog's Site/Folder filter instead of the GlobalStore current site. Supports both site and folder preselection. Falls back to GlobalStore when no HOST_FOLDER field. Routes data through ExistingContentStore instead of DynamicDialogConfig since template components (HeaderComponent) don't inherit the dialog's custom injector.
Summary
dot-tags-createcomponent — readsGlobalStore.siteDetails()synchronously, no new HTTP requestsCloses #33529
Changes
search.component.tssiteOrFolderIdform field inngAfterViewInit, trigger initial filtered searchsite-field.component.tswriteValue()to handle programmaticsite:{id}valuessite-field.store.tssetInitialSelection(id, type, label)method to create synthetic TreeNodeItemsearch.component.spec.tssite-field.component.spec.tswriteValuewith site and folder valuessite-field.store.spec.tssetInitialSelectionmethodAcceptance Criteria
Test Plan
Visual Changes