Collapsible comments allows the collapsing and expanding of commemnt threads through the use of jQuery. It helps improve usability and readability of the comment threads by removing the visual noise of deep threaded conversations.
Use case
You want to allow threaded comments (indented) replies, you have Threading enabled in the content type(s) comment options.
However, sometimes users reply to one another too many times, and the whole thing becomes a mess, both visualy and in terms of usability.
This module lets you handle that purely through the use of jQuery, by specifying up to what level of indentation to show, and collapse after that.
How it works
Collapsible comments adds a small js file (collapsible_comments.js) to every page load.
Note that the js file could be added only if there are comments in the page, but it would mean making your users have download different bundles of js files, and in the end hurting frontend performance.
How to use it
Simply install the module as usual. (doc)
Go to admin/config/content/collapsible_comments to configure the options.
The jQuery selector for the comments is hardcoded to what Drupal renders by default. I normally never see this rendered any other way, so for now we don't include a setting to configure this. Feel free to open a feature request if necessary.
Theming
You can theme the link to show/hide comment threads in your theme script file, just make sure to keep a.comment-thread-expand if you override this theme function:
Drupal.theme.prototype.commentCollapseLink
See collapsible_comments.js and the Drupal.org JS handbook page.
The js also sets some classes for themers to use, use firebug to check it out.
Known Issues
Project information
- Seeking co-maintainer(s)
Maintainers are looking for help reviewing issues. - Module categories: Content Editing Experience, Content Display, Developer Tools
- 51 sites report using this module
- Created by Manuel Garcia on , updated
- Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.
Releases
Development version: 7.x-1.x-dev updated 11 Jul 2018 at 15:53 UTC