Revise the MessageNotification component (#24287)

This PR makes adding icons to the primary and secondary actions, in the
`MessageNotification` component, optional. Also took the opportunity to
remove a probably unnecessary "third action" from it; streamlining the
component API (we had added that for a design that we're not using
anymore). I did keep the "more info" possibility, which may be useful in
the future, though.

Release Notes:

- N/A
This commit is contained in:
Danilo Leal 2025-02-05 13:39:27 -03:00 committed by GitHub
parent 17a7495332
commit 37db1dcd48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 106 additions and 94 deletions

View file

@ -5207,8 +5207,9 @@ fn notify_if_database_failed(workspace: WindowHandle<Workspace>, cx: &mut AsyncA
|cx| {
cx.new(|_| {
MessageNotification::new("Failed to load the database file.")
.with_click_message("File an issue")
.on_click(|_window, cx| cx.open_url(REPORT_ISSUE_URL))
.primary_message("File an Issue")
.primary_icon(IconName::Plus)
.primary_on_click(|_window, cx| cx.open_url(REPORT_ISSUE_URL))
})
},
);