Skip to content

Conversation

@LeafShi1
Copy link
Member

@LeafShi1 LeafShi1 commented Dec 11, 2025

Fixes #14132

Proposed changes

  • Re-enable the visibility logic for _addNewPanel in DesignBindingPicker

Customer Impact

  • Previously, the visibility logic for _addNewPanel was commented out(Port DataGridviewDesigner to runtime #9677), causing the panel to remain always visible, regardless of whether adding new data sources was supported.
  • This behavior diverged from .NET Framework, where visibility depends on the data source provider service and its capability to add new data sources.
  • The incorrect logic could mislead developers by showing an option that is not actually supported at runtime.
  • Restoring the original conditional logic ensures consistency with .NET Framework and improves design-time accuracy.

Regression?

  • No

Risk

  • Minimal

Screenshots

Before

The "Add new Object Data Source" link & description shouldn't display in the DropDown panel for the DataSource & DisplayMember properties in the propertiGird

image

After

image

Test methodology

  • Manually

Test environment(s)

  • .net 10.0.0-rc.3.25603.106
Microsoft Reviewers: Open in CodeFlow

Copy link
Contributor

Copilot AI left a comment

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 visibility logic for the _addNewPanel in the DesignBindingPicker control to properly respect the data source provider service's capabilities. The change restores behavior that aligns with .NET Framework by ensuring the "Add new Object Data Source" panel only appears when the data source provider service is available and supports adding new data sources.

Key Changes

  • Re-enabled the previously commented-out visibility logic for _addNewPanel in the Pick method
  • Updated the variable reference from the non-existent dspSvc to the correct field _dataSourceProviderService

@codecov
Copy link

codecov bot commented Dec 11, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 77.16231%. Comparing base (5d64bba) to head (ab21b9a).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #14133         +/-   ##
===================================================
+ Coverage   76.01271%   77.16231%   +1.14960%     
===================================================
  Files           3279        3279                 
  Lines         645325      645328          +3     
  Branches       47720       47721          +1     
===================================================
+ Hits          490529      497950       +7421     
+ Misses        145491      143695       -1796     
+ Partials        9305        3683       -5622     
Flag Coverage Δ
Debug 77.16231% <75.00000%> (+1.14960%) ⬆️
integration 19.01538% <0.00000%> (?)
production 52.03610% <75.00000%> (+2.57665%) ⬆️
test 97.40749% <ø> (ø)
unit 49.43741% <75.00000%> (-0.02204%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

SimonZhao888
SimonZhao888 previously approved these changes Dec 12, 2025
Copy link
Member

@ricardobossan ricardobossan left a comment

Choose a reason for hiding this comment

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

All LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants