Skip to content

fix(image-web): use icon size in structure preview - #2374

Open
valczak-cell wants to merge 1 commit into
mendix:mainfrom
valczak-cell:fix/image-icon-structure-preview-siz
Open

fix(image-web): use icon size in structure preview#2374
valczak-cell wants to merge 1 commit into
mendix:mainfrom
valczak-cell:fix/image-icon-structure-preview-siz

Conversation

@valczak-cell

Copy link
Copy Markdown

Pull request type

Bug fix (non-breaking change which fixes an issue)


Description

The Image widget applies image dimension logic to icon sources in Studio Pro's Structure mode. When height is set to automatic, the default maxHeight of 250px is used for the placeholder, causing small icons to occupy 250px vertically.

This change preserves the existing placeholder but uses the configured iconSize for both its width and height when the data source is set to Icon.

Design mode and runtime rendering are unaffected.

Fixes #2373

What should be covered while testing?

  1. Add an Image widget to a page.
  2. Set its data source to Icon.
  3. Select an icon and set Icon size to 15px.
  4. Open the page in Structure mode.
  5. Verify that the placeholder is approximately 15×15px instead of 250px high.
  6. Verify that Design mode and runtime rendering remain unchanged.

Size the Structure mode placeholder using iconSize when the Image widget data source is an icon.

Refs mendix#2373
@valczak-cell
valczak-cell requested a review from a team as a code owner August 7, 2026 08:45
@leonardomendix

Copy link
Copy Markdown
Collaborator

Hello maker! ☺️

Thank you for opening a pull request to the web-widgets repository and helping us make our widgets better. 💙

A small note from the maintainers:

We know that you probably wish to see your cool new feature or fix ASAP, but bringing a new feature to the widget is a small journey. But don't be scared! We just need time to triage, test, and analyze this feature or fix. We may request XML, code, or other changes that may be needed to match our desired look and feel for the new feature. We, as maintainers, strive to make sure that every change made in the code doesn't break existing behavior.

For now, here is what will happen next:

Our TotW* will quickly scan your code and, if all is well, trigger a PR check.
We will discuss your new feature or fix within our team.
If we decide to add it, we will do code review and testing. As mentioned, we may ask you to make some changes.
If all goes well, we will publish this new feature or fix in the next minor or patch release.

IMPORTANT: This repository uses code checks (linters, tests, etc.). Someone from our team will trigger these checks for your PR. In short, we will not proceed with your PR until all checks are green. It's the PR owner's goal to make checks green; maintainers are not going to do it for you.

  • TotW — Tech of the Week

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.

Image widget icon preview uses maxHeight instead of iconSize in Structure mode

2 participants