From c1c1e030eea65dcfdb4201b8046c5938cc49a761 Mon Sep 17 00:00:00 2001 From: KevinDavilaDotCMS <144152756+KevinDavilaDotCMS@users.noreply.github.com> Date: Fri, 15 Sep 2023 08:11:44 -0500 Subject: [PATCH] fix(containers): [Containers] : Fix #25808 UI Issues in the Portlet * Fixed UI issues on containers portlet * Fixed UI issues on Containers portlet * Removed important sentence on scss files --------- Co-authored-by: Kevin D Co-authored-by: Freddy Montes <751424+fmontes@users.noreply.github.com> --- .../dot-add-variable.component.html | 5 +- .../dot-add-variable.component.scss | 4 + .../dot-container-code.component.html | 44 ++++------- .../dot-container-code.component.scss | 15 +++- .../dot-container-properties.component.html | 79 +++++++------------ .../dot-container-properties.component.scss | 16 ++-- .../dot-loop-editor.component.scss | 2 +- .../dot-loop-editor.component.ts | 4 - .../dot-content-type-selector.component.html | 2 +- .../ai-content-prompt.component.html | 9 +-- 10 files changed, 74 insertions(+), 106 deletions(-) diff --git a/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-code/dot-add-variable/dot-add-variable.component.html b/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-code/dot-add-variable/dot-add-variable.component.html index b4f78bd5253a..b559b56c924c 100644 --- a/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-code/dot-add-variable/dot-add-variable.component.html +++ b/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-code/dot-add-variable/dot-add-variable.component.html @@ -11,12 +11,11 @@

{{ variable?.name }}

