Skip to content

[MOO-2069] Generate EditableImageValue for native images with allowUpload set to true#175

Open
saurabhchavan1711 wants to merge 3 commits intomendix:masterfrom
saurabhchavan1711:moo/MOO-2069-Add-EditableImageValue<NativeImage>-type-to-image-type-for-native
Open

[MOO-2069] Generate EditableImageValue for native images with allowUpload set to true#175
saurabhchavan1711 wants to merge 3 commits intomendix:masterfrom
saurabhchavan1711:moo/MOO-2069-Add-EditableImageValue<NativeImage>-type-to-image-type-for-native

Conversation

@saurabhchavan1711
Copy link
Copy Markdown

@saurabhchavan1711 saurabhchavan1711 commented Apr 23, 2026

Checklist

  • Contains unit tests ✅
  • Contains breaking changes ❌
  • Compatible with: MX 11
  • Did you update version and changelog? ✅
  • PR title properly formatted ([XX-000]: description)? ✅

This PR contains

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Other (describe)

What is the purpose of this PR?

We have integrated allowUpload property for image type for our use case in native signature widget and set its value to true. For it we will have to change the type for it to "EditableImageValue" . Updated the existing test's output accordingly.

if (prop.$.allowUpload === "true") {
return isNative ? "EditableImageValue<NativeImage>" : "EditableImageValue<WebImage>";
}
return isNative ? "DynamicValue<NativeImage>" : "DynamicValue<WebImage>";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would improve readability if we rewrite this a bit, e.g.

const imageType = isNative ? "NativeImage" : "WebImage";
return `${prop.$.allowUpload === "true" ? "EditableImageValue" : "DynamicValue"}<${imageType}>`;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done .

### Added

- We added support for the `allowUpload` attribute on image properties in native widgets, generating `EditableImageValue<NativeImage>` when enabled.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add in which Mendix version this was introduced and also update the version in the package.json of the pluggable widget tools?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done . I have updated the changelog and version in package.json to 11.11.0 as this is the Studio Pro version I see when downloading it from the Jenkins pipeline artifact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants