Speccing out a full page chat plugin

Right, so the mvp would include the following:

  1. A chat topic type. Personally, I think we should add a new Topic Archetype: chat, adding to the existing archetypes: regular, private_message and banner. A significant difference in the backend between Babble and Quick Messages is that @gdpelican has created a more custom topic and post architecture, whereas I have largely used the existing architecture and just distinguished quick messages from normal private messages via a custom_field. Neither of us took the route of adding a new topic archetype, but considering that we may want this chat plugin to integrate closely with various pieces of existing Discourse logic, I think a new archetype is the way to go. Before we start we should sort out our thinking here. Some notes about the chat topic archetype:
  • It will need to be entirely excluded from discovery streams and normal topic view.
  • There will need to a restriction on how many can be created for each category (i.e. 1).
  1. An auto-sizing single line composer with emoji, markdown and support for attaching pictures. This could be either component-based (quick messages) or widget-based (babble). This is relatively plug and play from our existing work.

  2. Override the default rate limiter for posts in chat topics. Equivalent code in quick messages. We will need a rate limiter, the question is how low it is set: 1 second?

  3. Remove or significantly increase the time-based limits for posts in chat topics. Equivalent code in quick messages. Do we want any time-base limits on chat messages?

  4. Remove or significantly reduce the maximum length for posts in chat topics. Equivalent code in quick messages. This is a key difference between chat and long form discussion. Personally, I don’t think there should be any length requirement for chat posts.

  5. Remove or alter the check for duplicate content for posts in chat topics. Equivalent code in quick messages.

  6. Remove or alter the check for whether the post content is sufficiently ‘descriptive’ (I haven’t done this in quick messages). Discourse code.

  7. A widget-based (babble) or component-based (quick messages) post stream. Both Babble and Quick Messages use the existing postStream model for topics. This is relatively plug and play from our existing work.

  8. Post actions on posts in the chat postStream: edit and delete. This exists in widget form in Babble. If we go the component route, it should be relatively easy to create equivalent components that leverage the existing postStream functionality.

  9. Add a new category sub-route for chat, toggled by a setting in the category settings. User access to this route would be via a button in the category discovery UI. Like Unread, the button would include the number of unread chat messages.

  10. Tweak the notifications produced by the chat topic to:

  • Visually distinguish them for the user
  • Route the user to the right place (i.e. the category chat stream rather than a topic).
  1. Prevent chat topics from producing email alerts. While we may want to add email alerts about chat in later versions, they should probably be entirely occluded for the MVP.

I agree. I basically copied Facebook Messages’ approach for quick messages, however I focused on the message menu and pop-up chat-boxes. For this plugin we could start with the full page part of Facebook Messages and perhaps add the menu and pop-up chat-boxes later. In terms of the MVP I’m thinking that we should not include any private chat work.

7 Likes