Skip to content

Commit

Permalink
TextBox: Fix readonly input border state (T1217197)
Browse files Browse the repository at this point in the history
  • Loading branch information
marker-dao authored Feb 27, 2024
1 parent f62799d commit a867800
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
$texteditor-border-color,
$texteditor-border-bottom-color,
$texteditor-disabled-color,
$texteditor-readonly-color,
$texteditor-hover-border-color,
$texteditor-hover-border-bottom-color,
$texteditor-focused-border-color,
Expand Down Expand Up @@ -256,7 +257,7 @@

&.dx-state-readonly {
@include dx-state-border-style($label-readonly-border-style);
@include dx-state-border-color($texteditor-disabled-color, $texteditor-disabled-color);
@include dx-state-border-color($texteditor-readonly-color, $texteditor-readonly-color);
}

&.dx-state-disabled {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ $fluent-editor-border-width: 1px;
$texteditor-border-color,
$texteditor-border-bottom-color,
$texteditor-border-color-disabled,
$texteditor-border-color-disabled,
$texteditor-border-color-hover,
$texteditor-border-bottom-color-hover,
$texteditor-border-color-focused,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ $texteditor-invalid-faded-border-color: $base-invalid-faded-border-color !defaul
$texteditor-filled-invalid-background: null !default;
$texteditor-border-radius: $base-border-radius !default;
$texteditor-input-border-radius: $base-border-radius !default;
$texteditor-disabled-border-color: color.change($texteditor-color, $alpha: 0.5) !default;
$texteditor-readonly-border-color: $base-border-color !default;
$texteditor-label-transition:
font-size 0.2s cubic-bezier(0, 0, 0.2, 1) 0ms,
transform 0.2s cubic-bezier(0, 0, 0.2, 1) 0ms,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ $generic-texteditor-invalid-badge-size: $generic-invalid-badge-size + 2 * $gener
none,
$texteditor-border-color,
$texteditor-border-color,
color.change($texteditor-color, $alpha: 0.5),
$texteditor-disabled-border-color,
$texteditor-readonly-border-color,
$texteditor-hover-border-color,
$texteditor-hover-border-color,
$texteditor-focused-border-color,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ $material-editor-custom-button-margin: 5px;
$texteditor-border-color,
$texteditor-border-color,
$texteditor-disabled-color,
$texteditor-disabled-color,
$texteditor-hover-border-color,
$texteditor-hover-border-color,
$texteditor-focused-border-color,
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.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const stylingModes = ['outlined', 'underlined', 'filled'];
const TEXTBOX_CLASS = 'dx-textbox';
const HOVER_STATE_CLASS = 'dx-state-hover';
const FOCUSED_STATE_CLASS = 'dx-state-focused';
const READONLY_STATE_CLASS = 'dx-state-readonly';
const INVALID_STATE_CLASS = 'dx-invalid';

[
Expand Down Expand Up @@ -73,7 +74,15 @@ stylingModes.forEach((stylingMode) => {

await testScreenshot(t, takeScreenshot, `Textbox render stylingMode=${stylingMode}.png`);

for (const state of [HOVER_STATE_CLASS, FOCUSED_STATE_CLASS, INVALID_STATE_CLASS, `${INVALID_STATE_CLASS} ${FOCUSED_STATE_CLASS}`] as any[]) {
const states = [
HOVER_STATE_CLASS,
FOCUSED_STATE_CLASS,
READONLY_STATE_CLASS,
INVALID_STATE_CLASS,
`${INVALID_STATE_CLASS} ${FOCUSED_STATE_CLASS}`,
];

for (const state of states as any[]) {
for (const id of t.ctx.ids) {
await setClassAttribute(Selector(`#${id}`), state);
}
Expand Down

0 comments on commit a867800

Please sign in to comment.