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

Flashes / notifications in Backbone #37

Closed
ErisDS opened this issue May 18, 2013 · 8 comments
Closed

Flashes / notifications in Backbone #37

ErisDS opened this issue May 18, 2013 · 8 comments
Assignees
Milestone

Comments

@ErisDS
Copy link
Member

ErisDS commented May 18, 2013

Now that we have Backbone in place across most of the admin app, we need to add in notifications. Currently, most operations do an alert.

Dynamic notifications should always exist at the same location in the DOM as the static ones (where the {{>flashes}} partial is included in default.hbs.

The dynamic notifications should also have/work with #142

@ghost ghost assigned ErisDS May 19, 2013
@ghost ghost assigned javorszky May 29, 2013
@javorszky
Copy link
Contributor

Need to wait until backbone is present. Currently the {{>flashes}} is compiled on pageload using pre-existing data. Saving, editing, etc is done async though.

@JohnONolan
Copy link
Member

Where are we on this, and can it be pushed to 0.3?

@javorszky
Copy link
Contributor

Working on this, expect a PR today - tomorrow.

@javorszky
Copy link
Contributor

Because notifications will be async, and client generated, a couple of questions:

  • If I do something that generates a notification, and then do something else that generates another notification, do I end up with 2 flashes?
  • Should notifications auto-clear?
  • Should new notifications replace the previous one?

@JohnONolan
Copy link
Member

Notifications should have multiple states - passive, or persistent. Passive should disappear on the next pageload or user action, persistent should remain until manually dismissed by the user, with the "x".

Eg:

Your post was successfully published! - Passive
Ghost 0.3.1 is available, please upgrade! - Persistent

Multiple persistent notifications should stack, until dismissed.

There may be some UI / display issues with this. I'm thinking about a "notifications" wrapper that might solve a few problems, but for now let's just get it working functionally and then see here we are.

@javorszky
Copy link
Contributor

I've added a div just after the <main> tag to accommodate the notifications and keep them in their separate world.

@javorszky
Copy link
Contributor

Just an update. Passive notifications are working perfectly. Working on persistent ones. Basically I need to replace the flashes module with something else, plop the persistent ones on the ghost instance, and have logic to remove on user action. Hence PR is still not present.

@ErisDS
Copy link
Member Author

ErisDS commented Jul 13, 2013

Please resubmit this PR against the 'notifications' branch. Apologies I realise this will require some work due to the restructure :(

@ErisDS ErisDS closed this as completed Jul 14, 2013
ErisDS pushed a commit that referenced this issue Jul 22, 2013
Should close #37. There are persistent and passive notifications.

Persistent ones:
* are stored on `ghost.notifications`.
* have an api made to add / remove them with client side ajax logic (probably not the most elegant, but works)
* uses a modified `flashes.hbs` template
* will only disappear if user closes the bar
* stack

Passive
* added with backbone view / collection combo
* stack
* disappears on navigation and when user closes it
morficus pushed a commit to morficus/Ghost that referenced this issue Sep 4, 2014
Should close TryGhost#37. There are persistent and passive notifications.

Persistent ones:
* are stored on `ghost.notifications`.
* have an api made to add / remove them with client side ajax logic (probably not the most elegant, but works)
* uses a modified `flashes.hbs` template
* will only disappear if user closes the bar
* stack

Passive
* added with backbone view / collection combo
* stack
* disappears on navigation and when user closes it
mhinz-blogs pushed a commit to mhinz-blogs/Ghost that referenced this issue May 18, 2024
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

3 participants