pimcore/studio-backend-bundle

[Task] Extend Notifications from Core

Closed this issue · 3 comments

When a user starts a long running action and closed the browser the process continues in the background.
On the next day when the user logs into pimcore from a different browser he should get the needed notifications which are important to him. In this case that the download is ready.

Mercure has the feature to replay the subscribed topics from a given id.
This has two problems, the first one is that the user does not need all events from that time until now. (e.g he doesn't care about the progress of the download if it is already ready)
The second problem is that if there are many events they get overwritten so chances are high that the user misses some events.

Maybe a DB table is the way to go to only save "events" which are relevant to the user. So which need a follow up action.
This needs to be discussed.

@alexz707 what if we would use Pimcore Notifications for this purpose? e.g when download is ready, drop a short message with the link to download?

@alexz707 what if we would use Pimcore Notifications for this purpose? e.g when download is ready, drop a short message with the link to download?

After research we could try and leverage the notification data structure from DB and re-implement the notification service (to be used publicly) and make it work with Mercure.

Two questions:

  • In the current implementation the "type" cannot be changed -> is this a bug or a feature?
  • Do we want to keep the Pimcore notification thing as is? (Do we need polling?)

Conclusion:

Core Notification can be extended with payload column and a flag, that to distinguish between classic-ui and studio.
Keep collaboration features in mind, when extending.

Consider a proxy for the existing notification service to wrap the functionality.

Introduce type system e.g. asset-download, system-notification to different measures can be taken according to the type.

Do not change standard type "info".

There will be a separate issue for all changes that have to be done in the core.
See: pimcore/pimcore#17481

The following PR can be used as a base pimcore/pimcore#17485