Skip to content

[RC1/9.0] Backport Dark Mode fix #11924

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

Conversation

KlausLoeffelmann
Copy link
Member

@KlausLoeffelmann KlausLoeffelmann commented Aug 20, 2024

Backport the Dark Mode Fix into .NET 9RC1.
The original bug fix (#11907) addressed a series of issues (#11910, #11898, #11897, #11895).

Since the original bug fix used Properties-APIs, which are not available in .NET 9RC/Rel, a few adjustments had to be made here. To further ensure stability, I added basic unit tests for dark mode. 

Customer Impact

We introduced a new experimental Feature “Dark Mode”. This accidentally regressed VB Apps, which are no longer able to enable Visual Styles. This PR would also address a couple of minor issues in Dark Mode itself, which have been found in recent testing.

Workaround: For the VB Part, there is no easy workaround, since Application.EnableVisualStyles is usually run in Program.cs, and in a VB App Framework App, there is no equivalent.
The issues of the new features do not have a workaround, but they also did not exist before.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low –The changes are isolated and are not affecting anything else.

Verification

  • Manual testing – Several manual tests made sure, Visual Basic Apps are no longer broken.
  • Automated – We added Dark Mode area specific Unit Tests in addition.
Microsoft Reviewers: Open in CodeFlow

@KlausLoeffelmann KlausLoeffelmann changed the base branch from main to release/9.0-rc1 August 20, 2024 00:54
@KlausLoeffelmann KlausLoeffelmann force-pushed the DarkMode9Rc1BackPortFix branch from 0e41dd0 to 3303842 Compare August 20, 2024 01:19
@dotnet-policy-service dotnet-policy-service bot added the draft draft PR label Aug 20, 2024
Add plausibility unit tests.
Apply backwards-compatibility (10->9) fix.
Refactor System-handling for SetColor.
Fix XML comments and property value handling in Formxxx properties.
Fix bug where in Visual Basic VisualStyles no longer get applied.
Fix raising wrong event on changing FormCaptionTextColor.
@KlausLoeffelmann KlausLoeffelmann force-pushed the DarkMode9Rc1BackPortFix branch from f468b32 to f9b3ed3 Compare August 20, 2024 03:49
@KlausLoeffelmann KlausLoeffelmann marked this pull request as ready for review August 20, 2024 03:54
@KlausLoeffelmann KlausLoeffelmann requested a review from a team as a code owner August 20, 2024 03:54
Copy link

codecov bot commented Aug 20, 2024

Codecov Report

Attention: Patch coverage is 58.82353% with 21 lines in your changes missing coverage. Please review.

Project coverage is 74.76324%. Comparing base (701b3b1) to head (f9b3ed3).
Report is 3 commits behind head on release/9.0-rc1.

Additional details and impacted files
@@                    Coverage Diff                    @@
##           release/9.0-rc1      #11924         +/-   ##
=========================================================
- Coverage         74.79692%   74.76324%   -0.03369%     
=========================================================
  Files                 3019        3019                 
  Lines               630034      630057         +23     
  Branches             46781       46783          +2     
=========================================================
- Hits                471246      471051        -195     
- Misses              155411      155631        +220     
+ Partials              3377        3375          -2     
Flag Coverage Δ
Debug 74.76324% <58.82353%> (-0.03369%) ⬇️
integration 17.93705% <24.24242%> (-0.09797%) ⬇️
production 47.71806% <45.45455%> (-0.07400%) ⬇️
test 97.00708% <83.33333%> (-0.00129%) ⬇️
unit 44.80852% <42.42424%> (-0.00993%) ⬇️

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

@KlausLoeffelmann KlausLoeffelmann added this to the .NET 9.0 milestone Aug 20, 2024
@KlausLoeffelmann KlausLoeffelmann removed the draft draft PR label Aug 20, 2024
@lonitra lonitra modified the milestones: .NET 9.0, 9.0 RC1 Aug 20, 2024
@leecow leecow added the servicing-approved .NET Shiproom approved the PR for merge label Aug 20, 2024
@KlausLoeffelmann KlausLoeffelmann changed the title Backport 9RC1 Dark Mode fix [RC1/.NET 9] Backport Dark Mode fix Aug 20, 2024
@KlausLoeffelmann KlausLoeffelmann changed the title [RC1/.NET 9] Backport Dark Mode fix [RC1/9,0] Backport Dark Mode fix Aug 20, 2024
@KlausLoeffelmann KlausLoeffelmann changed the title [RC1/9,0] Backport Dark Mode fix [RC1/9.0] Backport Dark Mode fix Aug 20, 2024
@KlausLoeffelmann KlausLoeffelmann merged commit 910db5c into dotnet:release/9.0-rc1 Aug 20, 2024
8 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 21, 2024
@KlausLoeffelmann KlausLoeffelmann deleted the DarkMode9Rc1BackPortFix branch April 22, 2025 01:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
servicing-approved .NET Shiproom approved the PR for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants