Enable nullability in DesignerActionService and DesignerActionUIService#9367
Enable nullability in DesignerActionService and DesignerActionUIService#9367halgab wants to merge 11 commits intodotnet:mainfrom
Conversation
3670e7c to
84c7093
Compare
84c7093 to
1002393
Compare
|
Check the build failures. |
fb48dbf to
cbaae24
Compare
...dows.Forms.Design/src/System/ComponentModel/Design/DesignerActionPanel.EditorPropertyLine.cs
Outdated
Show resolved
Hide resolved
| private sealed class CheckBoxPropertyLine : PropertyLine | ||
| { | ||
| private CheckBox _checkBox; | ||
| private CheckBox? _checkBox; |
There was a problem hiding this comment.
can this be assigned in constructor or currently, any of its properties changed from constructor to current initialization? Wanted to see if we can avoid ! all over.
There was a problem hiding this comment.
I attempted a big shake-up of the code to avoid that, and got afraid it was too big of a change, I can try again and let you assess if it's too ambitious.
The problem I remember adding though is that the method AddControls is only called through GetControls, which is called only when we end up actually using the created Line objects.
There was a problem hiding this comment.
Try in a separate PR and see if we can take it independently before this.
There was a problem hiding this comment.
My idea was this. I know I need to move some classes around before this is good to merge, but I wanted your opinion on it because it feels pretty heavy. And I don't know if I should bring the PR to this repo instead?
There was a problem hiding this comment.
I can not access that link. You can push as draft PRs if you have draft changes. I will make sure me/someone on the team take a look later this week and share next steps.
There was a problem hiding this comment.
I opened #9422. The end result is a lot simpler than what I thought it would be.
| { | ||
| private EditorButton _button; | ||
| private UITypeEditor _editor; | ||
| private EditorButton? _button; |
There was a problem hiding this comment.
same with _button. if we ensure dispose of it if not used, i think we can avoid !
| if (EditControl is TextBox) | ||
| { | ||
| specialPadding = 2; | ||
| } |
There was a problem hiding this comment.
This part can use ternary expressions to make the code more concise
int specialPadding = EditControl is TextBox ? 2 : 0;
21b65e9 to
ebd8a61
Compare
`IWindowsFormsEditorService.DropDownControl` now expects an non-null `Control` as argument
ebd8a61 to
cbe32d1
Compare
|
This submission has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 14 days. It will be closed if no further activity occurs within 7 days of this comment. |
|
This is superseded by numerous PRs that break down the work started here |
Proposed changes
DesignerActionService,DesignerActionUIService, and all the internal code these classes use:DesignerActionUI,DesignerActionPanelandSelectionManagerMicrosoft Reviewers: Open in CodeFlow