Comment threads: post, reply, react and attach files
Describes Comments 0.6.0.
A comment thread is the list of comments under a record, such as a user’s profile or a media file, with a box to write a new one. Every thread on the site works the same way and follows the Comments settings.
Where to find it
A thread appears wherever a page includes one: in PhoenixKit itself on a user’s page in the admin and in the media viewer, and on any page of a module or of the host app that adds one. The Comments module must be on; while it is off, threads aren’t shown.
Anyone who can see the page can read the thread. Posting, replying and reacting need a signed-in account; a visitor sees Sign in to post a comment. instead of the box.
Writing a comment
Click Write comment to open the box, type, and click Post Comment. Comment added confirms it. Hide closes the box and throws away what you typed.
- With Rich-Text Editor on in the settings, the box has formatting; otherwise it’s a plain text box.
- Where mentions are available, the box says Type @ to mention someone, # to link a record.
- A character count appears when you get close to the length limit.
- On some pages you may see a Post as checkbox with a project’s name, to post on behalf of that project. The comment still records you as the author.
With Require Moderation on, your comment waits for approval and the thread tells you Your comment is awaiting approval.
New comments sit next to the box: with the box above the thread, newest first; with the box below it, oldest first, like a chat.
Replying
Hover over a comment and click the reply arrow (Reply). A box marked Replying here opens under it; click Post Reply. Replies hang under their parent in the order they were written. Replies can be nested only as deep as Max Thread Depth allows; a reply past that is refused with Reply nesting is too deep.
Likes and dislikes
The thumbs-up (Like) and thumbs-down (Dislike) buttons show each comment’s counts. You can like or dislike a comment, not both: liking a comment you disliked removes the dislike. Click the same button again to take your reaction back. A page can turn reactions off for its thread.
GIFs, files and voice messages
The paper-clip button (Attach media) opens a menu. What it offers follows the settings:
- GIF: search Giphy (Search GIFs…) and pick one. Shown only when the Giphy picker is on and has an API key. Remove GIF takes it off again.
- Image: pick files from your device: images, video, audio, PDF, Word documents, and text or Markdown files. Hover it to see how many files and how large. Shown only when attachments are on.
- Record: record a voice message in the browser. Shown only when attachments are on.
With attachments on, you can also paste a file (such as a screenshot) or drag one from your desktop onto the box; Drop files to attach shows while you hold it over. A paste that also carries text, such as cells copied from a spreadsheet, is pasted as text. Each file is listed under the box with an ✕ to remove it before posting.
Files that break the limits are marked File too large, File type not allowed or Too many files, and the comment won’t post until you remove them.
Editing and deleting
The ⋮ button on a comment (Comment actions) offers Edit and Delete. You see it on your own comments, and on everyone’s if you moderate the record the thread belongs to. Edit opens the text in place with Save and Cancel; Comment updated confirms it. Delete asks Are you sure you want to delete this comment? first.
Files can’t be added while editing: the box says Files can’t be added while editing a comment. Add them to a new comment.
A deleted comment, or one a moderator hid, disappears from the thread. If it had replies, it stays as [removed] so the replies still make sense.
What it doesn’t do
- Visitors who aren’t signed in can’t post, reply or react.
- Images written into a comment’s text are shown only when they come from this site or from Giphy; any other image appears as a link instead, so reading a comment never loads pictures from another site. Attached files are not affected.
- A thread doesn’t refresh by itself when someone else comments; your own changes show at once. A page can be built to update live.
- Approving, hiding and restoring happen on the Comments admin page, not in the thread.