Skip to content

[MOO-2463] : Background image native not rendering fix 11-6-x - #633

Open
saurabhchavan1711 wants to merge 3 commits into
mx/11.6.xfrom
moo/MOO-2463-background-image-native-not-rendering-fix-11-6-x
Open

[MOO-2463] : Background image native not rendering fix 11-6-x#633
saurabhchavan1711 wants to merge 3 commits into
mx/11.6.xfrom
moo/MOO-2463-background-image-native-not-rendering-fix-11-6-x

Conversation

@saurabhchavan1711

@saurabhchavan1711 saurabhchavan1711 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Checklist

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

Feature specific

  • Comply with designs ✅
  • Comply with PM's requirements ✅

This PR contains

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

What is the purpose of this PR?

This PR fixes the background image native widget not rendering issue whenever there is no content in the background image native widget. Now with this change , if the content is there in image , it will work as before & if no content only i.e. background image , it will fill up to take the available space.

@saurabhchavan1711
saurabhchavan1711 requested a review from a team as a code owner September 9, 2026 10:33
// When there's content, size container to content
const containerStyle = props.content
? styles.container
: [styles.container, { flexGrow: 1, flexShrink: 1, flexBasis: "auto" as const }];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's consider switching the order of the styles in the array here, because now, if the user passes the same style props, they will be overwritten by our hard-coded ones.

And for extra points, we can create a const for the hard-coded style for better readability e.g.
const DEFAULT_CONT_STYLE = { flexGrow: 1 ....}

@@ -121,7 +121,16 @@ exports[`BackgroundImage renders with default styles 1`] = `

exports[`BackgroundImage renders without content 1`] = `

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Perhaps we can also add a snapshot test to address this scenario e.g. it("renders with visible dimensions without content", or it("fills available space when content is empty"...


## [Unreleased]

- Fixed background image widget not visible.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can also add here that the widget was not visible under specific scenario.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants