Skip to content

Commit

Permalink
Custom composite question types do not display correctly in Creator (#…
Browse files Browse the repository at this point in the history
…5268)

* Corrected translation for question numbering in italian.ts (#5261)

Co-authored-by: Andrew <andrew.telnov@gmail.com>

* Custom composite question types do not display correctly in Creator
Fixes #5247

* #5247 - redefine css for complex questions

* #5247 - matrices and panels

* #5247 - use class for composite question

* #5247 Custom composite question types do not display correctly in Creator - update screenshot
Fixes #5247

---------

Co-authored-by: Andrew <andrew.telnov@gmail.com>
  • Loading branch information
novikov82 and andrewtelnov committed Feb 27, 2024
1 parent 9186bf2 commit c7d3cf9
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/survey-creator-core/src/components/question.scss
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,15 @@ svc-question,
padding-right: calcSize(5);
overflow-x: auto;
}

.sd-composite {
.sd-question__content {
margin-left: 0;
margin-right: 0;
padding-left: 0;
padding-right: 0;
}
}
}

.svc-question__content--ranking {
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions visualRegressionTests/tests/designer/surface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1921,4 +1921,48 @@ test("Check minimal height", async (t) => {
})();
await takeElementScreenshot("creator-min-height.png", root, t, comparer);
});
});

test("Composite question - check no scroll", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await ClientFunction(() => {
window["Survey"].ComponentCollection.Instance.add({
name: "fullname",
title: "Full Name",
elementsJSON: [
{
type: "text",
name: "firstName",
title: "First Name",
isRequired: true,
minWidth: 200
},
{
type: "text",
name: "lastName",
title: "Last Name",
isRequired: true,
minWidth: 200,
startWithNewLine: false,
}
],
});
})();
await t.resizeWindow(1120, 900);
await setJSON({
"pages": [
{
"name": "page1",
"elements": [
{
"type": "fullname",
"name": "question1"
}
]
}
]
});
await t.hover(".sd-input.sd-text");
await takeElementScreenshot("composite-question-no-scroll.png", Selector(".svc-question__adorner"), t, comparer);
});
});

0 comments on commit c7d3cf9

Please sign in to comment.