Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • libadwaita libadwaita
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 158
    • Issues 158
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • libadwaitalibadwaita
  • Merge requests
  • !235

Add notification overlay widget

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Maximiliano requested to merge msandova/libadwaita:adw-notifications into main Sep 07, 2021
  • Overview 184
  • Commits 4
  • Pipelines 100
  • Changes 18

Fixes: #242 (closed)

Mockups: new, old

Quick summary:

3 new objects were added

AdwNotification: An Object which follows GNotification api, but without some of its extra api (message, icon). Stuff like title and button_label are not properties on purpose to not introduce more API.

AdwNotificationWidget: A private widget that represents an AdwNotification, this widget takes care of telling the overlay when it should be closed, either via timeout, X button, or (action) button press.

AdwNotificationOverlay: A widget that acts as an overlay for the main GtkWindow of the app, it displays AdwNotificationWidgets, the main method is void adw_notification_overlay_add_notification (AdwNotification *notification). This widget manages a queue for notifications. At the moment the queue size can grow indefinitely, and it would fall on the developer to check if the queue is too big to keep adding notifications.

TODO:

  • It crashes without error when adding notifications
  • Clear code a bit
  • Improve docs
  • Determine a transition style and duration for the notifications
  • Discard notification when the queue is full (3 notifications according to mockups). This might or might not be part of the initial implementation
Edited Nov 06, 2021 by Alexander Mikhaylenko
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: adw-notifications