Skip to content

Commit

Permalink
Bug/6592 (#6615)
Browse files Browse the repository at this point in the history
* Work for #6592: fix wrong focus state for boolean question

* Update etalons

* Update etalons
  • Loading branch information
dk981234 committed Aug 1, 2023
1 parent ecc280f commit f90a998
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 16 deletions.
15 changes: 5 additions & 10 deletions src/defaultV2-theme/blocks/sd-boolean.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
.sd-boolean-root {
box-shadow: $shadow-inner;
border-radius: calcSize(12.5);
}

.sd-boolean {
display: flex;
width: max-content;
position: relative;
gap: calcSize(0.5);
padding: calcSize(0.5);
background-color: $editor-background;
box-shadow: $shadow-inner;
border-radius: calcSize(12.5);
box-shadow: $shadow-inner;

&.sd-boolean--allowhover:focus-within {
box-shadow: 0 0 0 2px $primary;
}
}

.sd-boolean__thumb,
Expand All @@ -38,10 +37,6 @@
border-radius: calcSize(12.5);
}

.sd-boolean__control:focus~.sd-boolean__switch {
box-shadow: inset 0 0 0 2px $primary;
}

.sd-boolean.sd-boolean--indeterminate .sd-boolean__switch {
display: none;
}
Expand Down
2 changes: 1 addition & 1 deletion src/defaultV2-theme/blocks/sd-question.scss
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,6 @@

.sd-scrollable-container:not(.sd-scrollable-container--compact) {
width: max-content;
overflow-x: hidden;
overflow: visible;
max-width: 100%;
}
4 changes: 0 additions & 4 deletions src/defaultV2-theme/blocks/sd-rating.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
flex-wrap: wrap;
}
}

&.sd-scrollable-container:not(.sd-scrollable-container--compact) {
overflow: visible;
}
}

.sd-rating--small {
Expand Down
3 changes: 2 additions & 1 deletion visualRegressionTests/tests/defaultV2/boolean.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Selector, ClientFunction } from "testcafe";
import { url, frameworks, initSurvey, setOptions, url_test, explicitErrorHandler, takeElementScreenshot, wrapVisualTest } from "../../helper";
import { url, frameworks, initSurvey, setOptions, url_test, explicitErrorHandler, takeElementScreenshot, wrapVisualTest, resetFocusToBody } from "../../helper";

const title = "Boolean Screenshot";

Expand Down Expand Up @@ -33,6 +33,7 @@ frameworks.forEach(framework => {
});
const questionRoot = Selector(".sd-question--boolean");
await t.wait(1000);
await resetFocusToBody();
await takeElementScreenshot("boolean-question-indeterminate.png", questionRoot, t, comparer);

await t.hover(".sd-boolean__thumb-ghost");
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 f90a998

Please sign in to comment.