Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Porting System.Windows.Forms.Design.ListControlStringCollectionEditor #2078

Merged
merged 1 commit into from
Oct 24, 2019

Conversation

vladimir-krestov
Copy link
Contributor

@vladimir-krestov vladimir-krestov commented Oct 14, 2019

Fixes #1271
Related issue: #1115
Have you experienced this same bug with .NET Framework?: No

Proposed changes

  • Add System.Windows.Forms.Design.ListControlStringCollectionEditor class
  • Add resources for DataSourceLocksItem
  • Implement TypeForwardedTo method

Customer Impact

  • Changed collection editor for controls which use ListControlStringCollectionEditor (TextBox, ComboBox, ListBox, etc.) to compliance with .Net 4.8.

Regression?

  • No

Risk

  • No

Screenshots

Before

  • ComboBox (and others) has ObjectCollectionEditor as Items editor
    image

After

  • ComboBox (and others) has ListControlStringCollectionEditor as Items editor
    image

Test methodology

  • Manual UI testing

Test environment(s)

  • .Net Core version: 3.1.0-preview1.19458.7
  • Microsoft Windows [Version 10.0.18362.418]
Microsoft Reviewers: Open in CodeFlow

@vladimir-krestov vladimir-krestov requested a review from a team as a code owner October 14, 2019 14:36
@vladimir-krestov
Copy link
Contributor Author

Needs review before testing.

@vladimir-krestov vladimir-krestov self-assigned this Oct 14, 2019
@weltkante
Copy link
Contributor

weltkante commented Oct 14, 2019

Its probably not enough to just add the editor, it must be linked up with the TypeDescriptor. We've had a whole bunch of other editor porting issues (e.g. #1119, #1120, #1121) due to the editors not being linked up correctly. If possible we should do it correctly here in the first place instead of waiting for reports of it not working correctly.

@vladimir-krestov
Copy link
Contributor Author

@weltkante, thank you, I'll check it.

@weltkante

This comment has been minimized.

@codecov
Copy link

codecov bot commented Oct 14, 2019

Codecov Report

Merging #2078 into release/3.1 will increase coverage by 0.00596%.
The diff coverage is 0%.

@@                  Coverage Diff                  @@
##           release/3.1       #2078         +/-   ##
=====================================================
+ Coverage     26.50723%   26.51319%   +0.00596%     
=====================================================
  Files              806         806                 
  Lines           268108      268093         -15     
  Branches         38070       38069          -1     
=====================================================
+ Hits             71068       71080         +12     
+ Misses          191957      191933         -24     
+ Partials          5083        5080          -3
Flag Coverage Δ
#Debug 26.51319% <0%> (+0.00596%) ⬆️
#production 26.51319% <0%> (+0.00596%) ⬆️
#test 100% <ø> (?)

@weltkante
Copy link
Contributor

weltkante commented Oct 14, 2019

@vladimir-krestov sorry, I was overly cautious, this will probably just work, ListBox.Items already has the right attribute. I don't think this particular class is used outside WinForms so the comment regarding System.Drawing doesn't apply here.

@vladimir-krestov
Copy link
Contributor Author

@weltkante , anyway, thank you for your information.

zsd4yr
zsd4yr previously approved these changes Oct 14, 2019
Copy link
Contributor

@zsd4yr zsd4yr left a comment

Choose a reason for hiding this comment

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

LGTM, a few nits

RussKie
RussKie previously approved these changes Oct 15, 2019
@RussKie
Copy link
Member

RussKie commented Oct 15, 2019

Just to clarify, because the editor was originally defined in System.Design.dll we need to set type forwarding.

We can resolve nits later.

@RussKie RussKie added waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) and removed waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) labels Oct 15, 2019
@RussKie
Copy link
Member

RussKie commented Oct 16, 2019

📢 Please note due to a limited timeframe and the scope of work we are going to expediate all UI type editors ports into 3.1 and are going to ignore all stylistic review points.
All cleanup work is welcome on the master branch.

@RussKie
Copy link
Member

RussKie commented Oct 16, 2019

@vladimir-krestov please rebase to resolve the MC

@vladimir-krestov vladimir-krestov dismissed stale reviews from RussKie and zsd4yr via 7212336 October 16, 2019 07:08
@vladimir-krestov vladimir-krestov force-pushed the dev/v-vlkres/StringCollectionEditor branch from f9064da to 7212336 Compare October 16, 2019 07:08
@vladimir-krestov
Copy link
Contributor Author

