Fix DrawerPage double footer on compact mode for Bottom/Top placement by jsuarezruiz · Pull Request #21004 · AvaloniaUI/Avalonia (original) (raw)

What does the pull request do?

This PR fixes an issue in DrawerPage when using compact modes together with horizontal drawer placements.

The issue caused a duplicated footer when DrawerPlacement=Bottom was combined with DisplayMode=CompactOverlay or CompactInline.

This PR updates both Fluent and Simple themes to correctly handle these placement and display mode combinations, and also adds render tests to cover all the scenarios.

What is the current behavior?

When DrawerPlacement=Bottom is used together with CompactOverlay or CompactInline, both PART_BottomBar and PART_CompactPaneToggle are visible at the bottom at the same time, producing a double footer.

What is the updated/expected behavior with this PR?

With this PR:

How to test:

How was the solution implemented (if it's not obvious)?

For the double footer issue, styles were added to both Fluent and Simple themes to hide PART_BottomBar when DrawerPlacement=Bottom is combined with either CompactOverlay or CompactInline. In these cases, PART_CompactPaneToggle already provides the required toggle affordance, so showing PART_BottomBar as well is redundant.

This PR also adds 6 render tests covering the previously missing placement and mode combinations, including:

These tests complete the compact placement coverage matrix.

Checklist

Breaking changes

None.

Obsoletions / Deprecations

None.

Fixed issues

Fix #20997