[Notification aggregator] Not able to change the type of the notification to "success" when process is done
When notification is done message should be changed and the type of it (to success
). At the moment I can not implement such behavior.
Now documentation suggest that new notification should be created: https://github.com/ckeditor/ckeditor-dev/blob/major/plugins/notificationaggregator/plugin.js#L490-L492 It will work as long as the default notification behavior is used. If user will use notificationShow
and notificationUpdate
events and cancel default behavior, he will get two notifications instead of one. As I think about notification, which can be shown with some animation (fade in), it would be better if after upload is done the same notification show the information that the progress is done. In fact it is part of the same process, not the separate information. Also getting two notifications for one operation is strange.
No I can prevent default finished
behavior, but if I do so I am not able to reset aggregator (I have to use private method) and if I change the type of the notification it does not change its type back when a new task is added.
Change History (7)
Owner: |
set to Piotr Jasiun
|
Status: |
new →
assigned
|
Status: |
assigned →
review
|
Status: |
review →
review_failed
|
Status: |
review_failed →
review
|
Resolution: |
→ fixed
|
Status: |
review →
closed
|
Version: |
→ 4.5.0 (GitHub - major)
|
Now aggregator does nothing after it is finished and let user decide what he want to do: change the type of the notification to success, hide it or leave it.
I also removed
reset
method. Lets keep it simple. I believe that one aggregator should have only one notification. When all tasks are done and user want to start counting from the begging he should create a new aggregator instance. There could be some problems with thereset
method and as I checked it tests does not covered cases with adding tasks after reset. Eventually we can addreset
method in the future.I have updated code, documentation and tests. Changes in t/12901.