From f82344e0dd12419e14e4807a9e3d2683540b80bf Mon Sep 17 00:00:00 2001 From: sdarbinyan Date: Wed, 15 Jul 2026 07:55:38 +0400 Subject: [PATCH] feat(project-editor): adopt Design System primitives across editor sections Applied app-input/app-form-field/app-button to 9 of 11 Project Editor sections: general, branding, theme, footer, homepage, widgets, languages, navigation, preview. header and features sections were left unchanged - they contain only checkboxes and selects, and no Checkbox/Select primitive exists yet. Theme section's 8 color pickers stay native (app-input's type union doesn't include 'color') but are now wrapped in app-form-field for consistent label/hint treatment. Added app-form-field.full grid-column rule to section.shared.scss (shared by all 11 sections) alongside the existing label.full rule, since the custom element doesn't match that selector. Production build green, arch:check passes. --- .../sections/branding-section.component.html | 32 +++++++------------ .../sections/branding-section.component.ts | 4 ++- .../sections/footer-section.component.html | 12 +++---- .../sections/footer-section.component.ts | 4 ++- .../sections/general-section.component.html | 32 +++++++------------ .../sections/general-section.component.ts | 4 ++- .../sections/homepage-section.component.html | 2 +- .../sections/homepage-section.component.ts | 3 +- .../sections/languages-section.component.html | 9 +++--- .../sections/languages-section.component.ts | 4 ++- .../navigation-section.component.html | 24 +++++++------- .../sections/navigation-section.component.ts | 4 ++- .../sections/preview-section.component.html | 6 ++-- .../sections/preview-section.component.ts | 3 +- .../sections/section.shared.scss | 3 +- .../sections/theme-section.component.html | 16 +++++----- .../sections/theme-section.component.ts | 3 +- .../sections/widgets-section.component.html | 12 +++---- .../sections/widgets-section.component.ts | 3 +- 19 files changed, 89 insertions(+), 91 deletions(-) diff --git a/src/app/features/project-editor/sections/branding-section.component.html b/src/app/features/project-editor/sections/branding-section.component.html index 2ce1298..967cf0b 100644 --- a/src/app/features/project-editor/sections/branding-section.component.html +++ b/src/app/features/project-editor/sections/branding-section.component.html @@ -2,26 +2,18 @@

{{ 'builder.branding' | translate }}

