Skip to content

Popovers: Change default OverflowBehavior from FlipOnOpen to FlipAlways#12411

Merged
danielchalmers merged 4 commits intodevfrom
copilot/refactor-overflow-behavior-defaults
Jan 23, 2026
Merged

Popovers: Change default OverflowBehavior from FlipOnOpen to FlipAlways#12411
danielchalmers merged 4 commits intodevfrom
copilot/refactor-overflow-behavior-defaults

Conversation

Copy link
Contributor

Copilot AI commented Jan 11, 2026

  • Update PopoverOptions.cs to change default from FlipOnOpen to FlipAlways
  • Update documentation comment in PopoverOptions.cs
  • Update PopoverPage.razor documentation to reflect new default
  • Update test comments in SelectTests.cs, MenuTests.cs, and AutocompleteTests.cs
  • Run targeted tests to verify changes
  • Request code review
  • Complete security scan
  • Fix ColorPickerTests.CheckPickerPopover test to expect new default

Summary

Successfully changed the default OverflowBehavior from FlipOnOpen to FlipAlways as requested in #12043.

Changes Made:

  1. PopoverOptions.cs: Changed default value and XML documentation
  2. PopoverPage.razor: Updated documentation to reflect new default
  3. Test files: Updated comments in SelectTests.cs, MenuTests.cs, and AutocompleteTests.cs
  4. ColorPickerTests.cs: Updated CheckPickerPopover test to expect "mud-popover-overflow-flip-always" class

Testing Results:

✅ All PopoverTests pass (38 tests)
✅ All SelectTests pass (72 tests)
✅ All MenuTests pass (64 tests)
✅ All AutocompleteTests pass (132 tests)
✅ All ColorPickerTests pass (83 tests)
✅ All ServiceCollectionExtensionsTests pass (22 tests)
✅ Code review: No issues found
✅ Security scan: No issues found

The change is minimal, surgical, and all existing tests pass.

Original prompt

As part of #12043, Refactor Overflow Behavior Defaults
Currently, the default OverflowBehavior is set to FlipOnOpen in PopoverOptions. Users typically expect popovers to stay within the viewport dynamically as they scroll or resize.

Proposed Change: Change the default OverflowBehavior to FlipAlways.
Affected Code: src/MudBlazor/Services/Popover/PopoverOptions.cs

Update any existing properties, comments, docs, etc that might reference this feature, but don't add new stuff.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Refactor default overflow behavior for popover options Change default OverflowBehavior from FlipOnOpen to FlipAlways Jan 11, 2026
Copilot AI requested a review from danielchalmers January 11, 2026 06:52
Copy link
Member

@danielchalmers danielchalmers left a comment

Choose a reason for hiding this comment

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

Might be more expected default behavior

@danielchalmers danielchalmers marked this pull request as ready for review January 11, 2026 06:53
@mudbot mudbot bot added the enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library label Jan 11, 2026
@danielchalmers danielchalmers changed the title Change default OverflowBehavior from FlipOnOpen to FlipAlways Popovers: Change default OverflowBehavior from FlipOnOpen to FlipAlways Jan 11, 2026
@danielchalmers

This comment was marked as outdated.

This comment was marked as outdated.

Copy link
Contributor

@versile2 versile2 left a comment

Choose a reason for hiding this comment

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

I could not find any issues to report, the only suggestion I have is tenuous at best, something like adding into the public XML of OverflowBehavior.cs (enum) that FlipAlways is the defacto standard for MudBlazor.

Added remarks to the FlipAlways enum value.
This was referenced Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants