Refactored ContentAlignmentEditor. It should work as DockEditor#7831
Conversation
dmitrii-drobotov
left a comment
There was a problem hiding this comment.
Nice refactoring!
|
Build failure:
|
Tanya-Solyanik
left a comment
There was a problem hiding this comment.
Looks good, I added some nits. Please send to testing.
ea70fa4 to
f67ac24
Compare
Tanya-Solyanik
left a comment
There was a problem hiding this comment.
Please see my comment to confirm that Focus event is raised.
f67ac24 to
b206590
Compare
| /// Control we use to provide the content alignment UI. | ||
| /// </summary> | ||
| private class ContentUI : Control | ||
| private class ContentUI : SelectionPanelBase |
There was a problem hiding this comment.
Is this inherited from anywhere internally? Maybe mark it as sealed if not?
There was a problem hiding this comment.
I agree with you. It makes sense in this case.
There was a problem hiding this comment.
@RussKie Should this have been picked up by the analyzer?
There was a problem hiding this comment.
I vaguely remember there were discussions in dotnet/runtime about creating an analyzer for this, but I don't know whether this has been done and whether this analyzer is available now. We can certainly enable the analyzer, if it's now available.
There was a problem hiding this comment.
I believe its CA1852
https://devblogs.microsoft.com/dotnet/performance_improvements_in_net_7/#analyzers
There was a problem hiding this comment.
Nice, thank you.
We can certainly turn it on, though it doesn't appear to be documented yet. https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1812 is another one to consider turning on.
It could be great to turn these on before the change to confirm.
The configs are stored here: https://github.com/dotnet/winforms/blob/main/eng/CodeAnalysis.src.globalconfig.
| /// User Interface for the DockEditor. | ||
| /// </summary> | ||
| private class DockUI : Control | ||
| private class DockUI : SelectionPanelBase |
There was a problem hiding this comment.
Same here, not inherited mark as sealed.
|
Tested this PR fixing with no new issue found. |
d250500
b206590 to
d250500
Compare
…et#7831) Changes: Refactored ContentAlignmentEditor.ContentUI and DockEditor.DockUI. Moved common logic to SelectionPanelBase. Reworked ContentAlignmentEditor.ContentUI, currently it works in the same way as DockEditor.DockUI. Customer Impact: Narrator announcements will be more transparent for users.
Fixes #7800
Proposed changes
ContentAlignmentEditor.ContentUIandDockEditor.DockUI.SelectionPanelBase.ContentAlignmentEditor.ContentUI, currently it works in the same way asDockEditor.DockUI.Customer Impact
Regression?
Risk
Screenshots
Before
After
Test methodology
Accessibility testing
Test environment(s)
.NET SDK:
Version: 8.0.100-alpha.1.22423.9
Commit: b9635390c8
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22621
Microsoft Reviewers: Open in CodeFlow