Skip to content

Commit

Permalink
PR: Themes Tab - The 'Yes, reset the theme' button appears beyond the…
Browse files Browse the repository at this point in the history
… popup window's boundaries (#7879)

* work for the surveyjs/survey-creator#5228

* work for the surveyjs/survey-creator#5228

* work for the surveyjs/survey-creator#5228

* work for the surveyjs/survey-creator#5228
  • Loading branch information
dmitry-kurmanov authored Feb 20, 2024
1 parent ff7ba46 commit b8569f8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/common-styles/sv-popup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,15 @@ sv-popup {

.sv-popup__body-content {
border-radius: calcSize(1);
max-width: min-content;
align-items: flex-end;
min-width: 452px;
}

.sv-popup__body-header {
color: $font-editorfont-color;
margin-bottom: 0;
align-self: self-start;

/* UI/Default */
font-family: $font-family;
Expand All @@ -107,6 +111,7 @@ sv-popup {

.sv-popup__body-footer {
padding-bottom: 0;
max-width: max-content;

.sv-action-bar {
gap: calcSize(2);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ export function showConfirmDialog(message: string, callback: (res: boolean) => v
cancelBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small";
applyBtn.title = applyTitle || surveyLocalization.getString("ok", locale);
applyBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger";
popupViewModel.width = "452px";
//popupViewModel.width = "452px";
return true;
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions visualRegressionTests/tests/defaultV2/paneldynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,13 @@ frameworks.forEach(framework => {
await t.pressKey(" a b c tab");
await t.click(Selector(".sd-paneldynamic__remove-btn"));
await takeElementScreenshot("paneldynamic-confirm-dialog", Selector(".sv-popup--confirm-delete .sv-popup__body-content"), t, comparer);

await ClientFunction(() => {
const applyButton = document.querySelector("#apply");
const spanText = applyButton?.querySelector("span");
spanText && (spanText.innerText = "A very long long long long long text");
})();
await takeElementScreenshot("paneldynamic-confirm-dialog--long-button-text", Selector(".sv-popup--confirm-delete .sv-popup__body-content"), t, comparer);
});
});
test("tab focused state for panel dynamic", async (t) => {
Expand Down

0 comments on commit b8569f8

Please sign in to comment.