Skip to content

Commit 132233c

Browse files
committed
Fix pages more button
1 parent 4bb47a6 commit 132233c

File tree

10 files changed

+53
-35
lines changed

10 files changed

+53
-35
lines changed

packages/survey-creator-core/src/components/action-container-view-model.ts

+16-12
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,23 @@ export class SurveyElementActionContainer extends AdaptiveActionContainer {
6464
this.setModeForActions(true);
6565
return;
6666
}
67+
if(this.visibleActions.length > 1) {
68+
this.visibleActions.forEach((item) => {
69+
if (item.id == "convertTo") {
70+
item.mode = "small";
71+
return;
72+
}
73+
if (item.id == "convertInputType") {
74+
item.mode = "removed";
75+
return;
76+
}
77+
item.mode = "popup";
78+
});
79+
this.dotsItem.visible = true;
80+
} else {
81+
this.visibleActions.forEach(i => i.mode = "small");
82+
}
6783

68-
this.visibleActions.forEach((item) => {
69-
if (item.id == "convertTo") {
70-
item.mode = "small";
71-
return;
72-
}
73-
if (item.id == "convertInputType") {
74-
item.mode = "removed";
75-
return;
76-
}
77-
item.mode = "popup";
78-
});
79-
this.dotsItem.visible = true;
8084
this.hiddenItemsListModel.setItems(items.filter(i => i.mode == "popup").map(i => i.innerItem));
8185
}
8286
}

packages/survey-creator-core/src/components/page.scss

+14-4
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,19 @@ svc-page {
109109
.sv-action {
110110
pointer-events: all;
111111
}
112+
& > .sv-dots {
113+
width: auto;
114+
.sv-dots__item {
115+
width: auto;
116+
}
117+
&.sv-action--hidden {
118+
width: 0;
119+
}
120+
.svc-list__item-icon {
121+
width: var(--ctr-list-item-icon-width-small, var(--sjs-font-size-x2));
122+
height: var(--ctr-list-item-icon-height-small, var(--sjs-font-size-x2));
123+
}
124+
}
112125
}
113126

