-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
[OOBE] Fix release notes error InfoBars #37804
base: main
Are you sure you want to change the base?
[OOBE] Fix release notes error InfoBars #37804
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR fixes the issue where release notes error InfoBars were not being displayed by replacing direct Visibility changes with the setting of IsOpen and IsTabStop properties via a new helper method.
- Introduces the SetInfoBar method to update InfoBar visibility and focus behavior.
- Removes an unused using directive for System.Text.Json.Serialization.
Reviewed Changes
File | Description |
---|---|
src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml.cs | Replaces direct Visibility adjustments with a method call to SetInfoBar for consistent InfoBar behavior. |
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml.cs:250
- [nitpick] Consider renaming the parameter 'open' to 'isOpen' to more clearly indicate that it represents a boolean state.
private void SetInfoBar(InfoBar infoBar, bool open)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel the message should be updated with more wordings like: "Please click on the release notes above or revisit this page to retry."
There is a minor comments by Copilot as well, which I agree
i.e. the parameter open to "isOpen".
I'll update the PR with the required changes. I think a retry button in the info bar will be nice instead of suggest to reopen. |
src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR fixes the issue where release notes error InfoBars were not appearing by updating the InfoBar handling to use IsOpen properties and adding a retry button for reloading release notes.
- Updated InfoBar visibility logic to use IsOpen for proper error display
- Introduced a _loadingReleaseNotes flag to prevent concurrent reloads
- Added an event handler for a retry button to reload release notes
Reviewed Changes
File | Description |
---|---|
src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml.cs | Updated InfoBar handling, introduced a reload guard flag, and added a retry button event handler |
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml.cs:130
- Consider providing logging or user feedback when a release notes reload is already in progress to help diagnose cases when multiple retry attempts occur.
if (_loadingReleaseNotes) { return; }
src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeWhatsNew.xaml.cs:260
- Consider adding automated tests to verify the behavior of the new LoadReleaseNotes_Click handler, particularly ensuring that the _loadingReleaseNotes flag prevents concurrent reloads.
private async void LoadReleaseNotes_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
@yeelam-gordon I decided to keep the existing message and introduced a retry button (see first message). The new button, along with the release notes hyperlink immediately above should be quite explanatory. WDYT? |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Summary of the Pull Request
The InfoBars that should be displayed when release notes fail to fetch are never shown because they are closed.
Changes in the PR properly set
IsOpen
andTabStop
for both InfoBars instead ofVisibility
.Also add a retry button.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed
Manually tested: