Skip to content

Add navigation to Software Updates when the updates toast is tapped and fix update count display - #5291

Open
Gabriel Dufresne (GabrielDuf) wants to merge 3 commits into
mainfrom
fix/nav-update-badge-clipped-count
Open

Add navigation to Software Updates when the updates toast is tapped and fix update count display#5291
Gabriel Dufresne (GabrielDuf) wants to merge 3 commits into
mainfrom
fix/nav-update-badge-clipped-count

Conversation

@GabrielDuf

Copy link
Copy Markdown
Contributor

This pull request introduces improvements to the notification and toast system, enhances badge display in the sidebar, and adds support for clickable notification bodies. The main changes include adding a "launch action" to notifications (allowing, for example, a toast to navigate to the Updates tab when clicked), updating the sidebar badge to display "99+" when the count is high, and making InfoBar notifications optionally clickable.

Notification and Toast System Improvements:

  • Added a launchAction parameter to notification delivery methods in MacOsNotificationBridge and WindowsAppNotificationBridge, enabling actions such as navigating to the Updates tab when a notification is clicked. (src/UniGetUI.Avalonia/Infrastructure/MacOsNotificationBridge.cs )
  • Updated MainWindow.ShowRuntimeNotification and ShowBanner to accept and process the launchAction parameter, wiring up navigation logic for the "ShowOnUpdatesTab" action. (src/UniGetUI.Avalonia/Views/MainWindow.axaml.cs

Sidebar Badge Enhancements:

  • Modified the sidebar updates badge to display "99+" if the count exceeds 99, reduced font size for better fit, and ensured the badge text updates reactively. (src/UniGetUI.Avalonia/ViewModels/SidebarViewModel.cs);

  • Added support for making InfoBar bodies clickable when a command is provided, including visual feedback (cursor change) and event handling to execute the command without interfering with existing buttons. (src/UniGetUI.Avalonia/ViewModels/InfoBarViewModel.cs

These changes collectively improve notification interactivity and visual clarity in the application.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Improves update notification navigation and sidebar count clarity.

Changes:

  • Adds launch actions for update notifications.
  • Makes in-app toast bodies clickable.
  • Caps update badge text at 99+.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
SidebarView.axaml Updates badge layout and binding.
MainWindow.axaml.cs Routes clickable toasts to Updates.
InfoBar.axaml.cs Handles toast body taps.
InfoBar.axaml Adds clickable styling and tap event.
SidebarViewModel.cs Produces capped badge text.
InfoBarViewModel.cs Adds optional body command.
WindowsAppNotificationBridge.cs Passes launch actions to fallback banners.
MacOsNotificationBridge.cs Adds update launch-action plumbing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/UniGetUI.Avalonia/Infrastructure/MacOsNotificationBridge.cs Outdated
Comment thread src/UniGetUI.Avalonia/Views/Controls/InfoBar.axaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants