Skip to content

Commit ebb9a63

Browse files
committed
disable spellcheck globally
1 parent ca9bdd2 commit ebb9a63

File tree

15 files changed

+17
-54
lines changed

15 files changed

+17
-54
lines changed

packages/eez-studio-ui/_stylesheets/project-editor.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3852,15 +3852,15 @@
38523852
}
38533853

38543854
.EezStudio_ListLabel_Badge {
3855-
margin-left: 8px;
3855+
margin-right: 8px;
38563856
transform: translateY(-1px);
38573857

38583858
display: inline-block;
38593859
padding: 0px 5px;
38603860
font-size: 80%;
38613861
font-weight: bold;
3862-
color: rgb(238, 238, 238);
3863-
background-color: var(--bs-secondary);
3862+
color: var(--bs-secondary);
3863+
background-color: var(--bs-secondary-bg);
38643864
white-space: nowrap;
38653865
border-radius: 4px;
38663866
}

packages/eez-studio-ui/search-input.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export class SearchInput extends React.Component<{
77
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
88
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
99
onClear: () => void;
10-
disableSpellcheck?: boolean;
1110
}> {
1211
render() {
1312
return (
@@ -21,11 +20,6 @@ export class SearchInput extends React.Component<{
2120
value={this.props.searchText}
2221
onChange={this.props.onChange}
2322
onKeyDown={this.props.onKeyDown}
24-
spellCheck={
25-
this.props.disableSpellcheck === true
26-
? false
27-
: undefined
28-
}
2923
/>
3024
{this.props.searchText && (
3125
<IconAction

packages/home/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
/>
128128
</head>
129129

130-
<body>
130+
<body spellcheck="false">
131131
<div id="EezStudio_Content"></div>
132132
<div id="EezStudio_ModalContent"></div>
133133

packages/project-editor/core/object.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ export interface PropertyInfo {
264264
) => boolean;
265265

266266
monospaceFont?: boolean;
267-
disableSpellcheck?: boolean;
268267
cssAttributeName?: string;
269268
checkboxStyleSwitch?: boolean;
270269
checkboxHideLabel?: boolean;

packages/project-editor/features/action/action.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,13 @@ export class Action extends Flow {
279279
const projectStore = getProjectStore(action);
280280
return (
281281
<>
282-
<span>{action.name}</span>
283282
{projectStore.projectTypeTraits.hasFlowSupport &&
284283
action.implementationType == "native" && (
285284
<span className="EezStudio_ListLabel_Badge">
286285
NATIVE
287286
</span>
288287
)}
288+
<span>{action.name}</span>
289289
</>
290290
);
291291
},

packages/project-editor/features/variable/value-type.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -976,8 +976,7 @@ export const variableTypeProperty: PropertyInfo = {
976976
name: "type",
977977
type: PropertyType.String,
978978
propertyGridColumnComponent: VariableTypeUI,
979-
monospaceFont: true,
980-
disableSpellcheck: true
979+
monospaceFont: true
981980
};
982981

983982
////////////////////////////////////////////////////////////////////////////////

packages/project-editor/features/variable/variable.tsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,6 @@ export class Variable extends EezObject {
406406
expressionIsConstant: true,
407407
flowProperty: "input",
408408
monospaceFont: true,
409-
disableSpellcheck: true,
410409
disabled: object => {
411410
const project = ProjectEditor.getProject(object);
412411
return (
@@ -450,8 +449,7 @@ export class Variable extends EezObject {
450449
type: PropertyType.MultilineText,
451450
disabled: object =>
452451
isLVGLProject(object) || hasFlowSupport(object),
453-
monospaceFont: true,
454-
disableSpellcheck: true
452+
monospaceFont: true
455453
},
456454
{
457455
name: "usedIn",
@@ -492,13 +490,6 @@ export class Variable extends EezObject {
492490
listLabel: (variable: Variable) => {
493491
return (
494492
<>
495-
<span>{variable.name}</span>
496-
<em
497-
className="font-monospace"
498-
style={{ opacity: 0.5, marginLeft: 8 }}
499-
>
500-
{variable.type}
501-
</em>
502493
{!isPropertyDisabled(
503494
variable,
504495
findPropertyByNameInObject(variable, "native")!
@@ -517,6 +508,13 @@ export class Variable extends EezObject {
517508
PERSISTENT
518509
</span>
519510
)}
511+
<span>{variable.name}</span>
512+
<em
513+
className="font-monospace"
514+
style={{ opacity: 0.5, marginLeft: 8 }}
515+
>
516+
{variable.type}
517+
</em>
520518
</>
521519
);
522520
},

packages/project-editor/flow/component.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,7 @@ export function makeExpressionProperty(
529529
},
530530
params
531531
),
532-
monospaceFont: true,
533-
disableSpellcheck: true
532+
monospaceFont: true
534533
} as Partial<PropertyInfo>,
535534
propertyInfo
536535
);
@@ -558,8 +557,7 @@ export function makeAssignableExpressionProperty(
558557
},
559558
params
560559
),
561-
monospaceFont: true,
562-
disableSpellcheck: true
560+
monospaceFont: true
563561
} as Partial<PropertyInfo>,
564562
propertyInfo
565563
);
@@ -572,8 +570,7 @@ export function makeTemplateLiteralProperty(
572570
{
573571
flowProperty: "template-literal",
574572
expressionType: "string",
575-
monospaceFont: true,
576-
disableSpellcheck: true
573+
monospaceFont: true
577574
} as Partial<PropertyInfo>,
578575
propertyInfo
579576
);

packages/project-editor/flow/components/actions/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,6 @@ export class EvalJSExprActionComponent extends ActionComponent {
550550
type: PropertyType.MultilineText,
551551
propertyGridGroup: specificGroup,
552552
monospaceFont: true,
553-
disableSpellcheck: true,
554553
flowProperty: "template-literal"
555554
}
556555
],

packages/project-editor/flow/components/actions/instrument.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ export class SCPIActionComponent extends ActionComponent {
9797
type: PropertyType.MultilineText,
9898
propertyGridGroup: specificGroup,
9999
monospaceFont: true,
100-
disableSpellcheck: true,
101100
flowProperty: "scpi-template-literal",
102101
expressionType: undefined,
103102
getInstrumentId: (component: SCPIActionComponent) => {

packages/project-editor/flow/expression/ExpressionBuilder.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,6 @@ const SelectItemDialog = observer(
12711271
this.value = event.target.value;
12721272
})}
12731273
onSelect={this.onSelectionChange}
1274-
spellCheck={false}
12751274
/>
12761275
{tabs}
12771276
<div

packages/project-editor/project/project.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,6 @@ export class ExtensionDirective extends EezObject {
549549
{
550550
name: "extensionName",
551551
type: PropertyType.String,
552-
disableSpellcheck: true,
553552

554553
onSelect: async (
555554
object: IEezObject,

packages/project-editor/project/ui/Wizard.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2744,7 +2744,6 @@ class NameInput extends React.Component<{
27442744
className="form-control"
27452745
value={this.props.value || ""}
27462746
onChange={event => this.props.onChange(event.target.value)}
2747-
spellCheck={false}
27482747
onKeyDown={this.props.onKeyDown}
27492748
/>
27502749
);
@@ -2775,7 +2774,6 @@ class DirectoryBrowserInput extends React.Component<{
27752774
className="form-control"
27762775
value={this.props.value || ""}
27772776
onChange={event => this.props.onChange(event.target.value)}
2778-
spellCheck={false}
27792777
/>
27802778
<>
27812779
<button
@@ -2819,7 +2817,6 @@ class FileBrowserInput extends React.Component<{
28192817
className="form-control"
28202818
value={this.props.value || ""}
28212819
onChange={event => this.props.onChange(event.target.value)}
2822-
spellCheck={false}
28232820
/>
28242821
<>
28252822
<button

packages/project-editor/ui-components/PropertyGrid/ObjectReferenceInput.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ export const ObjectReferenceInput = observer(
203203
})}
204204
onChange={this.onSearchChange}
205205
onKeyDown={this.onSearchChange}
206-
disableSpellcheck={true}
207206
/>
208207
</div>
209208
<div>

packages/project-editor/ui-components/PropertyGrid/Property.tsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -522,11 +522,6 @@ export const Property = observer(
522522
overflowY: "hidden"
523523
}}
524524
readOnly={propertyInfo.computed}
525-
spellCheck={
526-
propertyInfo.disableSpellcheck
527-
? false
528-
: true
529-
}
530525
/>
531526
<button
532527
className="btn btn-secondary"
@@ -555,9 +550,6 @@ export const Property = observer(
555550
onChange={this.onChange}
556551
style={{ resize: "none", overflowY: "hidden" }}
557552
readOnly={readOnly || propertyInfo.computed}
558-
spellCheck={
559-
propertyInfo.disableSpellcheck ? false : true
560-
}
561553
/>
562554
);
563555
}
@@ -725,9 +717,6 @@ export const Property = observer(
725717
onChange={this.onChange}
726718
style={{ resize: "none", overflowY: "hidden" }}
727719
readOnly={readOnly || propertyInfo.computed}
728-
spellCheck={
729-
propertyInfo.disableSpellcheck ? false : true
730-
}
731720
onClick={this.props.onClick}
732721
/>
733722
);
@@ -751,11 +740,6 @@ export const Property = observer(
751740
overflowY: "hidden"
752741
}}
753742
readOnly={propertyInfo.computed}
754-
spellCheck={
755-
propertyInfo.disableSpellcheck
756-
? false
757-
: true
758-
}
759743
/>
760744
<button
761745
className="btn btn-secondary"

0 commit comments

Comments
 (0)