Rebased to the latest release branch.
Fixed merge conflicts.

@vladimir-krestov vladimir-krestov changed the title Porting System.Windows.Forms.Design.ListControlStringCollectionEditor WIP: [Review] Porting System.Windows.Forms.Design.ListControlStringCollectionEditor Oct 18, 2019
@vladimir-krestov vladimir-krestov added 🚧 work in progress Work that is current in progress and removed waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) labels Oct 21, 2019
@merriemcgaw
Copy link
Member

approved from my end. Please add the servicing: consider label after testing completes.

@vladimir-krestov vladimir-krestov force-pushed the dev/v-vlkres/StringCollectionEditor branch from 972f7fb to e5ee0d0 Compare October 23, 2019 08:08
@vladimir-krestov vladimir-krestov changed the base branch from release/3.1 to dev/3.1-uitypeeditors October 23, 2019 08:10
@vladimir-krestov
Copy link
Contributor Author

Rebased to dev/3.1-uitypeeditors branch.
Added TypeForwardedTo for ListControlCollectionEditor according to #2078 (comment)

@vladimir-krestov vladimir-krestov force-pushed the dev/v-vlkres/StringCollectionEditor branch from 6b1ac54 to c66cfff Compare October 23, 2019 14:04
@vladimir-krestov vladimir-krestov force-pushed the dev/v-vlkres/StringCollectionEditor branch from c66cfff to 9833f86 Compare October 23, 2019 14:05
@vladimir-krestov vladimir-krestov changed the title WIP: [Review] Porting System.Windows.Forms.Design.ListControlStringCollectionEditor Porting System.Windows.Forms.Design.ListControlStringCollectionEditor Oct 23, 2019
@vladimir-krestov vladimir-krestov added waiting-review This item is waiting on review by one or more members of team and removed 🚧 work in progress Work that is current in progress labels Oct 23, 2019
@vladimir-krestov
Copy link
Contributor Author

@RussKie and @zsd4yr I need your approval before testing.

@RussKie RussKie removed the waiting-review This item is waiting on review by one or more members of team label Oct 24, 2019

using System.Runtime.CompilerServices;

[assembly: TypeForwardedTo(typeof(System.Windows.Forms.Design.ListControlStringCollectionEditor))]
Copy link
Member

Choose a reason for hiding this comment

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

I think we still need StringCollectionEditor and ArrayEditor...

@RussKie RussKie merged commit 32783a2 into dev/3.1-uitypeeditors Oct 24, 2019
RussKie added a commit to RussKie/winforms that referenced this pull request Oct 28, 2019
Whilst we do not support nor cant be expected to support customers who
reference our internals, in some scenarios like `UITypeEditor`s and
`TypeConverter`s may still be used by consumers to enhance their runtime
experience.
E.g. dotnet#2078 (comment)

Type forward `DataMemberFieldConverter` to avoid breaking existing customers.

Relates to dotnet#1545
@RussKie RussKie deleted the dev/v-vlkres/StringCollectionEditor branch October 28, 2019 11:56
RussKie added a commit that referenced this pull request Nov 1, 2019
Whilst we do not support nor cant be expected to support customers who
reference our internals, in some scenarios like `UITypeEditor`s and
`TypeConverter`s may still be used by consumers to enhance their runtime
experience.
E.g. #2078 (comment)

Type forward `DataMemberFieldConverter` to avoid breaking existing customers.

Relates to #1545
RussKie added a commit that referenced this pull request Nov 5, 2019
Whilst we do not support nor cant be expected to support customers who
reference our internals, in some scenarios like `UITypeEditor`s and
`TypeConverter`s may still be used by consumers to enhance their runtime
experience.
E.g. #2078 (comment)

Type forward `DataMemberFieldConverter` to avoid breaking existing customers.

Relates to #1545
RussKie added a commit that referenced this pull request Nov 8, 2019
Whilst we do not support nor cant be expected to support customers who
reference our internals, in some scenarios like `UITypeEditor`s and
`TypeConverter`s may still be used by consumers to enhance their runtime
experience.
E.g. #2078 (comment)

Type forward `DataMemberFieldConverter` to avoid breaking existing customers.

Relates to #1545
@ghost ghost locked as resolved and limited conversation to collaborators Feb 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants