@mattab opened this Issue on September 25th 2013 Member

Right now our Notification mechanism is not quite consistent.

We use for example several techniques:

  • we add &updated=X to URL, which is then detected by Javascript or controller to display a particular message
  • Various messages are printed in the views using the class="ajaxSuccess" style.
  • setting ->errorMessage on the View object
  • etc.

Instead we could introduce a new Notification class or so, that would:

  • Let user easily Notify one or more messages to users
    • Choose between Info, Notice, Warning, Error
  • We would display the messages in the next page view (messages are stored in the session)
    • This way developer does not need to display its own HTML
  • If several messages are to be displayed, they are displayed on top of one another (one colored box each)
  • We'd use boostrap styles for notifications (4 colors)
  • The ajaxSuccess and ajaxError css styles should reuse the Success + Error notification CSS
    • Maybe the notification should be implemented as JS class (and have PHP helper output code to call this class in the View)

Optional:

  • make a message persistent. If set to persistent, display with a [Until user clicks X this message is displayed on all page views
  • by default messages are displayed only once
@tsteur commented on October 26th 2013 Member

In 7b5943a94a57cfc45cc4452735e667f7ddb0796b: refs #4179 started to work on notifications

@tsteur commented on October 26th 2013 Member

In 98fa154fa105a7d1e87871d1367d9f976be6af51: refs #4179 set default properties

@tsteur commented on October 26th 2013 Member

In 7c4d56eecdb93e4443f81d430e96c17ccd063690: refs #4179 render a list of notifications so they can be rendered by javascript

@tsteur commented on October 26th 2013 Member

In c7ffd570d27267d6037ee770a18da32334dd52c3: refs #4179 parse notifications

@tsteur commented on October 26th 2013 Member

In 22208990a2dbc04fc488ffc9d9dfc3b9ee50e8d8: refs #4179 render a simple dom node for each notification

@tsteur commented on October 26th 2013 Member

In a208bf419fb58e37e0090d6a95b1a838ed8e7323: refs #4179 added some less definitions

@tsteur commented on October 26th 2013 Member

In b13484837950e83ab4aa3a5027259a196cd1209f: refs #4179 fix notification is floated

@tsteur commented on October 26th 2013 Member

In 93282a8ec2f05b887c27d6a2d927b890e46c1bf4: refs #4179 we do not support icons for now

@tsteur commented on October 26th 2013 Member

In 1cebbcee01dcc90cc98313d63cb78f3b91604064: refs #4179 handle options like title, noclear, message, ...

@tsteur commented on October 26th 2013 Member

In d99772cc378a02413d26578fcc2ae8388f494482: refs #4179 sort notifications by priority

@tsteur commented on October 26th 2013 Member

In fe5cddd90421e3e4d16bb3f10d99fe00ef5c9165: refs #4179 display notifications in admin where they used to be displayed and use same font size

@tsteur commented on October 26th 2013 Member

In 80bce1089434384e73afe6aea6ce297ef2da2679: refs #4179 throw errors if invalid params given, handle close event

@tsteur commented on October 27th 2013 Member

In 1cda21f9b8a0f78dd6316e86980581ef05d8b599: refs #4179 handle toast notifications

@tsteur commented on October 27th 2013 Member

In 3068233a9bfde2fc0ae08e4f65c642fe0120d4d3: refs #4179 set default type to transient

@tsteur commented on October 27th 2013 Member

In e793504a55ed49e31e9b78ca02f3de85d085ea51: refs #4179 handle persistent notifications

@tsteur commented on October 27th 2013 Member

In 2a51eb4564b9f96be08ab9784d7a7a9f6048d443: refs #4179 better var naming

@tsteur commented on October 27th 2013 Member

In c46a68ee9e3cd6fd2e5164c750fe7862a05ba4fe: refs #4179 validate id

@tsteur commented on October 27th 2013 Member

In d4363aa2515602415fb8b95db5351e9dd405d912: refs #4179 escape html attributes

@tsteur commented on October 27th 2013 Member

In 91160d978a114fc335866410a77f90ee6cd58eb3: refs #4179 added some documentation

@tsteur commented on October 27th 2013 Member

In eb7370feda103b83eb16a473f0b61fe8d001f300: refs #4179 coding style

@tsteur commented on October 27th 2013 Member

In 442185c0b33483094ca56f4aa6566a0e19da4cd4: refs #4179 added example

@tsteur commented on October 27th 2013 Member

In c8773009e0b64241dd5c704394e675752c3b687e: refs #4179 save notifications until delivered

@tsteur commented on October 27th 2013 Member

In 38a6c592ba78049b7bfe07d1f5a12ee33114ac6e: refs #4179 fade notifications in

@tsteur commented on October 27th 2013 Member

In aa1ff54d9b545db98f7656e4d58f15ea251f630f: refs #4179 do not expose the whole class for plugin developers, only the notify method

@tsteur commented on October 27th 2013 Member

In 5018227b65d01e2b439e26f70c4fa550ba7ef0b1: refs #4179 fix title is hardcoded

@tsteur commented on October 27th 2013 Member

In be25ab06a02aed3df0718a3eca9860a7aaaf3ecd: refs #4179 extract some code into functions, added possibility to place notification in any node by specifying property placeAt

@tsteur commented on October 27th 2013 Member

In a5ff495f3a5a5f253cfdbba6376e31952adc2f4a: refs #4179 added jsdoc

@tsteur commented on October 28th 2013 Member

In 14b1a01cc7ae337b704d51f285f89a188835c528: refs #4179 added possibility to disable animations and fixed animation

@tsteur commented on October 28th 2013 Member

In 076c4eee4386e63200aab4522c014e416a7e31be: refs #4179 as we do not get the notification id in the iterator, the cancel of all notification did not work

@tsteur commented on October 28th 2013 Member

In 867da5056644d057fa74415af6b6059e188aa1c4: refs #4179 code cleanup

@tsteur commented on October 28th 2013 Member

In 2fe406364b16ee3a96936538079e7c644143d766: refs #4179 improved UI in admin and added possibility to define links in message

@tsteur commented on October 28th 2013 Member

In b2a59cc1438a3105ba4b1ded0cea63a7c482ec53: refs #4179 use new notification system to display notification

@tsteur commented on October 29th 2013 Member

In b7109c453e044e40c8cb220d60b764980bf7a72e: refs #4179 use notification to display plugin successfully activated message

@tsteur commented on October 29th 2013 Member

In d3c0212c29e8db7eeb2edde6da785e0597e3f0d4: refs #4179 use a twig filter to generate html for notification so it is reusable

@tsteur commented on October 29th 2013 Member

In 167c9f04de6bb247c067737bc177dd86f5af7581: refs #4179 make sure it works with 1024px screen width

@tsteur commented on October 29th 2013 Member

In 024d784426b7e953930369233fb68a7a8e6de55b: refs #4179 fix property should be lowercase otherwise it does not work with data attribute

@tsteur commented on October 29th 2013 Member

In 000e6c27e5a728a02ca765cd22bd8cda25729d2d: refs #4179 make sure notification class is unique, use an inline notification

@tsteur commented on October 29th 2013 Member

In 02917cb18e69ce2e0cc4d85f8439891206bdc549: refs #4179 better id skip

@tsteur commented on October 29th 2013 Member

In 755583f652652682c4040349c7eda7f346222603: refs #4179 removed some unused styles skip

@tsteur commented on October 29th 2013 Member

In 7d5058ffb3fdc928f0dcc3884aed730dd8640d51: refs #4179 display notifications below report menu

@tsteur commented on October 29th 2013 Member

In 79157becbc8d00adb1440f9b50664bef96da002d: refs #4179 fix notifications are not displayed on sites like AllWebsites, Widgets and API

@tsteur commented on October 29th 2013 Member

In d14feb04e9584722bf119ef9b2fcb452444a431c: refs #4179 set noClear flag by default

@tsteur commented on October 29th 2013 Member

In f619427b080b95cab20c94326d044510410e4cd9: refs #4179 do not set a default priority, detect it by type by default

@tsteur commented on October 29th 2013 Member

In ed1485742636f24231d208eaa4424779b1888a4d: refs #4179 added possibility to scroll to notifications and close notification if there is one having same id

@tsteur commented on October 31st 2013 Member

In ac7ef829763634bb0c27990854e0ad9fd9781563: refs #4179 added some notification examples

@mattab commented on November 7th 2013 Member

Great new feature for developers!

is there any work left before closing this ticket?

This Issue was closed on November 7th 2013
Powered by GitHub Issue Mirror