Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work for #7233: fix matrix with many columns inside panel #7245

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading
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