Skip to content

Commit e3d9118

Browse files
committed
fix: incorrect overflow in grid widget settings action view
1 parent 33c4745 commit e3d9118

File tree

5 files changed

+69
-73
lines changed

5 files changed

+69
-73
lines changed

libs/shared/src/lib/components/widgets/grid-settings/grid-settings.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
</ng-container>
5757
<ng-template uiTabContent>
5858
<shared-tab-buttons
59+
class="flex flex-col h-full"
5960
[formGroup]="formGroup"
6061
[fields]="fields"
6162
[templates]="appTemplates"
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +0,0 @@
1-
:host {
2-
flex: 1;
3-
display: flex;
4-
max-width: 100%;
5-
}
Lines changed: 63 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,68 @@
1-
<div [formGroup]="formGroup" class="flex flex-col">
2-
<!-- Header -->
3-
<h2>
4-
{{ 'components.widget.settings.grid.buttons.title' | translate }}
5-
</h2>
6-
<!-- <ui-alert class="mb-4">
1+
<!-- Header -->
2+
<h2>
3+
{{ 'components.widget.settings.grid.buttons.title' | translate }}
4+
</h2>
5+
<!-- <ui-alert class="mb-4">
76
{{ 'components.widget.settings.grid.hint.buttons' | translate }}
87
</ui-alert> -->
9-
<!-- Add new button -->
10-
<ui-button
11-
class="self-end"
12-
icon="add"
13-
variant="primary"
14-
(click)="addButton($event)"
15-
>
8+
<!-- Add new button -->
9+
<div class="flex justify-end mb-4">
10+
<ui-button icon="add" variant="primary" (click)="addButton($event)">
1611
{{ 'components.widget.settings.grid.buttons.create' | translate }}
1712
</ui-button>
18-
<!-- Available buttons -->
19-
<ui-tabs
20-
*ngIf="buttons.length > 0"
21-
cdkDropListOrientation="horizontal"
22-
cdkDropList
23-
(cdkDropListDropped)="onReorder($event)"
24-
>
25-
<ui-tab *ngFor="let button of buttons.controls; let i = index" cdkDrag>
26-
<!-- Button label - tab label -->
27-
<ng-container ngProjectAs="label">
28-
<div class="flex items-center">
29-
<!-- Error indicator -->
30-
<ui-icon
31-
*ngIf="button.invalid"
32-
icon="error_outline"
33-
variant="danger"
34-
[size]="18"
35-
></ui-icon>
36-
<!-- Button name -->
37-
<span
38-
class="max-w-[100px] overflow-hidden text-ellipsis whitespace-nowrap"
39-
>{{
40-
button.value.name.length > 0
41-
? button.value.name
42-
: ('components.widget.settings.grid.buttons.defaultName'
43-
| translate)
44-
}}
45-
</span>
46-
<!-- Reorder -->
47-
<ui-button
48-
variant="grey"
49-
[isIcon]="true"
50-
size="small"
51-
cdkDragHandle
52-
icon="drag_indicator"
53-
class="draggable"
54-
[uiTooltip]="'models.page.tooltip.drag' | translate"
55-
>
56-
</ui-button>
57-
</div>
58-
</ng-container>
59-
<!-- Button form - tab content -->
60-
<shared-button-config
61-
[formGroup]="$any(button)"
62-
[fields]="fields"
63-
[channels]="channels"
64-
[templates]="templates"
65-
[distributionLists]="distributionLists"
66-
[relatedForms]="relatedForms"
67-
(deleteButton)="deleteButton(i)"
68-
>
69-
</shared-button-config>
70-
</ui-tab>
71-
</ui-tabs>
7213
</div>
14+
<!-- Available buttons -->
15+
<ui-tabs
16+
class="grow"
17+
*ngIf="buttons.length > 0"
18+
cdkDropListOrientation="horizontal"
19+
cdkDropList
20+
(cdkDropListDropped)="onReorder($event)"
21+
>
22+
<ui-tab *ngFor="let button of buttons.controls; let i = index" cdkDrag>
23+
<!-- Button label - tab label -->
24+
<ng-container ngProjectAs="label">
25+
<div class="flex items-center">
26+
<!-- Error indicator -->
27+
<ui-icon
28+
*ngIf="button.invalid"
29+
icon="error_outline"
30+
variant="danger"
31+
[size]="18"
32+
></ui-icon>
33+
<!-- Button name -->
34+
<span
35+
class="max-w-[100px] overflow-hidden text-ellipsis whitespace-nowrap"
36+
>{{
37+
button.value.name.length > 0
38+
? button.value.name
39+
: ('components.widget.settings.grid.buttons.defaultName'
40+
| translate)
41+
}}
42+
</span>
43+
<!-- Reorder -->
44+
<ui-button
45+
variant="grey"
46+
[isIcon]="true"
47+
size="small"
48+
cdkDragHandle
49+
icon="drag_indicator"
50+
class="draggable"
51+
[uiTooltip]="'models.page.tooltip.drag' | translate"
52+
>
53+
</ui-button>
54+
</div>
55+
</ng-container>
56+
<!-- Button form - tab content -->
57+
<shared-button-config
58+
[formGroup]="$any(button)"
59+
[fields]="fields"
60+
[channels]="channels"
61+
[templates]="templates"
62+
[distributionLists]="distributionLists"
63+
[relatedForms]="relatedForms"
64+
(deleteButton)="deleteButton(i)"
65+
>
66+
</shared-button-config>
67+
</ui-tab>
68+
</ui-tabs>

libs/shared/src/lib/components/widgets/tabs-settings/tabs-settings.component.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
<span>{{ 'common.tabs' | translate }}</span>
66
</ng-container>
77
<ng-template uiTabContent>
8-
<shared-tab-main [formGroup]="widgetForm"></shared-tab-main>
8+
<shared-tab-main
9+
class="flex flex-col h-full"
10+
[formGroup]="widgetForm"
11+
></shared-tab-main>
912
</ng-template>
1013
</ui-tab>
1114
<ui-tab>

libs/ui/src/lib/tabs/tabs.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
</div>
1818
<!-- The directive will display the content here -->
1919
<div
20+
[ngClass]="{ 'overflow-x-hidden': vertical }"
2021
class="flex-1"
2122
[@tabContentDisplay]="triggerAnimation ? 'initial' : 'loadContent'"
2223
>

0 commit comments

Comments
 (0)