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

Feature of the closing options of the growl message #54

Open
JanStevens opened this issue Nov 10, 2014 · 11 comments
Open

Feature of the closing options of the growl message #54

JanStevens opened this issue Nov 10, 2014 · 11 comments
Assignees

Comments

@JanStevens
Copy link
Owner

hello,

After issues #53, #51 and #49 we need standardise the way we close a growl notification. A little explanation:

Right now the growl message is shown and the counter shows how long the growl message will be visible. Then a user can click on it to keep the growl notification displayed and click on it again to remove the growl. Clicking on the close button will remove the growl message immediately.

A couple of things happen and I would like to define some flows so everything is standardised and configurable and clear.

Proposal

  • Show count down timer: True/False
  • Configurable pauze option: This would be a string indicating how the user can pauze the growl notification, possibilities are: onhover, onclick, or disabled (suggestions?). Also an onpauze trigger will be called.
  • Configurable close option: This would be a string that defines how we can close the growl notification, possibilities are: onclick, onclosebutton (using this will show the close button else it will be hidden),

Possible issues

  • The disable close button would be dynamically determined instead of configurable.

This of course limits the possibilities, but will allow for easily extending the possible pauze and close handling.

Any thoughts or comments? Input very much needed as I don't know which direction to go.

@JanStevens JanStevens self-assigned this Nov 10, 2014
@morgenes
Copy link

I like where this is heading. Configuration is great. I would want to be able to decide on a per type basis as well. Like have no timer on errors (they always stay open until closed), but allow warnings and info messages to have the standard timer, and the options outlined above as far as hover to pause and only close on clicking the close button.

@JanStevens
Copy link
Owner Author

@morgenes great addition for configuration per type, thats something I forgot and is actually needed. I'll think about code structure and architecture because right now I'm not really happy with the current code.

@alonweinstein
Copy link

I'd love to be able to define global behaviors for each notification type and apply them once. For example by passing an object with defaults for each type during config, and have the directive angular.extend it into each new notification with any notification-specific options that might have been sent over:

{
    'error' : {
        'pauze' : 'onhover onclick',
        'close' : 'onclosebutton',
        'ttl' : 10000
    },
    'info' : {
        'pauze' : 'onhover',
        'close' : 'onclick',
        'ttl' : 4000
    },
    // config-defined defaults for types with no specific settings
    'default' : {
        'pauze' : '',
        'close' : 'onclosebutton',
        'ttl' : 3000
    }
}

@jgoux
Copy link

jgoux commented Dec 2, 2014

Is it possible at the moment to disable the close action triggered by a double click on a notification? I display links in my notifications, so the users can only click two times on them, quite annoying. ^^'

@ZaLiTHkA
Copy link

I have the same question as @jgoux, I'm using persistent growls as navigation aids in a SPA, it would be nice to override the click-to-keep/click-to-close from the app config.

@JanStevens
Copy link
Owner Author

@alonweinstein I like that API, its easy and with a couple of keywords we can define some behaviour. I'll think about it, atm the code is quite messy and could use a clean up/improvement

@alonweinstein
Copy link

Happy to help - any particular part of the code you want cleanup on?

@rockymontana
Copy link

+1 for this one!

@priyanshi626
Copy link

hey!
i am using bootstrap growl with my angularjs , i too want to add the features proposed by jan stevens , but how can i do this . following is the image showing the code i have written.
please help!
login_controller
main_controller

@alejandr0bovino
Copy link

CSS for disabling close on click (Proposal 2)

.growl-container > .growl-item { pointer-events: none }

@rahulmatty
Copy link

@alejandr0bovino : pointer-events: none doesnot work here.

Looking for any other alternatives.

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

No branches or pull requests

9 participants