Skip to content

Commit

Permalink
Work for #7233: fix matrix with many columns inside panel (#7245)
Browse files Browse the repository at this point in the history
  • Loading branch information
dk981234 committed Oct 27, 2023
1 parent b7bbc89 commit 1b5416c
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/defaultV2-theme/blocks/sd-matrix.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@

.sd-matrix__label {
display: flex;
position: relative;
justify-content: center;
}

.sd-matrix__text {
padding: calcSize(2);
}

.sd-matrix__text--checked {
background-color: $primary-light;
padding: calcSize(2);
}

.sd-matrix__cell:first-of-type {
font-weight: $font-questiontitle-weight;
text-align: left;
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions visualRegressionTests/tests/defaultV2/matrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,52 @@ frameworks.forEach(framework => {
await takeElementScreenshot("question-matrix-single-select-in-panel-no-title.png", questionRoot, t, comparer);
});
});
test("Matrix single-select in panel with many columns", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(1200, 1200);
await initSurvey(framework,
{
pages: [
{
name: "page1",
elements: [
{
type: "panel",
name: "panel1",
title: "Panel",
elements: [
{
type: "matrix",
name: "question2",
columns: [
"Column 1",
"Column 2",
"Column 3",
"Column 4",
"Column 5",
"Column 6",
"Column 7",
"Column 8",
"Column 9",
"Column 10",
"Column 11",
"Column 12",
"Column 13",
"Column 14"
],
rows: ["Row 1", "Row 2"]
}
]
}
]
}
]
});

const questionRoot = Selector(".sd-row");
await takeElementScreenshot("question-matrix-single-select-in-panel-many-columns.png", questionRoot, t, comparer);
});
});

test("Matrix multi-select in panel", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
Expand Down

0 comments on commit 1b5416c

Please sign in to comment.