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

Notification: Use Right Values for Urgency Levels #189

Merged
merged 2 commits into from
Jul 3, 2023

Conversation

Marukesu
Copy link
Contributor

@Marukesu Marukesu commented May 18, 2023

Urgency levels in the freedesktop specification and GLib.NotificationPriority values doesn't share the same values, this make the conversion between the two matches the conversion made by GLib before sending the notification.

Closes: #196
Closes: #86

@Marukesu Marukesu requested a review from a team May 18, 2023 02:28
@zeebok
Copy link
Contributor

zeebok commented May 21, 2023

What happens if an app dev tries to send a High priority notification? Is it treated as a Normal priority notification?

@Marukesu
Copy link
Contributor Author

Yes, the fdo spec has only low, normal and urgent priority. GLib (and the GTK portal) converts high to normal priority before sending the notification. So there won't be any change in the behaviour for developers.

@tintou
Copy link
Member

tintou commented May 22, 2023

We shouldn't align to the "fdo" spec as it is the legacy implementation, the one we want to align with is the GTK/Portal implementation

@Marukesu
Copy link
Contributor Author

We shouldn't align to the "fdo" spec as it is the legacy implementation, the one we want to align with is the GTK/Portal implementation

We implement the org.freedesktop.Notifications interface, so we are already aligned to the fdo spec. This PR only correct a error in the codebase. there's only tree levels, LOW, NORMAL, and URGENT.

Using URGENT here is not only semantic correct, but allow us to have different behaviour for HIGH and URGENT notifications when/if we implement the Gtk/Portal interfaces in the future.

@Marukesu Marukesu mentioned this pull request Jun 26, 2023
urgency levels in the freedesktop specification and GLib.NotificationPriority
values doesn't share the same values, this make the conversion between the two
matches the conversion made by GLib before sending the notification.
@Marukesu Marukesu mentioned this pull request Jul 2, 2023
Copy link
Member

@lenemter lenemter left a comment

Choose a reason for hiding this comment

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

Code looks good and fixes the listed issues. Can you update release notes with these issues please

@lenemter lenemter merged commit 58449ed into master Jul 3, 2023
@lenemter lenemter deleted the maru/fdo-urgency-levels branch July 3, 2023 12:08
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.

Send Critical Notifications regardless of Do Not Disturb Should critical notifications bypass DND?
4 participants