+ pButton> diff --git a/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-code/dot-add-variable/dot-add-variable.component.scss b/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-code/dot-add-variable/dot-add-variable.component.scss index 8357477e5a46..bb038cec4453 100644 --- a/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-code/dot-add-variable/dot-add-variable.component.scss +++ b/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-code/dot-add-variable/dot-add-variable.component.scss @@ -26,4 +26,8 @@ flex-basis: 100%; padding: $spacing-3 $spacing-6; justify-content: space-between; + + button { + align-self: center; + } } diff --git a/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-code/dot-container-code.component.html b/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-code/dot-container-code.component.html index aa967c229630..112577e54b62 100644 --- a/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-code/dot-container-code.component.html +++ b/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-code/dot-container-code.component.html @@ -1,8 +1,8 @@
- +
+ (onClose)="removeItem($event.index)"> + (click)="handleTabClick($event); actionsMenu.toggle($event)"> @@ -26,23 +24,20 @@
+ class="dot-container-code__empty-content flex justify-content-center align-items-center flex-column">
+ data-testId="empty-content-title"> {{ 'message.containers.empty.content_type_message' | dm }}
+ data-testId="empty-content-subtitle"> {{ 'message.containers.empty.content_type_need_help' | dm }}? - {{ - 'message.containers.empty.content_type_go_to_documentation' | dm - }} + + {{ 'message.containers.empty.content_type_go_to_documentation' | dm }} +
@@ -50,24 +45,18 @@ + formArrayName="containerStructures"> - - {{ contentTypeNamesById[containerContent.value.structureId] }} - - - - + {{ contentTypeNamesById[containerContent.value.structureId] }} +
+ pButton> + language="html">
diff --git a/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-code/dot-container-code.component.scss b/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-code/dot-container-code.component.scss index 7e9ed26e7d06..e383e530fe93 100644 --- a/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-code/dot-container-code.component.scss +++ b/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-code/dot-container-code.component.scss @@ -28,6 +28,7 @@ .p-tabview { height: 100%; } + .p-tabview-panels { height: 100%; flex-grow: 1; @@ -38,6 +39,7 @@ .p-tabview-nav-content { border: 1px solid $input-border-color; } + .p-tabview-nav { padding: 0; } @@ -64,10 +66,6 @@ background: $color-palette-gray-200; } - .p-tabview .p-tabview-nav { - border: none; - } - .p-tabview .p-tabview-nav li.p-highlight .p-tabview-nav-link { border-bottom: 2px solid $color-palette-secondary-500; } @@ -76,9 +74,18 @@ border-bottom: 2px solid $color-palette-secondary-500; } + .p-tabview + .p-tabview-nav + li:not(.p-highlight):not(.p-disabled):hover:first-child + .p-tabview-nav-link { + border-bottom: none; + background: $color-palette-primary-500; + } + .p-tabview .p-tabview-nav li .p-tabview-nav-link { padding-left: $spacing-4; padding-right: $spacing-4; + text-wrap: nowrap; } .p-tabview .tab-panel-btn a.p-tabview-nav-link { diff --git a/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-properties/dot-container-properties.component.html b/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-properties/dot-container-properties.component.html index 6f802b9496f0..6ce43c91ab0f 100644 --- a/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-properties/dot-container-properties.component.html +++ b/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-properties/dot-container-properties.component.html @@ -2,52 +2,40 @@
+ type="button"> + type="submit">
- - - - - - - - - {{ 'message.containers.create.click_to_edit' | dm }} - {{ - form?.value?.title - }} - - - - +
+ +
+ + +
+
+ [@contentTypeAnimation]> + formControlName="preLoop"> + label="post_loop">
@@ -113,8 +95,7 @@ [show]="['code']" data-testId="code" formControlName="code" - language="html" - > + language="html">
diff --git a/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-properties/dot-container-properties.component.scss b/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-properties/dot-container-properties.component.scss index c5cda76f86f7..a58212108e1e 100644 --- a/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-properties/dot-container-properties.component.scss +++ b/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-container-properties/dot-container-properties.component.scss @@ -2,7 +2,7 @@ .dot-container-properties__button-container { position: absolute; - top: 5.1rem; + top: 4.4rem; right: $spacing-4; button { @@ -17,14 +17,10 @@ padding: $spacing-2 0; align-items: center; - ::ng-deep .p-inplace.p-component { + &-content { display: flex; align-items: center; - justify-content: center; - } - - ::ng-deep .p-inplace-display { - padding: 0.67rem $spacing-3; + gap: $spacing-2; } } @@ -35,7 +31,6 @@ } .dot-container-properties__max-contents-input { - width: 7rem; margin-right: $spacing-2; } @@ -52,8 +47,9 @@ } :host ::ng-deep { - .tab-panel-btn { - background: $brand-background; + .tab-panel-btn, + .tab-panel-btn:hover { + background: $color-palette-primary-500; a.p-tabview-nav-link { padding: 0; diff --git a/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-loop-editor/dot-loop-editor.component.scss b/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-loop-editor/dot-loop-editor.component.scss index 8404362b0d97..13654bee3080 100644 --- a/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-loop-editor/dot-loop-editor.component.scss +++ b/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-loop-editor/dot-loop-editor.component.scss @@ -10,6 +10,6 @@ align-items: center; justify-content: center; background: #e9ebfc; - height: 140px; + height: 167px; } } diff --git a/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-loop-editor/dot-loop-editor.component.ts b/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-loop-editor/dot-loop-editor.component.ts index f2779d942311..a83700ccfcbf 100644 --- a/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-loop-editor/dot-loop-editor.component.ts +++ b/core-web/apps/dotcms-ui/src/app/portlets/dot-containers/dot-container-create/dot-loop-editor/dot-loop-editor.component.ts @@ -26,10 +26,6 @@ export class DotLoopEditorComponent implements ControlValueAccessor, OnInit { public readonly loopControl = new FormControl(''); - constructor() { - // - } - public ngOnInit(): void { this.loopControl.valueChanges.subscribe((fieldVal) => { this._onChange(fieldVal); diff --git a/core-web/apps/dotcms-ui/src/app/view/components/dot-content-type-selector/dot-content-type-selector.component.html b/core-web/apps/dotcms-ui/src/app/view/components/dot-content-type-selector/dot-content-type-selector.component.html index 89f3df9e3558..5e80676c6441 100644 --- a/core-web/apps/dotcms-ui/src/app/view/components/dot-content-type-selector/dot-content-type-selector.component.html +++ b/core-web/apps/dotcms-ui/src/app/view/components/dot-content-type-selector/dot-content-type-selector.component.html @@ -1,6 +1,6 @@ + autocomplete="off"> + placeholder="Ask AI to write something" /> Pending @@ -23,8 +21,7 @@ class="p-button-rounded p-button-text" pButton type="submit" - icon="pi pi-send" - > + icon="pi pi-send">