onaio / fhir-web

A web based interface for administering FHIR based digital health solutions
https://ona.io/home/introducing-quest-fhir-native-case-management/
Other
19 stars 20 forks source link

Add growl notifications #15

Closed KipSigei closed 4 years ago

KipSigei commented 4 years ago

Add growl notifications to notify users on completed actions or when errors occur

moshthepitt commented 4 years ago

This should be done in tandem with this one https://github.com/onaio/js-tools/issues/131

HaseemUlHaq commented 4 years ago

@KipSigei @moshthepitt As we are following ant design, and displaying Notification from there. reveal-frontend is using react-toastify for showing notifications.

moshthepitt commented 4 years ago

@KipSigei will give us the last word on this. However I think what we may want is a wrapper that can use both of these.

KipSigei commented 4 years ago

I suggest we stick with the ant notifications, We should build a wrapper around the antd notification component, and have it show success, error, info and warning messages.

HaseemUlHaq commented 4 years ago

@moshthepitt @KipSigei @dubdabasoduba In case of adding notification in Utils, we have to call the notification like this

Notification({ type: 'success', message: 'message here', description: 'description here', }); OR Notification('success', 'message here', 'description here');

And by default we have to use it like

notification.error({ message: 'Title', description: 'Description' });

Which doesn’t makes any difference

moshthepitt commented 4 years ago

Some thoughts:

HaseemUlHaq commented 4 years ago

@moshthepitt We can set message and description to default empty string if nothing is sent. In that case we have to create a separate utils for notifications like sendSuccessNotification('any title', 'any description') sendInfoNotification() sendWarningNotification() sendErrorNotification()