Skip to content

Commit 82ddf9c

Browse files
committed
Fixing Vale errors, heading nesting
1 parent 74b4288 commit 82ddf9c

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

docs/design/notifications.rst

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Notifications
2-
=============
2+
#############
33

44
Notifications are a critical part of User experience (UX) in digital products, serving as a bridge between the system and the User. They should enhance, not detract from, the experience, assisting Users in achieving their goals and providing immediate, relevant feedback.
55

66
Notification types and their use
7-
================================
7+
********************************
88

99
Understanding notification variants
10-
-----------------------------------
10+
===================================
1111

1212
Notifications come in various forms, each serving a specific purpose within an app:
1313

@@ -18,39 +18,38 @@ Notifications come in various forms, each serving a specific purpose within an a
1818
- **Actionable notifications**: includes interactive elements and require User interaction. Styled similarly to inline or toast notifications, but more disruptive due to their interactive nature.
1919

2020
Design
21-
------
21+
======
2222

2323
- Carefully examine the context in which notifications appear. Use them sparingly and only when they add value to the User experience.
2424
- Maintain consistency in the design and behavior of notifications across the app.
2525
- Be sure to use high-contrast notifications for critical messaging, as low-contrast notifications are less visually disruptive.
2626

2727
Content
28-
-------
28+
=======
2929

3030
- Notifications should be concise and to the point, with a short and descriptive title. Limit the body content to one or two sentences.
3131

3232
Actions
33-
-------
33+
=======
3434

3535
- Limit actionable notifications to one action per notification to avoid overwhelming the User.
3636
- Inline notifications should persist until dismissed by the User or resolved through an action. Toast notifications can time out but should also include a close button.
3737

3838
Accessibility
39-
-------------
39+
=============
4040

4141
- Notifications should be accessible and not rely solely on color to convey status, as this can be problematic for Users with color blindness, so use additional HTML attributes according to the notification type.
4242
- Toast notifications with interactive content shouldn't automatically disappear to remain Web Content Accessibility Guidelines 2.1 compliant.
4343

4444
.. vale off
4545
4646
Using notification Components
47-
=============================
47+
*****************************
4848

4949
.. vale on
5050
5151
Standard notifications with icons
52-
---------------------------------
53-
52+
=================================
5453
For standard notifications that include an icon, developers should use a ``<div>`` element with the class ``alert`` and an additional class to specify the type of notification:
5554

5655
- ``.alert-success`` for success messages
@@ -71,7 +70,7 @@ Example:
7170
This displays a warning notification with an appropriate icon and color styling.
7271

7372
Larger notification blocks without icons
74-
----------------------------------------
73+
========================================
7574

7675
When you need a larger notification block - for instance to include headings or additional content - developers should use the ``alert`` class along with a column class that starts with the ``col-`` prefix. These notifications don't display an icon but have only a colored left border indicative of the notification type.
7776

@@ -88,7 +87,7 @@ This creates a more substantial notification block with a heading and paragraph,
8887

8988

9089
Notifications for the notifications panel
91-
=========================================
90+
-----------------------------------------
9291

9392
The ``NotificationModel`` class in ``NotificationModel.php`` manages notifications under the panel.
9493

@@ -97,7 +96,7 @@ The ``NotificationModel`` class in ``NotificationModel.php`` manages notificatio
9796
The system defines the notification template in ``notification.html.twig``.
9897

9998
Creating a notification
100-
-----------------------
99+
=======================
101100

102101
To create a notification, use the ``addNotification`` method of the ``NotificationModel`` class. This method accepts several parameters to customize the notification:
103102

@@ -120,15 +119,15 @@ To create a notification, use the ``addNotification`` method of the ``Notificati
120119
All notifications must have a header string defined.
121120

122121
Parameters:
123-
^^^^^^^^^^^
122+
-----------
124123

125-
.. vale of
124+
.. vale off
126125
127126
- ``$message`` string: the main content of the notification.
128-
- ``$type`` string|null: identifies the source and style of the notification (optional).
129-
- ``$isRead`` (boolean): indicates if the system has marked the notification as read (default: true).
130-
- ``$header`` string|null: the header text for the notification (required).
131-
- ``$iconClass`` string|null: CSS class for the notification icon (for example, 'ri-eye-line').
127+
- ``$type`` string|null: identifies the source and style of the notification - optional.
128+
- ``$isRead`` boolean: indicates if the system has marked the notification as read - default: true.
129+
- ``$header`` string|null: the header text for the notification - required.
130+
- ``$iconClass`` string|null: CSS class for the notification icon - for example, 'ri-eye-line'.
132131
- ``$datetime`` \\DateTime|null: creation date of the notification.
133132
- ``$user`` User|null: the User object associated with the notification defaults to the current User.
134133
- ``$deduplicateValue`` string|null: used to prevent duplicate notifications within a specified timeframe.
@@ -138,11 +137,11 @@ Parameters:
138137
139138
.. note::
140139

141-
The header should only contain the translation string; Twig handles the translation.
140+
The header should only contain the translation string, as Twig handles the translation.
142141

143142

144143
Notification types
145-
------------------
144+
==================
146145

147146
The ``$type`` parameter determines the visual style of the notification:
148147
.. vale off
@@ -156,7 +155,7 @@ The ``$type`` parameter determines the visual style of the notification:
156155
.. vale on
157156
158157
Example usage
159-
-------------
158+
=============
160159

161160
Here's how to create a notification when you schedule a Contact export:
162161

0 commit comments

Comments
 (0)