fix: remove broken max width from Expression properties (#1455)

Before vs after should be self-explanatory what motivated me to remove
the max-width.

<img width="1353" height="762" alt="image"
src="https://github.com/user-attachments/assets/eda0ce6c-5187-4496-bc92-6f91d1aaa5ee"
/>

Resolves https://github.com/maplibre/maputnik/issues/1445

---------

Co-authored-by: Harel M <harel.mazor@gmail.com>
This commit is contained in:
Frank Elsinga
2025-10-18 01:42:41 +02:00
committed by GitHub
parent 7e784f80f6
commit fe2571addb
4 changed files with 1 additions and 9 deletions

View File

@@ -10,7 +10,6 @@ import type { StylePropertySpecification } from "maplibre-gl";
export type InputJsonProps = {
value: object
maxHeight?: number
className?: string
onChange(object: object): void
onFocus?(...args: unknown[]): unknown
@@ -115,16 +114,10 @@ class InputJsonInternal extends React.Component<InputJsonInternalProps, InputJso
};
render() {
const style = {} as {maxHeight?: number};
if (this.props.maxHeight) {
style.maxHeight = this.props.maxHeight;
}
return <div className="json-editor" data-wd-key="json-editor" aria-hidden="true" style={{cursor: "text"}}>
<div
className={classnames("codemirror-container", this.props.className)}
ref={(el) => {this._el = el;}}
style={style}
/>
</div>;
}

View File

@@ -84,7 +84,6 @@ class ExpressionPropertyInternal extends React.Component<ExpressionPropertyInter
onFocus={this.props.onFocus}
onBlur={this.props.onBlur}
value={value}
maxHeight={200}
onChange={this.props.onChange}
/>
</Block>;

View File

@@ -260,7 +260,6 @@ class GeoJSONSourceFieldJsonEditor extends React.Component<GeoJSONSourceFieldJso
<Block label={t("GeoJSON")} fieldSpec={latest.source_geojson.data}>
<FieldJson
value={this.props.source.data}
maxHeight={200}
lintType="json"
onChange={data => {
this.props.onChange({