114127
.svc-page-toolbar--collapse {
@@ -138,7 +151,7 @@ svc-page {
138151
var(--ctr-survey-question-panel-toolbar-gap, var(--lbr-spacing-x1)) / 2
139152
);
140153
margin: 0 var(--thm-survey-question-panel-toolbar-button-gap);
141-
border-radius: var(--ctr-survey-page-toolbar-item-corner-radius, var(--lbr-corner-radius-x05));
154+
border-radius: var(--ctr-survey-page-toolbar-item-corner-radius, var(--lbr-corner-radius-x075));
142155
padding: var(--thm-survey-question-panel-toolbar-item-padding-top)
143156
var(--thm-survey-question-panel-toolbar-item-padding-right)
144157
var(--thm-survey-question-panel-toolbar-item-padding-bottom)
@@ -171,7 +184,6 @@ svc-page {
171184
opacity: var(--ctr-survey-question-panel-toolbar-item-opacity-pressed, 0.5);
172185
use {
173186
fill: var(--ctr-menu-toolbar-button-icon-color, var(--sjs-layer-1-foreground-75, #000000bf));
174-
opacity: 0.5;
175187
}
176188
}
177189

@@ -264,8 +276,6 @@ svc-page {
264276
}
265277

266278
& > .svc-question__drag-area {
267-
z-index: 1;
268-
269279
.svc-question__drag-element {
270280
width: var(--ctr-survey-page-drag-indicator-width, var(--lbr-size-x3));
271281
height: var(--ctr-survey-page-drag-indicator-height, var(--lbr-size-x2));

packages/survey-creator-core/src/components/question.scss

+13-14
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ svc-question {
5656

5757
.svc-survey-element-toolbar__item {
5858
@include defaultActionButtonSettings;
59+
--thm-icon-color: var(--ctr-survey-question-panel-toolbar-item-icon-color, var(--sjs-secondary-background-500, #19b394ff));
5960
--thm-survey-question-panel-toolbar-button-gap: calc(
6061
var(--ctr-survey-question-panel-toolbar-gap, var(--lbr-spacing-x1)) / 2
6162
);
@@ -72,7 +73,7 @@ svc-question {
7273
background-color: transparent;
7374
transition: background $creator-transition-duration, opacity $creator-transition-duration;
7475
use {
75-
fill: var(--ctr-survey-question-panel-toolbar-item-icon-color, var(--sjs-secondary-background-500, #19b394ff));
76+
fill: var(--thm-icon-color);
7677
}
7778
//hovered and focused state
7879
&:hover,
@@ -84,10 +85,11 @@ svc-question {
8485
&:active,
8586
&.svc-survey-element-toolbar__item--pressed {
8687
opacity: var(--ctr-survey-question-panel-toolbar-item-opacity-pressed, 0.5);
87-
background-color: var(--ctr-survey-question-panel-toolbar-item-background-color-pressed, var(--sjs-layer-1-background-400, #f5f5f5ff));
88+
background-color: var(--ctr-survey-question-panel-toolbar-item-background-color-pressed,
89+
var(--sjs-layer-1-background-400, #f5f5f5ff));
90+
8891
use {
8992
fill: var(--ctr-menu-toolbar-button-icon-color, var(--sjs-layer-1-foreground-75, #000000bf));
90-
opacity: 0.45;
9193
}
9294
}
9395

@@ -144,9 +146,7 @@ svc-question {
144146
}
145147
}
146148

147-
148-
.svc-survey-element-toolbar-item__icon,
149-
.svc-survey-element-toolbar__dots-item .sv-svg-icon.sv-action-bar-item__icon {
149+
.svc-survey-element-toolbar-item__icon {
150150
box-sizing: border-box;
151151
display: block;
152152
padding: var(--ctr-survey-question-panel-toolbar-item-icon-padding-top, var(--lbr-spacing-x05))
@@ -388,11 +388,8 @@ svc-question {
388388
}
389389

390390
.svc-survey-element-toolbar-item__icon:last-child {
391+
--thm-icon-color: var(--sjs-primary-background-500, #19b394);
391392
margin-inline-start: 0;
392-
393-
use {
394-
fill: var(--sjs-primary-background-500, #19b394);
395-
}
396393
}
397394
}
398395

@@ -434,10 +431,12 @@ svc-question {
434431
var(--ctr-survey-question-panel-toolbar-item-icon-padding-bottom, var(--lbr-spacing-x05))
435432
);
436433
}
437-
438-
.svc-list__item:hover > .svc-list__item-body .sv-svg-icon use,
439-
.sv-svg-icon use {
440-
fill: var(--sjs-secondary-background-500, #19b394ff);
434+
.svc-list__item {
435+
&, &:hover {
436+
& > .svc-list__item-body .sv-svg-icon use {
437+
fill: var(--sjs-secondary-background-500, #19b394ff);
438+
}
439+
}
441440
}
442441
}
443442

packages/survey-creator-core/src/themes/predefined-themes/v2-24.css

+10-5
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@
431431
--ctr-list-item-icon-color-disabled: var(--sjs-layer-1-foreground-75);
432432
--ctr-editor-button-background-color-hovered: var(--sjs-layer-3-background-400);
433433
--ctr-survey-page-toolbar-item-background-color-hovered: var(--sjs-primary-background-10);
434-
--ctr-survey-page-toolbar-item-corner-radius: var(--lbr-corner-radius-x05);
434+
--ctr-survey-page-toolbar-item-corner-radius: var(--lbr-corner-radius-x075);
435435
--ctr-list-search-icon-color: var(--sjs-layer-1-foreground-75);
436436
--ctr-caption-with-actions-text-color: var(--sjs-layer-1-foreground-50);
437437
--ctr-label-text-color: var(--sjs-layer-1-foreground-50);
@@ -755,7 +755,7 @@
755755
--ctr-expression-item-background-color-button-hovered: var(--sjs-primary-background-500);
756756
--ctr-expression-item-border-color-editing: var(--sjs-semantic-blue-background-500);
757757
--ctr-expression-item-text-color-function: var(--sjs-layer-3-foreground-100);
758-
--ctr-data-table-background-color: var(--sjs-layer-1-background-400);
758+
--ctr-data-table-background-color: var(--sjs-layer-1-background-500);
759759
--ctr-data-table-border-color: var(--sjs-border-25);
760760
--ctr-data-table-border-width: var(--sjs-stroke-x1);
761761
--ctr-separator-width: var(--sjs-stroke-x1);
@@ -2778,8 +2778,8 @@
27782778
--lbr-step-progress-bar-padding-right-fit-to-survey-with-number: var(--lbr-spacing-x1n);
27792779
--lbr-step-progress-bar-width: var(--lbr-size-x80);
27802780
--ctr-toolbox-min-width: var(--sjs-size-x20);
2781-
--ctr-popup-menu-margin-top-tablet: var(--sjs-spacing-x8);
2782-
--ctr-popup-menu-margin-bottom-tablet: var(--sjs-spacing-x8);
2781+
--ctr-popup-menu-margin-top-tablet: var(--sjs-spacing-x3);
2782+
--ctr-popup-menu-margin-bottom-tablet: var(--sjs-spacing-x3);
27832783
--ctr-popup-menu-margin-left-tablet: var(--sjs-spacing-x3);
27842784
--ctr-popup-menu-margin-right-tablet: var(--sjs-spacing-x3);
27852785
--ctr-popup-menu-max-width-tablet: var(--sjs-size-x40);
@@ -2864,7 +2864,7 @@
28642864
--lbr-page-loading-padding-bottom: var(--lbr-spacing-x8);
28652865
--lbr-page-loading-loading-icon-width: var(--lbr-size-x12);
28662866
--lbr-page-loading-loading-icon-height: var(--lbr-size-x12);
2867-
--lbr-page-loading-loading-icon-circle-color: var(--sjs-layer-1-foreground-100);
2867+
--lbr-page-loading-loading-icon-circle-color: var(--sjs-layer-3-foreground-100);
28682868
--lbr-page-loading-loading-icon-circle-color-spin: var(--sjs-primary-background-500);
28692869
--lbr-page-loading-title-color: var(--sjs-layer-3-foreground-100);
28702870
--lbr-page-loading-padding-top: var(--lbr-spacing-x3);
@@ -3447,5 +3447,10 @@
34473447
--ctr-info-panel-padding-bottom: var(--sjs-spacing-x3);
34483448
--ctr-info-panel-corner-radius: var(--sjs-corner-radius-x1);
34493449
--ctr-info-panel-text-color-primary: var(--sjs-layer-3-foreground-100);
3450+
--ctr-surface-placeholder-image-max-width: var(--sjs-size-x43);
3451+
--lbr-popup-menu-background-color-global: var(--sjs-layer-3-background-500);
3452+
--lbr-list-item-text-color-action: var(--sjs-primary-background-500);
3453+
--ctr-list-item-icon-width-small: var(--sjs-font-size-x2);
3454+
--ctr-list-item-icon-height-small: var(--sjs-font-size-x2);
34503455
}
34513456

Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)