Should Discourse make an effort to become a viable comment platform?

I’m working on this now. The first version is for a headless WordPress site that uses the Remix framework for its front end. Once that’s done I’ll make a version for regular WordPress sites. It will likely be a plugin that extends the WP Discourse plugin. I’m hoping that most of what I’m doing on the headless WordPress site can be transferred over to regular WordPress sites, but it might require some compromises.

Allowing users to comment directly from an external site is trivial to implement. The main requirement is that the external site has access to the user’s Discourse credentials. That can be done either by using the external site as the DiscourseConnect provider for Discourse or by configuring Discourse to be a DiscourseConnect provider for the external site.

In the second scenario - where the external site isn’t the DiscourseConnect provider for Discourse - the first time a user wants to comment from the external site, they’ll need to click a link to connect their account on the external site to their Discourse account (or to register on Discourse if they haven’t done that yet). It can be fairly seamless from a user’s point of view.

The above change doesn’t make the whole thing feel like a regular commenting system though. A normal expectation for a commenting system is that you can read and interact with all the comments. The WP Discourse plugin only displays a selection of comments that are pulled in from a special route that’s provided by Discourse. It doesn’t provide any functionality for interacting with comments.

The difficult parts of the problem are:

  • paginating through all of a topic’s comments on WordPress, keeping in mind that there could be thousands of them
  • providing a UI that give a user some feedback about where they are in a long list of comments
  • figuring out how to display comments that are direct replies to other comments. (The Discourse convention for this is out of line with how most comment systems deal with replies.)
  • allowing users to reply directly to a comment, like a comment, edit their own comments, etc
  • dealing with comments that were created on Discourse that might contain content or markup that can’t be easily rendered or interacted with on the external site. For example oneboxes, polls…
  • providing a way of filtering comments by recent, oldest, best, etc…

This all needs to be accomplished without putting an excessive load on the external site’s server, making too many API requests to Discourse, or consuming too much memory on the user’s device (the goal is to make a lightweight comment system). It’s achievable, but it’s not something that can be just dropped into the existing WP Discourse code without making significant changes to it.

4 Likes