feat(project-editor): live inline validation and publish gating
Milestone 3 of the Configuration Engine sprint. - Facade fieldError(key) accessor over issuesByField for inline field errors. - Bind [error] on schema-backed fields: theme palette colours, general name/domain, branding logo (translated via each section). - project-editor-nav: per-section blocking-issue count badge (issuesBySection). - save-bar: Publish now disabled on hasBlockingIssues() (errors only, so new warnings no longer block); issue list tags warning vs error severity. Editor verified rendering at /ru/edit/theme with the new nav + save bar; validation logic covered by the 25 unit tests. Gate: tsc --noEmit, npm test (25/25), arch:check, build all green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/c
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { ProjectEditorFacade } from '../facade/project-editor.facade';
|
||||
import { TranslatePipe } from '../../../i18n/translate.pipe';
|
||||
import { TranslateService } from '../../../i18n/translate.service';
|
||||
import { InputComponent } from '../../../shared/ui/input/input.component';
|
||||
import { FormFieldComponent } from '../../../shared/ui/form-field/form-field.component';
|
||||
import { SectionCardComponent } from '../../../shared/ui/section-card/section-card.component';
|
||||
@@ -16,7 +17,12 @@ import { SectionCardComponent } from '../../../shared/ui/section-card/section-ca
|
||||
})
|
||||
export class ProjectEditorGeneralSectionComponent {
|
||||
private readonly facade = inject(ProjectEditorFacade);
|
||||
private readonly translate = inject(TranslateService);
|
||||
readonly bootstrap = this.facade.bootstrap;
|
||||
readonly fieldError = (key: string): string | null => {
|
||||
const messageKey = this.facade.fieldError(key);
|
||||
return messageKey ? this.translate.t(messageKey) : null;
|
||||
};
|
||||
readonly languagesValue = computed(() => (this.bootstrap()?.localization.supportedLocales ?? []).join(', '));
|
||||
|
||||
updateMarketplaceName(value: string): void {
|
||||
|
||||
Reference in New Issue
Block a user