Fix Popup Padding Regression Introduced in v14.0.0#3074
Merged
TheCodeTraveler merged 11 commits intomainfrom Feb 8, 2026
Merged
Fix Popup Padding Regression Introduced in v14.0.0#3074TheCodeTraveler merged 11 commits intomainfrom
TheCodeTraveler merged 11 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR targets regressions/edge-cases in Popup default layout behavior (margin/padding) and updates unit tests to validate default popup settings propagation when showing popups via IPopupService.
Changes:
- Update
PopupPagemargin/padding converters to treat “unset” thickness values as empty/NaN and fall back toOptions.DefaultPopupSettings. - Refactor
Popup.Paddingto pass through to the underlyingContentView.Padding(and remove[BindableProperty]+ initializer duplication). - Extend unit tests to cover default popup settings behavior through
IPopupServicescenarios.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/CommunityToolkit.Maui/Views/Popup/PopupPage.shared.cs |
Adjusts margin/padding converter logic for default fallback behavior. |
src/CommunityToolkit.Maui/Views/Popup/Popup.shared.cs |
Refactors default initialization and changes Padding to pass through to base ContentView. |
src/CommunityToolkit.Maui.UnitTests/Views/Popup/DefaultPopupSettingsTests.cs |
Adds/updates tests validating default popup settings via popup service and view-wrapping behavior. |
src/CommunityToolkit.Maui.UnitTests/BaseViewTest.cs |
Registers an additional transient popup view used by the new tests. |
src/CommunityToolkit.Maui.UnitTests/Views/Popup/DefaultPopupSettingsTests.cs
Show resolved
Hide resolved
src/CommunityToolkit.Maui.UnitTests/Views/Popup/DefaultPopupSettingsTests.cs
Show resolved
Hide resolved
src/CommunityToolkit.Maui.UnitTests/Views/Popup/DefaultPopupSettingsTests.cs
Show resolved
Hide resolved
src/CommunityToolkit.Maui.UnitTests/Views/Popup/DefaultPopupSettingsTests.cs
Show resolved
Hide resolved
VladislavAntonyuk
previously approved these changes
Feb 8, 2026
src/CommunityToolkit.Maui.UnitTests/Views/Popup/DefaultPopupSettingsTests.cs
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
This PR fixes three problems:
PopupPage, usevalue.IsEmpty || value.IsNaNinstead ofvalue == defaultforPopupPage.PaddingConverterButton, the value of itsPaddingwill beNaNuntil the View has been laid out on the screenPopup, remove[BindableProperty]fromPadding, passthrough its value to the underlyingContentView.PaddingpropertyPopup.Paddingproperty is used for the Popup's Padding between itself and thePopupBorderwhich maintains howContentViewimplementsPadding; we don't need to override its functionalitynewkeyword on thePopup.Paddingproperty to override the XML comments to explain to the developer how we are usingPopup.Paddingunder the hood, passing through its value to the underlyingContentView.Paddingproperty[BindableProperty]onPopup.Margin,Popup.HorizontalOptionsandPopup.VerticalOptionsbecause these values do not propagate to the underlyingContentView, rather, we use these properties to assignPopupBorder.Margin,PopupBorder.HoriztonalOptionsandPopupBorder.VerticalOptionsrespectivelyDefaultPopupSettingsTeststhat demonstrate this usagePopup, remove default property initializersLinked Issues
DefaultPopupSettingsBroken for Padding #3064 (comment)PR Checklist
approved(bug) orChampioned(feature/proposal)mainat time of PRAdditional information