Skip to content

fix(dropdown): target overloads - toggle interop method, return types - #288

Merged
damyanpetev merged 6 commits into
masterfrom
dpetev/dropdown-toggle-overload-fix
Aug 5, 2026
Merged

fix(dropdown): target overloads - toggle interop method, return types#288
damyanpetev merged 6 commits into
masterfrom
dpetev/dropdown-toggle-overload-fix

Conversation

@damyanpetev

@damyanpetev damyanpetev commented Aug 3, 2026

Copy link
Copy Markdown
Member

Description

Closes #296, which is ported from old internal boards.
Found in #286, fixed separately here
Fix dropdown toggle overload call and return type of all target overloads, unit test setup & coverage

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog

Component(s) / Area(s) Affected:

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Test Configuration:

  • .NET version:
  • Hosting model:
  • Browser(s):
  • OS:

Screenshots / Recordings

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code
  • This PR includes API docs for newly added methods/properties
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

Closes #

@damyanpetev
damyanpetev requested a review from MayaKirova August 3, 2026 07:05
@damyanpetev damyanpetev added 🐛 bug Something isn't working 🧪 ci: tests dropdown 📖 documentation Improvements or additions to documentation labels Aug 3, 2026
@damyanpetev
damyanpetev marked this pull request as ready for review August 3, 2026 12:30
Copilot AI review requested due to automatic review settings August 3, 2026 12:30
@damyanpetev damyanpetev changed the title Dropdown toggle overload fix fix(dropdown): toggle overload interop method, target overloads return type Aug 3, 2026
@damyanpetev damyanpetev changed the title fix(dropdown): toggle overload interop method, target overloads return type fix(dropdown): target overloads - toggle interop method, return types Aug 3, 2026
@damyanpetev damyanpetev added the squash-merge Merge PR with "Squash and Merge" option label Aug 3, 2026
@damyanpetev
damyanpetev enabled auto-merge (squash) August 3, 2026 12:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the IgbDropdown “target” overloads so they call the correct JS method (toggle instead of show) and align their return semantics with the rest of the show/hide/toggle API, while extending the interop contract test harness to validate element-handle marshalling and adding unit coverage for the corrected overloads.

Changes:

  • Fix IgbDropdown.Toggle(Object) to invoke "toggle" and update target overloads to return bool/Task<bool> with proper return decoding.
  • Extend the interop test harness/contract model to capture and assert ElementReference handle payloads and render-sourced expected values.
  • Add DropdownTests coverage for show/toggle target overloads for both component and ElementReference anchors.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/IgniteUI.Blazor.Tests/Interop/RendererMessageInteropHarness.cs Captures marshalled ElementReference[] payloads from igSendMessage invocations.
tests/IgniteUI.Blazor.Tests/Interop/InteropHarness.cs Extends InteropMethodCall with element-handle payloads.
tests/IgniteUI.Blazor.Tests/Interop/ComponentContract.cs Adds render-sourced expectations (FromRender) and expected element-handle assertions to method specs.
tests/IgniteUI.Blazor.Tests/DropdownTests.cs Adds contract-based tests for show/toggle target overloads using component and ElementReference anchors.
tests/IgniteUI.Blazor.Tests/ComponentWithContractTestBase.cs Resolves render-sourced expected args and asserts carried element handles in recorded invocations.
src/componentsBase/WebInputs/Dropdown.cs Fixes toggle target overload dispatch and aligns return types/decoding for show/toggle target overloads.
skills/igniteui-blazor-lite-testing/references/interop-contracts.md Documents new interop-contract authoring patterns for render-sourced args and element handles.

Comment thread src/componentsBase/WebInputs/Dropdown.cs
@MayaKirova

Copy link
Copy Markdown
Contributor

These are also some of the suppressed methods in bulk automation due to bugs: https://github.com/IgniteUI/igniteui-blazor/blob/master/tests/IgniteUI.Blazor.Lite.TestBed/componentsConfig.json#L121
These can be removed from the config now.

@damyanpetev
damyanpetev merged commit c91ceeb into master Aug 5, 2026
7 of 8 checks passed
@damyanpetev
damyanpetev deleted the dpetev/dropdown-toggle-overload-fix branch August 5, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📖 documentation Improvements or additions to documentation 🐛 bug Something isn't working dropdown squash-merge Merge PR with "Squash and Merge" option 🧪 ci: tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Return type for IgbDropdown's ShowAsync/ToggleAsync is incorrect.

3 participants