Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create notification, with option to set 'seen' without need to click on it. #9

Open
Boco10 opened this issue Nov 13, 2015 · 7 comments

Comments

@Boco10
Copy link

Boco10 commented Nov 13, 2015

I would like to show some useful info if the user is looking at the page. Something has stopped, started etc. Is there any way to implement a way to create notification which will be a notify for one and only?

@machour
Copy link
Owner

machour commented Nov 13, 2015

Something like flash messages in Yii ?
On Nov 13, 2015 12:35 PM, "Boco10" [email protected] wrote:

I would like to show some useful info if the user is looking at the page.
Something has stopped, started etc. Is there any way to implement a way to
create notification which will be a notify for one and only?


Reply to this email directly or view it on GitHub
#9.

@Boco10
Copy link
Author

Boco10 commented Nov 13, 2015

Yeah, but still like that way you are doing. Store it in db. And get the data from DB because i would like to use a cronjob for sending out notifications.

@machour
Copy link
Owner

machour commented Nov 14, 2015

I'm willing to implement this, but I think it should be discussed further more..

When should this notification be marked as read ? Imagine you both use the Widget and a cron sending unseen notifications. Would the cron being executed before the page prevent the Widget from seing the notification ?

@Boco10
Copy link
Author

Boco10 commented Nov 15, 2015

It's a good question. The main idea is, i have a cron which collects infos, etc. This will run like every minutes. I only want to show those notifications if the user is logged in. So if the user is offline, this will be a default seen notification. If the user is logged in, and there is a new notification which has to be seen once only. Will need to mark is as read right after it popped up. No matter the user clicked on it or not. I would use it an 'on the fly' notification. Like an extra.

@michaelst
Copy link
Contributor

Some messages it would be good to mark as seen if the user clicks on the drop down icon to display all notifications

@machour
Copy link
Owner

machour commented May 24, 2016

@Boco10 I think I'm failing to see exactly what you mean.. would you be willing to propose a PR ?
( @michaelst feel free to open a new issue/PR for your idea, and make sure to make it work for all templates ;-) )

@drsdre
Copy link
Collaborator

drsdre commented Jun 16, 2017

@Boco10 a possible solution would be to add a 'flash' expiration time on the notification. If the message is not marked as flashed within 5 minutes (i.e. user is offline), the message will not be shown. This can be implemented by in the controller actionPull query by ignoring messages which are not flashed and are older than expiration time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants