Document `ui:widget: "remote-image"`
Summary
The remote-image widget is available in Kendraio forms via uiSchema, but it is not currently documented. Developers and flow creators can see it used in some flows, but there’s no explanation of what it does or how to configure it. This makes it difficult to use the widget effectively.
Background
-
In
config.ts,remote-imageis registered as:{ name: 'remote-image', component: FormlyRemoteImageInputComponent } -
This means it is powered by the
FormlyRemoteImageInputComponent(found underapp/form-controls/formly-remote-image-input/). -
Compared to
k-image(which simply displays an image from a model field),remote-imageis intended to render an image loaded from a remote URL, with extra logic for handling display.
What needs to be documented
-
What the widget does
- Explain that it displays an image from a remote URL field in the form.
- Clarify whether it is read-only or supports editing/input.
- Describe any special behaviors (e.g. loading state, fallbacks).
-
How to use it in a form
- Show a JSON schema example with a field (e.g.
thumb_url) - Show the
uiSchemaconfiguration with"ui:widget": "remote-image"
{ "type": "form", "jsonSchema": { "type": "object", "properties": { "thumb_url": { "title": "Thumbnail URL", "type": "string" } } }, "uiSchema": { "thumb_url": { "ui:widget": "remote-image" } } } - Show a JSON schema example with a field (e.g.
-
When to use
remote-imagevsk-image-
remote-image: fetches/displays images from a URL, may support input -
k-image: display-only, simpler, used to render an existing image
-
Acceptance criteria
- New section in the documentation (
docs/forms/uiSchema.mdor similar) - Example form snippet included
- Explanation of purpose and usage
- Comparison with
k-image
@gsambrotta Thanks, the issue above is OK with me for now.
For the future, I’m not convinced it’s good practice for issues to be in a long Large Language Model style with "Summary" and "Background" sections because extra text usually takes more time and can cause rework. In this case, it’s already done and if the example works, I suggest to leave it as is. For future issues, please could we concisely state the goal with a self-contained acceptance criteria, without extra "key questions" sections and without extra background or "summary" sections?
@lukestanley @gsambrotta @CodeKrakken a long time ago I fought long and hard, before you were both here, to get k-image removed entirely and replaced with kendraio-image. I never want names shortened to k-... and always kendraio-... if it needs to reference the project at all anyway. Please can you check where if k-image is actually used anywhere and also if kendraio-image is a direct replacement? And afterwards please update everywhere that k-image is used to kendraio-image to reflect that. Please create another issue for this if necessary. Cheers!
@lukestanley @gsambrotta @CodeKrakken a long time ago I fought long and hard, before you were both here, to get
k-imageremoved entirely and replaced withkendraio-image. I never want names shortened tok-...and alwayskendraio-...if it needs to reference the project at all anyway. Please can you check where ifk-imageis actually used anywhere and also ifkendraio-imageis a direct replacement? And afterwards please update everywhere thatk-imageis used tokendraio-imageto reflect that. Please create another issue for this if necessary. Cheers!
I've made https://github.com/kendraio/kendraio-app/issues/568 for this.
@gsambrotta Please can this issue and any related documentation be updated to use kendraio-image?