Skip to content

Commit

Permalink
work for the #8389
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-kurmanov committed Jun 10, 2024
1 parent 38fda0f commit c3c4e16
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/defaultV2-theme/blocks/sd-dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
.sd-input.sd-dropdown:focus-within {
box-shadow: $shadow-inner-reset, 0 0 0 2px $primary;
}

.sd-input.sd-dropdown.sd-input--readonly {
box-shadow: none;
transition: none;
Expand Down Expand Up @@ -121,6 +122,12 @@
color: $font-editorfont-placeholdercolor;
}

.sd-dropdown--empty {
div {
min-height: multiply(1.5, $font-editorfont-size);
}
}

.sd-dropdown__filter-string-input::placeholder {
color: $foreground;
width: 100%;
Expand Down Expand Up @@ -166,6 +173,7 @@
.sd-question--preview .sd-dropdown_chevron-button {
display: none;
}

.sv-dropdown-popup {
.sd-list__item-body {
@include useEditorFontSize;
Expand Down
21 changes: 21 additions & 0 deletions visualRegressionTests/tests/defaultV2/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -677,4 +677,25 @@ frameworks.forEach(framework => {
});
});

test("Check dropdown readonly with empty placeholder", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(1280, 1100);
await initSurvey(framework, {
showQuestionNumbers: "off",
questions: [
{
"type": "dropdown",
"name": "q1",
placeholder: "",
readOnly: true,
"choices": ["item1", "item2"]
},
]
});

const emptyDropdown = Selector(".sd-dropdown--empty.sd-input--readonly").filterVisible();
await takeElementScreenshot("dropdown-readonly-empty-placeholder.png", emptyDropdown, t, comparer);
});
});

});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c3c4e16

Please sign in to comment.