primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.38k stars 4.59k forks source link

Component: message/Toast duration progress bar. #13263

Closed ysk3a closed 10 months ago

ysk3a commented 1 year ago

Describe the feature you would like to see added

https://swimlane.github.io/ngx-ui/notification's 'Type: Info' example where, in addition to primeng's duration control, add some indication to the user how long that duration has progress/left over before automatically closing.

Another thing that would be nice to have built in, although is not necessary since it is possible to use js Date and not as important as the duration progressbar mentioned above, is adding or taking as input timestamp of when the toast was opened like https://carbondesignsystem.com/components/notification/usage/#anatomy's example.

Is your feature request related to a problem?

No. This feature is just a nice to have feature and maybe it would be nice to show to the user how long a toast will stay on the page if the app has both indefinite and limited duration toasts being used in different parts of the app.

Describe the solution you'd like

https://swimlane.github.io/ngx-ui/notification's 'Type: Info' example where, in addition to primeng's duration control, add some indication to the user how long that duration has progress/left over before automatically closing.

Describe alternatives you have considered

A potential work around would be to somehow keep track of the duration in some variable and use that duration in something like https://primeng.org/progressbar#dynamic and use primeng toast templating example https://primeng.org/toast#templating to add progressbar component. although not ideal using setinerval inside ngzone due to continuous changedetection.

Additional context

No response

mehmetcetin01140 commented 10 months ago

Hi,

Issue tracker is used for defects only as part of our commitment to quality and continuous improvement in all areas. Enhancements are collected as valuable community feedback and managed internally so moving this enhancement ticket to our internal project management backlog. For enhancement requests and other topics, you can open a new topic in PrimeNG Discussions.