- - - - + + + + + + + + + + + +
} diff --git a/src/app/features/project-editor/sections/branding-section.component.ts b/src/app/features/project-editor/sections/branding-section.component.ts index 90ebf72..6b0704d 100644 --- a/src/app/features/project-editor/sections/branding-section.component.ts +++ b/src/app/features/project-editor/sections/branding-section.component.ts @@ -2,11 +2,13 @@ import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { ProjectEditorFacade } from '../facade/project-editor.facade'; import { TranslatePipe } from '../../../i18n/translate.pipe'; +import { InputComponent } from '../../../shared/ui/input/input.component'; +import { FormFieldComponent } from '../../../shared/ui/form-field/form-field.component'; @Component({ selector: 'app-project-editor-branding-section', standalone: true, - imports: [FormsModule, TranslatePipe], + imports: [FormsModule, TranslatePipe, InputComponent, FormFieldComponent], templateUrl: './branding-section.component.html', styleUrls: ['./section.shared.scss'], changeDetection: ChangeDetectionStrategy.OnPush diff --git a/src/app/features/project-editor/sections/footer-section.component.html b/src/app/features/project-editor/sections/footer-section.component.html index 988b2ad..db72d84 100644 --- a/src/app/features/project-editor/sections/footer-section.component.html +++ b/src/app/features/project-editor/sections/footer-section.component.html @@ -2,14 +2,14 @@

{{ 'builder.footer' | translate }}

- - - - - + + + + + - +
} diff --git a/src/app/features/project-editor/sections/footer-section.component.ts b/src/app/features/project-editor/sections/footer-section.component.ts index 46e7c7a..5088d3c 100644 --- a/src/app/features/project-editor/sections/footer-section.component.ts +++ b/src/app/features/project-editor/sections/footer-section.component.ts @@ -2,11 +2,13 @@ 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 { InputComponent } from '../../../shared/ui/input/input.component'; +import { FormFieldComponent } from '../../../shared/ui/form-field/form-field.component'; @Component({ selector: 'app-project-editor-footer-section', standalone: true, - imports: [FormsModule, TranslatePipe], + imports: [FormsModule, TranslatePipe, InputComponent, FormFieldComponent], templateUrl: './footer-section.component.html', styleUrls: ['./section.shared.scss'], changeDetection: ChangeDetectionStrategy.OnPush diff --git a/src/app/features/project-editor/sections/general-section.component.html b/src/app/features/project-editor/sections/general-section.component.html index b7401b2..fc857ef 100644 --- a/src/app/features/project-editor/sections/general-section.component.html +++ b/src/app/features/project-editor/sections/general-section.component.html @@ -2,31 +2,23 @@

{{ 'builder.general' | translate }}

- - + + + + + + - - + + + + + +
} diff --git a/src/app/features/project-editor/sections/general-section.component.ts b/src/app/features/project-editor/sections/general-section.component.ts index 8e2d522..4c146c7 100644 --- a/src/app/features/project-editor/sections/general-section.component.ts +++ b/src/app/features/project-editor/sections/general-section.component.ts @@ -2,11 +2,13 @@ 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 { InputComponent } from '../../../shared/ui/input/input.component'; +import { FormFieldComponent } from '../../../shared/ui/form-field/form-field.component'; @Component({ selector: 'app-project-editor-general-section', standalone: true, - imports: [FormsModule, TranslatePipe], + imports: [FormsModule, TranslatePipe, InputComponent, FormFieldComponent], templateUrl: './general-section.component.html', styleUrls: ['./section.shared.scss'], changeDetection: ChangeDetectionStrategy.OnPush diff --git a/src/app/features/project-editor/sections/homepage-section.component.html b/src/app/features/project-editor/sections/homepage-section.component.html index d5c32d5..c78da56 100644 --- a/src/app/features/project-editor/sections/homepage-section.component.html +++ b/src/app/features/project-editor/sections/homepage-section.component.html @@ -24,7 +24,7 @@ diff --git a/src/app/features/project-editor/sections/homepage-section.component.ts b/src/app/features/project-editor/sections/homepage-section.component.ts index 40225f2..df83bd9 100644 --- a/src/app/features/project-editor/sections/homepage-section.component.ts +++ b/src/app/features/project-editor/sections/homepage-section.component.ts @@ -3,6 +3,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 { InputComponent } from '../../../shared/ui/input/input.component'; export interface LayoutStrategyOption { value: 'stack' | 'grid' | 'hero' | 'carousel' | 'split'; @@ -13,7 +14,7 @@ export interface LayoutStrategyOption { @Component({ selector: 'app-project-editor-homepage-section', standalone: true, - imports: [DragDropModule, FormsModule, TranslatePipe], + imports: [DragDropModule, FormsModule, TranslatePipe, InputComponent], templateUrl: './homepage-section.component.html', styleUrls: ['./section.shared.scss'], changeDetection: ChangeDetectionStrategy.OnPush diff --git a/src/app/features/project-editor/sections/languages-section.component.html b/src/app/features/project-editor/sections/languages-section.component.html index 57e317a..225f4a5 100644 --- a/src/app/features/project-editor/sections/languages-section.component.html +++ b/src/app/features/project-editor/sections/languages-section.component.html @@ -5,13 +5,12 @@ {{ 'builder.languagesTabDesc' | translate }}
- - + {{ 'builder.addLanguage' | translate }}
{{ 'builder.newLanguageDesc' | translate }} @@ -24,8 +23,8 @@ @if (code === defaultLocale()) { {{ 'builder.defaultLanguageLabel' | translate }} } @else { - - + {{ 'builder.setDefaultLanguage' | translate }} + {{ 'builder.removeLanguage' | translate }} } diff --git a/src/app/features/project-editor/sections/languages-section.component.ts b/src/app/features/project-editor/sections/languages-section.component.ts index 276d4b7..c3a7123 100644 --- a/src/app/features/project-editor/sections/languages-section.component.ts +++ b/src/app/features/project-editor/sections/languages-section.component.ts @@ -2,11 +2,13 @@ import { ChangeDetectionStrategy, Component, computed, inject, signal } from '@a import { FormsModule } from '@angular/forms'; import { ProjectEditorFacade } from '../facade/project-editor.facade'; import { TranslatePipe } from '../../../i18n/translate.pipe'; +import { ButtonComponent } from '../../../shared/ui/button/button.component'; +import { InputComponent } from '../../../shared/ui/input/input.component'; @Component({ selector: 'app-project-editor-languages-section', standalone: true, - imports: [FormsModule, TranslatePipe], + imports: [FormsModule, TranslatePipe, ButtonComponent, InputComponent], templateUrl: './languages-section.component.html', styleUrls: ['./section.shared.scss'], changeDetection: ChangeDetectionStrategy.OnPush diff --git a/src/app/features/project-editor/sections/navigation-section.component.html b/src/app/features/project-editor/sections/navigation-section.component.html index 51011c3..3199f69 100644 --- a/src/app/features/project-editor/sections/navigation-section.component.html +++ b/src/app/features/project-editor/sections/navigation-section.component.html @@ -1,7 +1,7 @@

{{ 'builder.navigationHeader' | translate }}

- + {{ 'builder.addLink' | translate }}
@@ -10,14 +10,14 @@

{{ labelOf(item) }}

- - - + + + {{ 'builder.removeLink' | translate }}
- - + +
@@ -27,7 +27,7 @@

{{ 'builder.navigationFooter' | translate }}

@if (footerLinks(); as footer) { - + {{ 'builder.addLink' | translate }} }
@@ -38,14 +38,14 @@

{{ labelOf(item) }}

- - - + + + {{ 'builder.removeLink' | translate }}
- - + +
diff --git a/src/app/features/project-editor/sections/navigation-section.component.ts b/src/app/features/project-editor/sections/navigation-section.component.ts index 9e6e146..03f1f8f 100644 --- a/src/app/features/project-editor/sections/navigation-section.component.ts +++ b/src/app/features/project-editor/sections/navigation-section.component.ts @@ -3,11 +3,13 @@ import { FormsModule } from '@angular/forms'; import { ProjectEditorFacade } from '../facade/project-editor.facade'; import { TranslatePipe } from '../../../i18n/translate.pipe'; import { NavigationItemConfig } from '../../../shared/models/config'; +import { ButtonComponent } from '../../../shared/ui/button/button.component'; +import { InputComponent } from '../../../shared/ui/input/input.component'; @Component({ selector: 'app-project-editor-navigation-section', standalone: true, - imports: [FormsModule, TranslatePipe], + imports: [FormsModule, TranslatePipe, ButtonComponent, InputComponent], templateUrl: './navigation-section.component.html', styleUrls: ['./section.shared.scss'], changeDetection: ChangeDetectionStrategy.OnPush diff --git a/src/app/features/project-editor/sections/preview-section.component.html b/src/app/features/project-editor/sections/preview-section.component.html index 9c76ab3..1862e9b 100644 --- a/src/app/features/project-editor/sections/preview-section.component.html +++ b/src/app/features/project-editor/sections/preview-section.component.html @@ -1,9 +1,9 @@

{{ 'builder.preview' | translate }}

- - - + {{ 'builder.livePreview' | translate }} + {{ 'builder.exportBootstrap' | translate }} + {{ 'builder.importBootstrap' | translate }}
@if (importError()) {

{{ importError()! | translate }}

diff --git a/src/app/features/project-editor/sections/preview-section.component.ts b/src/app/features/project-editor/sections/preview-section.component.ts index 8347cc3..410a669 100644 --- a/src/app/features/project-editor/sections/preview-section.component.ts +++ b/src/app/features/project-editor/sections/preview-section.component.ts @@ -2,11 +2,12 @@ import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/cor import { FormsModule } from '@angular/forms'; import { ProjectEditorFacade } from '../facade/project-editor.facade'; import { TranslatePipe } from '../../../i18n/translate.pipe'; +import { ButtonComponent } from '../../../shared/ui/button/button.component'; @Component({ selector: 'app-project-editor-preview-section', standalone: true, - imports: [FormsModule, TranslatePipe], + imports: [FormsModule, TranslatePipe, ButtonComponent], templateUrl: './preview-section.component.html', styleUrls: ['./section.shared.scss'], changeDetection: ChangeDetectionStrategy.OnPush diff --git a/src/app/features/project-editor/sections/section.shared.scss b/src/app/features/project-editor/sections/section.shared.scss index 70cecd3..71bae23 100644 --- a/src/app/features/project-editor/sections/section.shared.scss +++ b/src/app/features/project-editor/sections/section.shared.scss @@ -39,7 +39,8 @@ label { font-weight: 600; } -label.full { +label.full, +app-form-field.full { grid-column: 1 / -1; } diff --git a/src/app/features/project-editor/sections/theme-section.component.html b/src/app/features/project-editor/sections/theme-section.component.html index 8632ef6..b79bcbb 100644 --- a/src/app/features/project-editor/sections/theme-section.component.html +++ b/src/app/features/project-editor/sections/theme-section.component.html @@ -2,14 +2,14 @@

{{ 'builder.theme' | translate }}

- - - - - - - - + + + + + + + +