Skip to content

Add Close() method to Dropdown components for manual dismissal - #947

Merged
enisn merged 6 commits into
developfrom
copilot/fix-dropdownvisibility-on-navigation
Jun 10, 2026
Merged

Add Close() method to Dropdown components for manual dismissal#947
enisn merged 6 commits into
developfrom
copilot/fix-dropdownvisibility-on-navigation

Conversation

Copilot AI commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add Close() to Dropdown and DropdownField so callers can dismiss native dropdown popups before navigation
  • route Close() through the handler command mapper with platform partial implementations
  • keep the Android PopupMenu dismissible and clear stale menus when reopening or disconnecting the handler
  • document Close() usage for Dropdown and DropdownField

Automated Testing

  • dotnet build "src\UraniumUI\UraniumUI.csproj" -f net10.0
  • dotnet build "src\UraniumUI\UraniumUI.csproj" -f net10.0-windows10.0.19041.0
  • dotnet build "src\UraniumUI\UraniumUI.csproj" -f net10.0-android
  • dotnet build "src\UraniumUI\UraniumUI.csproj" -f net10.0-ios
  • dotnet build "src\UraniumUI\UraniumUI.csproj" -f net10.0-maccatalyst
  • dotnet build "src\UraniumUI.Material\UraniumUI.Material.csproj" -f net10.0
  • dotnet test "test\UraniumUI.Tests.sln"

Manual Testing

Not run locally. Recommended Android verification:

  • Run a sample page containing a DropdownField on an Android device or emulator.
  • Open the dropdown, call dropdownField.Close() before programmatic navigation, then navigate to another page.
  • Expected result: the Android native popup is dismissed and is not visible on the next page.

Closes #918

Copilot AI and others added 3 commits February 12, 2026 10:00
…ic implementations

Co-authored-by: enisn <23705418+enisn@users.noreply.github.com>
Co-authored-by: enisn <23705418+enisn@users.noreply.github.com>
Co-authored-by: enisn <23705418+enisn@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix dropdown field visibility after navigation Add Close() method to Dropdown components for manual dismissal Feb 12, 2026
Copilot AI requested a review from enisn February 12, 2026 10:07
@enisn
enisn marked this pull request as ready for review February 12, 2026 11:04
@enisn

enisn commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Your PR has compilation errors @copilot

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

Your PR has compilation errors @copilot

Fixed in c686467. The issue was that Close() is a method/command, not a property, so it needed to be added to a CommandMapper instead of the PropertyMapper. The handler now correctly uses DropdownCommandMapper with the proper MapClose(handler, dropdown, args) signature.

@enisn enisn added bug Something isn't working control-dropdown platform-android Something is related to Android labels Jun 10, 2026
@enisn

enisn commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Resolved the remaining compile errors in 420ce1a by switching the platform close hook to a partial method and cleaning up Android popup dismissal on reopen/disconnect. Local targeted builds and tests pass; CI is rerunning.

@enisn
enisn merged commit 1bbe706 into develop Jun 10, 2026
2 of 3 checks passed
@enisn
enisn deleted the copilot/fix-dropdownvisibility-on-navigation branch June 10, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working control-dropdown platform-android Something is related to Android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dropdown field is open and it is still visible to different page after programmatic navigation

2 participants