You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/dev/design/new-notifications-system.rst
+6-6
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ Goals
34
34
* Ability to add non-error notifications from the build process
35
35
* Add extra metadata associated to the notification: icon, header, body, etc
36
36
* Support different types of notifications (e.g. error, warning, note, tip)
37
-
* Re-use the new notification system for product updates (e.g. new features, deprecated config keys)
37
+
* Reuse the new notification system for product updates (e.g. new features, deprecated config keys)
38
38
* Message content lives on Python classes that can be translated and formatted with objects (e.g. Build, Project)
39
39
* Message could have richer content (e.g. HTML code) to generate links and emphasis
40
40
* Notifications have trackable state (e.g. unread (default)=never shown, read=shown, dismissed=don't show again, cancelled=auto-removed after user action)
@@ -43,7 +43,7 @@ Goals
43
43
* Notifications can be attached to Project, Organization, Build and User models
44
44
* Specific notifications can be shown under the user's bell icon
45
45
* Easy way to cleanup notification on status changes (e.g. subscription failure notification is auto-deleted after CC updated)
46
-
* Notifications attached to Organization/Project dissappear for all the users once they are dismissed by anyone
46
+
* Notifications attached to Organization/Project disappear for all the users once they are dismissed by anyone
47
47
48
48
49
49
Non-goals
@@ -88,7 +88,7 @@ This section shows all the classes and models involved for the notification syst
88
88
.. note:: Accessing the database from the build process
89
89
90
90
Builders doesn't have access to the database due to security reasons.
91
-
We had solved this limitation by creating an API endpoint the builder hits once they need to interact with the databse to get a ``Project``, ``Version`` and ``Build`` resources, create a ``BuildCommand`` resource, etc.
91
+
We had solved this limitation by creating an API endpoint the builder hits once they need to interact with the database to get a ``Project``, ``Version`` and ``Build`` resources, create a ``BuildCommand`` resource, etc.
92
92
93
93
Besides, the build process is capable to trigger Celery tasks that are useful for managing more complex logic
94
94
that also require accessing from and writing to the database.
@@ -116,7 +116,7 @@ and some helper logic to return in the API response.
116
116
body =str
117
117
icon =str
118
118
icon_style =str(SOLID, DUOTONE)
119
-
type=str(ERROR, WARINIG, NOTE, TIP)
119
+
type=str(ERROR, WARNING, NOTE, TIP)
120
120
121
121
defget_display_icon(self):
122
122
ifself.icon:
@@ -201,7 +201,7 @@ It contains an identifier (``message_id``) pointing to one of the messages defin
201
201
message_id = models.CharField(max_length=128)
202
202
203
203
# UNREAD: the notification was not shown to the user
204
-
# READ: the notifiation was shown
204
+
# READ: the notification was shown
205
205
# DISMISSED: the notification was shown and the user dismissed it
206
206
# CANCELLED: removed automatically because the user has done the action required (e.g. paid the subscription)
207
207
state = models.CharField(
@@ -210,7 +210,7 @@ It contains an identifier (``message_id``) pointing to one of the messages defin
210
210
db_index=True,
211
211
)
212
212
213
-
# Makes the notification imposible to dismiss (useful for Build notifications)
213
+
# Makes the notification impossible to dismiss (useful for Build notifications)
214
214
dismissable = models.BooleanField(default=False)
215
215
216
216
# Show the notification under the bell icon for the user
0 commit comments