Extension:InlineComments
InlineComments Release status: stable |
|
---|---|
Implementation | ContentHandler |
Description | Allows adding inline comments to pages |
Author(s) | |
Latest version | 1.0 |
Compatibility policy | For every MediaWiki release that is a Long Term Support release there is a corresponding branch in the extension. |
License | GNU General Public License 2.0 or later |
Download | README |
|
|
|
|
Quarterly downloads | 19 (Ranked 111st) |
Translate the InlineComments extension if it is available at translatewiki.net | |
The InlineComments extension adds the ability for viewers to add inline comments to a page, similar to inline comments in Confluence or annotations in tools like Google Docs.
Usage
[edit]To attach a comment to specific text, first highlight the text you want to attach the comment to.
A "+" icon will then appear. If you click on it, or use the keyboard shortcut Ctrl+Alt+m
, a comment entry form will appear on the side.
Fill out the text area and hit "Save" to record your comment.
Once a comment is made, anyone can reply to it by hitting the "Reply" button and adding more text. A thread within InlineComments can grow to any length.
Comments can be edited by the author or the administrator by hitting the pencil icon on the right side of the comment.
You can also delete a thread (which can include one or more comments) by hitting the "Close discussion" button. This will delete all of that text from the InlineComments "slot" of the page. Since this deletion shows up in the page history, you can undo it any time, and restore the thread, simply by undoing that edit.
Users can be mentioned in the comments by using the "@" annotator.
If the Echo extension is installed:
- Mentioning a user in an inline comment will trigger an echo notification to that user.
- The comment thread creator will also get notified on any replies or the closure of the thread.
All inline comments are assigned with the "inlinecomments" tag, so that the changes can be easily filtered by tag in Special:RecentChanges and Special:Watchlist.
See also the screenshots below.
Download
[edit]You can download the InlineComments code, in .zip format, here.
You can also download the code directly via Git from the MediaWiki source code repository. From a command line, call the following:
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/InlineComments.git
To view the code online, including version history for each file, go here:
Installation
[edit]- Download and move the extracted
InlineComments
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/InlineComments - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'InlineComments' );
- Configure as required.
- Done â Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Configuration
[edit]The following settings can be added to LocalSettings.php
:
$wgInlineCommentsAutoDeleteComments
- Whether or not to automatically remove comments if the text they are commenting on gets deleted (default true)
$wgInlineCommentsNamespaces
- The only namespaces for which InlineComments should be enabled. By default, it is set to
$wgContentNamespaces
. If set explicitly to an array of some namespaces,$wgContentNamespaces
will not be included unless the user adds it in LocalSettings.php
InlineComments defines the following user rights:
inlinecomments-add
- Whether you can add and delete comments on a page. By default this is given to all logged in users.
inlinecomments-view
- Whether inline comments are shown to you. Please note, this controls the default interface but users may still be able to view existing comments by other means if the have 'read' rights on the wiki, such as through the history page or API.
inlinecomments-edit-all
- Whether you can edit all inline comments on a page. By default this is given to sysop users.
Screenshots
[edit]-
Click on the popup or use the keyboard shortcut
Ctrl+Alt+m
to add a new comment to the highlighted text. -
Enter your comment in the popup form and save the changes.
-
Once a comment is made, you can see it on the side, as well as when hovering over the text.
-
Any comment thread can be replied to, or closed/deleted. Hitting "Close discussion" will delete the thread, though it will remain available in the page history.
-
Every comment action is recorded in the page history, where it can also be undone.
Video demo
[edit]
Version history
[edit]- 0.1 - April 29, 2023 - Initial version
- 0.2 - February 27, 2024 - Look-and-feel improvements, many bug fixes
- 0.3 - April 11, 2024 - Renamed $wgInlineCommentsAutoResolveComments setting to $wgInlineCommentsAutoDeleteComments; renamed "Mark resolved" to "Close discussion"; added "inlinecomments-view" permission; added timestamp display on comment creation
- 1.0 - August 21, 2024 - Added user mentions along with autocompletion; added edit functionality to comments; added $wgInlineCommentsNamespaces setting; overrode JSON diff with custom diff for comment edits; made the sidebar skin-neutral; added "inlinecomments" tag for all comment edits; fixed permission issues for view and edit rights of logged out users, blocked users and hidden users; added Echo notification for the comment initiator on reply and close action; added Echo notification for the mentioned user
See also
[edit]- Stable extensions
- ContentHandler extensions
- GPL licensed extensions
- Extensions in Wikimedia version control
- BeforeCreateEchoEvent extensions
- BeforePageDisplay extensions
- ChangeTagsListActive extensions
- EchoGetDefaultNotifiedUsers extensions
- ListDefinedTags extensions
- MediaWikiServices extensions
- MultiContentSave extensions
- UserGetReservedNames extensions
- All extensions
- Annotation extensions