Skip to content

[MERCURE] Add notification handler and update modal title on notifications event#1842

Open
ViniTou wants to merge 1 commit intomainfrom
mercure-extension-points
Open

[MERCURE] Add notification handler and update modal title on notifications event#1842
ViniTou wants to merge 1 commit intomainfrom
mercure-extension-points

Conversation

@ViniTou
Copy link
Contributor

@ViniTou ViniTou commented Feb 26, 2026

🎫 Issue IBX-XXXXX

Description:

  • Decoupled Notification Polling: Refactored admin.notifications.modal.js to skip the default 30s polling loop if an external notification handler (like Mercure) is detected via a meta tag.
  • Standardized Update Event: Added a global listener for ibexa-notifications:update on document.body. This allows external handlers to push updated pending and total counts directly into the UI.
  • Automatic Refresh: Integrated the new update event with existing internal methods (setPendingNotificationCount and updateModalTitleTotalInfo) to ensure the notice dot and notification list refresh automatically when an update is pushed.
  • New Twig Component Group: Added the admin-ui-notification-handler group to the main layout, providing a clean entry point for other bundles to inject notification-related logic without hacking existing scripts.

This way I could get rid of that ugly hacking with HUGE new interval that was disabling old pooling from outside admin-ui bundle.

For QA:

Just check if notifcations are working as always.

Documentation:

@sonarqubecloud
Copy link

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.

4 participants