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

chore: Mark SystemThemeHelper methods as obsolete #1324

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

morning4coffe-dev
Copy link
Member

GitHub Issue (If applicable): part of unoplatform/uno#19235

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

What is the new behavior?

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-1324.eastus2.azurestaticapps.net

Copy link
Contributor

@kazo0 kazo0 left a comment

Choose a reason for hiding this comment

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

@morning4coffe-dev I believe we actually don't have docs right now for SystemThemeHelper. We should add it, probably better to be in a separate PR

@@ -34,6 +31,7 @@ public static ApplicationTheme GetCurrentOsTheme()
/// <summary>
/// Get the current theme of the application.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
Copy link
Contributor

@kazo0 kazo0 Jan 24, 2025

Choose a reason for hiding this comment

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

We should also add the attribute to ToggleApplicationTheme method as well, right? Since itself is referencing the deprecated methods?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. Docs page added via #1330

Copy link
Contributor

@kazo0 kazo0 Jan 28, 2025

Choose a reason for hiding this comment

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

This one is still using EditorBrowsable and not Obsolete. Was there are reason?

@@ -54,12 +52,14 @@ public static ApplicationTheme GetRootTheme(XamlRoot? root)
/// <summary>
/// Get if the application is currently in dark mode.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm leaning more toward using the ObsoleteAttribute

Copy link
Member Author

Choose a reason for hiding this comment

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

We were discussing this with Martin as well. I think it makes sense.

@morning4coffe-dev morning4coffe-dev changed the title chore: Hide SystemThemeHelper methods from IntelliSense chore: Mark SystemThemeHelper methods as obsolete Jan 27, 2025
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-1324.eastus2.azurestaticapps.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants