User:Jack who built the house/Convenient Discussions





Convenient Discussions is a JavaScript tool providing a shell over the existing MediaWiki discussion system that allows the user to post and edit comments without switching to a separate page.

The full set of the script features includes much more:
 * creation of topics and subsections;
 * highlighting and navigating new comments;
 * highlighting own comments;
 * browser notifications about replies to the user's comments and comments in specific sections on open pages (opt-in);
 * watching sections, which affects notifications and highlighting edits on pages that list revisions;
 * jumping to a specific comment from the watchlist and other pages that list revisions;
 * moving topics between talk pages;
 * autofilling of the edit summary with indication of the addressee of the comment;
 * saving comment drafts to restore the forms content after unexpected events such as browser crashes, accidental jumps to a different page etc.;
 * slightly redesigned discussion threads where it's easier to follow which comment replies to which.

The script allows the user to forget about:
 * the need to search the code for a place for a comment, count colons, type tildes and other markup;
 * edit conflicts;
 * reading talk pages through diffs;
 * the need to completely reload the page and look for new comments with eyes, or even check the watchlist.

Convenient Discussions is being developed by Jack who built the house since 2017, enriched by the contributions and feedback from the Russian Wikipedia tech community and users. It also borrows the code for parsing timestamps in different formats from Matma Rex and uses solutions and ideas from the Wikimedia engineering and design teams.

Usage
Although a generic version will be available soon, it's best to use versions that are configured to use on particular wikis as every wiki has its own peculiarities which the script can address. Depending on the wiki, they can exist as gadgets or user scripts.

The script is located at User:Jack who built the house/convenientDiscussions.js and can be loaded like this:

You can adjust the script according to your preferences in the settings dialog. It is available at the click of the gear icon which can be found in the "CD" section of the watchlist and in the "Settings" section under any comment form.

The hotkeys can be found at the click of the "?" button under any comment form and on hover over the navigation panel buttons.

Compatability
To make the script compatible with the script displaying time in the local time zone (en:User:Gary/comments in local time.js), call the latter like this:

Data
Here's what the script stores, why, how, and how to delete the data. Note that you can delete all the data associated with the script in one click, by opening the script settings and pressing the button "Remove all script data" at the bottom. In ruwiki, for historical reasons, option names use  instead of , and   is used for the watched sections option.

Note that other scripts that you use on wiki pages, as well as side-wide scripts, can have access to this data too.

To execute the code in the "How to delete" column, open the browser's developer tools (done by pressing F12 in most browsers), switch to the "Console" tab, paste the code into the input and press Enter.

Feedback
It's preferrable to post bug reports and proposals on Phabricator under the "convenient-discussions" tag. If you don't have an account there and don't want to create one, post to the talk page.

Development

 * GitHub repository is used to store code.
 * Phabricator tag is used to coordinate efforts. (Post bug reports and proposals there, not at GitHub.)
 * Toolforge has an automatically generated documentation.