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
Displays a single comment in a comment thread, optionally with replies. Multiple comments can be displayed within [a Rhythm layout object](/docs/objects-rhythm--default-story).
44
56
45
-
## Status
46
-
47
-
This component is still a work in progress. The following features are still in development:
48
-
49
-
- Finalizing this pattern's blocks and properties for theme integration.
50
-
51
57
## Single
52
58
53
59
At minimum, a single comment consists of:
@@ -85,27 +91,24 @@ This information may be passed to the component as a `comment` object matching t
85
91
</Story>
86
92
</Canvas>
87
93
88
-
## Role badges
94
+
## Author Title
89
95
90
-
It is helpful for context within a discussion to know when a commentor is the original post author or a Cloud Four team member. The mechanics of this feature are still in development, but these stories show how these roles should appear using [the Badge component](/docs/components-badge--basic).
96
+
You can use the `author_title` block to pass in a custom author name or title.
97
+
98
+
It is helpful for context within a discussion to know when a commentor is the original post author or a Cloud Four team member. This can be achieved by passing in a name with [a Badge component](/docs/components-badge--basic) to the `author_title` block.
@@ -288,8 +288,6 @@ While it is theoretically possible to infinitely nest `children`, it's recommend
288
288
289
289
## Template Properties
290
290
291
-
Note: These template properties are not finalized, and may change in the future.
292
-
293
291
-`comment`: an object matching the structure of a [Timber comment](https://timber.github.io/docs/reference/timber-comment/)
294
292
-`allow_replies`: A boolean property that controls whether to show a reply button and form
295
293
-`logged_in_user`: [user object](https://timber.github.io/docs/reference/timber-user/#properties) of the type:
@@ -302,6 +300,13 @@ Note: These template properties are not finalized, and may change in the future.
302
300
-`log_out_url`: URL used for log out link.
303
301
-`source`: An optional object containing a `url` and `name` for the comment source.
304
302
303
+
## Template Blocks
304
+
305
+
-`header_content`: Use to over-write the content of the comment header
306
+
-`heading_content`: Use to over-write the content of the comment heading
307
+
-`author_title`: Use to over-write a portion of the comment heading content. Will be followed by a visually hidden span reading either `replied` or `said`. (Valid values could be `John Doe` or `John Doe (Post Author)`.)
308
+
-`replies`: Use to pass in your own replies markup. This is useful if you need to modify other blocks within replies.
309
+
305
310
## JavaScript Instructions
306
311
307
312
You can run `initCommentReplyForm` to initialize a comment's reply form. Comments with reply forms will have the `js-comment-with-reply-form` class which you can use to query and initialize them.
0 commit comments