Skip to content

Notification improvements: drop shadow, type colors, click-to-dismiss, MCP tool - #53

Merged
emosaru merged 1 commit into
avaloniafrom
claude/festive-ride
Apr 16, 2026
Merged

Notification improvements: drop shadow, type colors, click-to-dismiss, MCP tool#53
emosaru merged 1 commit into
avaloniafrom
claude/festive-ride

Conversation

@emosaru

@emosaru emosaru commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Notifications now render with a drop shadow (BlurRadius=15, ShadowDepth=0, Opacity=0.8) matching the general layout element shadow configuration
  • Type-specific left-border accent colors: Message (green), Celebration (cornflower blue), Warning (amber), Error (red)
  • Notification colors are configurable via ApplicationColors with JSON keys notification_message, notification_celebration, notification_warning, notification_error; NotificationTypeToBrushConverter reads live from ApplicationColors.Instance
  • Fixed click-to-dismiss: the Opacity="0" button overlay doesn't receive hit-tests in Avalonia; replaced with a full-card Button and a ForceExpired event on Notification that removes immediately from the collection without waiting for the timer
  • Added push_notification MCP tool (Debug/dev mode) supporting all four NotificationType values

Test plan

  • Push each notification type and confirm correct border color
  • Click each notification and confirm immediate dismissal with no delay
  • Confirm no cursor change on hover
  • Confirm drop shadow visible on notifications
  • Edit application_colors.json with custom notification_* values, reload, and confirm colors update
  • Confirm timed notifications (default 10s) still auto-expire normally

🤖 Generated with Claude Code

…dismiss, MCP tool

- Render notifications with a drop shadow matching layout element shadow config
- Apply type-specific left-border accent colors (Message=green, Celebration=cornflower blue, Warning=amber, Error=red)
- Expose notification colors in ApplicationColors with JSON-configurable keys (notification_message/celebration/warning/error)
- Add NotificationTypeToBrushConverter that reads live from ApplicationColors.Instance
- Fix click-to-dismiss: replace Opacity=0 button overlay (Avalonia hit-test dead) with full-card Button; add ForceExpired event for immediate removal bypassing the timer
- Add push_notification MCP tool for all four NotificationTypes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@emosaru
emosaru requested a review from a team April 16, 2026 07:40
@emosaru
emosaru merged commit b3b7dee into avalonia Apr 16, 2026
3 checks passed
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.

1 participant