Skip to content

fix(ui): honor includeBackground for non-animated decorator backgrounds - #170

Open
kar wants to merge 1 commit into
adaptyteam:masterfrom
blokadaorg:fix/footer-include-background-gate
Open

fix(ui): honor includeBackground for non-animated decorator backgrounds#170
kar wants to merge 1 commit into
adaptyteam:masterfrom
blokadaorg:fix/footer-include-background-gate

Conversation

@kar

@kar kar commented Aug 11, 2026

Copy link
Copy Markdown

Regression

Since 4.0.0, AdaptyUIAnimatableDecoratorModifier.bodyWithBackground applies the includeBackground opacity gate only in the animated-background branch; the static branch paints the decorator background unconditionally:

if let animatedBackgroundFilling {
    content.background {
        self.backgroundFill(for: animatedBackgroundFilling)
            .opacity(includeBackground ? 1.0 : 0.0)   // gated
    }
} else if let background = self.decorator.background {
    content.background {
        self.backgroundFill(for: background)          // NOT gated
    }
}

In 3.17.x every branch was gated (AdaptyUIDecoratorModifier, all three branches applied .opacity(includeBackground ? 1.0 : 0.0)).

Visible effect

The footer is the only element rendered with includeBackground == false (drawDecoratorBackground in AdaptyUIHeroContainerView / AdaptyUIFlatContainerView): its background is meant to appear only once scrollable content extends beneath the footer. With the gate lost, a translucent footer background (e.g. #000000BF in dark mode) is composited over the screen content unconditionally, visibly darkening the footer band on any paywall using one.

Measured on a production paywall (legacy Paywall Builder template basic, dark mode): footer band rgb(57,57,57) under 3.17.2 vs rgb(14,14,14) under 4.0.2 — exactly one extra application of the #000000BF scrim over the same backdrop.

Fix

Restore the gate on the static branch, matching the animated branch and the 3.x behavior. One line.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant