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

feat: change blocklyEditableText to blocklyEditableField and blocklyNonEditableText to blocklyNonEditableField BREAKING CHANGE: The blocklyEditableText and blocklyNonEditableText identifiers have been renamed to blocklyEditableField and blocklyNonEditableField respectively. This change may require updates to any existing code that references the old identifiers. #8469

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions core/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -534,12 +534,12 @@ export abstract class Field<T = any>
return;
}
if (this.enabled_ && block.isEditable()) {
dom.addClass(group, 'blocklyEditableText');
dom.removeClass(group, 'blocklyNonEditableText');
dom.addClass(group, 'blocklyEditableField');
dom.removeClass(group, 'blocklyNonEditableField');
group.style.cursor = this.CURSOR;
} else {
dom.addClass(group, 'blocklyNonEditableText');
dom.removeClass(group, 'blocklyEditableText');
dom.addClass(group, 'blocklyNonEditableField');
dom.removeClass(group, 'blocklyEditableField');
group.style.cursor = '';
}
}
Expand Down
10 changes: 5 additions & 5 deletions core/renderers/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1132,14 +1132,14 @@ export class ConstantProvider {
`${selector} .blocklyText {`,
`fill: #fff;`,
`}`,
`${selector} .blocklyNonEditableText>rect,`,
`${selector} .blocklyEditableText>rect {`,
`${selector} .blocklyNonEditableField>rect,`,
`${selector} .blocklyEditableField>rect {`,
`fill: ${this.FIELD_BORDER_RECT_COLOUR};`,
`fill-opacity: .6;`,
`stroke: none;`,
`}`,
`${selector} .blocklyNonEditableText>text,`,
`${selector} .blocklyEditableText>text {`,
`${selector} .blocklyNonEditableField>text,`,
`${selector} .blocklyEditableField>text {`,
`fill: #000;`,
`}`,

Expand All @@ -1154,7 +1154,7 @@ export class ConstantProvider {
`}`,

// Editable field hover.
`${selector} .blocklyEditableText:not(.blocklyEditing):hover>rect {`,
`${selector} .blocklyEditableField:not(.blocklyEditing):hover>rect {`,
`stroke: #fff;`,
`stroke-width: 2;`,
`}`,
Expand Down
16 changes: 8 additions & 8 deletions core/renderers/zelos/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -802,14 +802,14 @@ export class ConstantProvider extends BaseConstantProvider {
`${selector} .blocklyText {`,
`fill: #fff;`,
`}`,
`${selector} .blocklyNonEditableText>rect:not(.blocklyDropdownRect),`,
`${selector} .blocklyEditableText>rect:not(.blocklyDropdownRect) {`,
`${selector} .blocklyNonEditableField>rect:not(.blocklyDropdownRect),`,
`${selector} .blocklyEditableField>rect:not(.blocklyDropdownRect) {`,
`fill: ${this.FIELD_BORDER_RECT_COLOUR};`,
`}`,
`${selector} .blocklyNonEditableText>text,`,
`${selector} .blocklyEditableText>text,`,
`${selector} .blocklyNonEditableText>g>text,`,
`${selector} .blocklyEditableText>g>text {`,
`${selector} .blocklyNonEditableField>text,`,
`${selector} .blocklyEditableField>text,`,
`${selector} .blocklyNonEditableField>g>text,`,
`${selector} .blocklyEditableField>g>text {`,
`fill: #575E75;`,
`}`,

Expand All @@ -825,9 +825,9 @@ export class ConstantProvider extends BaseConstantProvider {

// Editable field hover.
`${selector} .blocklyDraggable:not(.blocklyDisabled)`,
` .blocklyEditableText:not(.blocklyEditing):hover>rect,`,
` .blocklyEditableField:not(.editing):hover>rect,`,
`${selector} .blocklyDraggable:not(.blocklyDisabled)`,
` .blocklyEditableText:not(.blocklyEditing):hover>.blocklyPath {`,
` .blocklyEditableField:not(.editing):hover>.blocklyPath {`,
`stroke: #fff;`,
`stroke-width: 2;`,
`}`,
Expand Down
Loading