Open icon-padding expressions in the expression editor (#2394)

Follow-up to #2391. The earlier change added a numeric list for one to
four values. `FieldFunction` still sends every `padding` value to that
list, including expressions made by **Convert to expression**.

Recognize expression arrays before sending padding values to the number
inputs. Numeric arrays and legacy scalar values still use the regular
padding editor.

Added a Playwright regression check that converts a saved padding value
to a literal expression and verifies that the expression editor opens.
The existing numeric padding tests also pass.
This commit is contained in:
SHAIK KHADEER BASHA authored and GitHub committed 2026-12-04 08:53:47 +02:00
1 parent c9f44b0cd6
commit bb1cd631a2
3 files changed
+10 -1

No files matched your search

+1 -1
View File
@@ -97,7 +97,7 @@ function getDataType(value: any, fieldSpec={} as any) {
else if (fieldSpec.type === "colorArray") {
return "value";
}
else if (fieldSpec.type === "padding") {
else if (fieldSpec.type === "padding" && (value === null || (Array.isArray(value) && typeof value[0] !== "string"))) {
return "value";
}
else if (fieldSpec.type === "variableAnchorOffsetCollection" && isVariableAnchorOffsetCollection(value)) {