Babble - A Chat Plugin [ARCHIVE]


(James Kiesel) #1

Note! This topic has been deemed a MEGATOPIC and has been archived; there is lots and lots of information here that is out-of-date or irrelevant. Please refer to the new topic for Babble for more up to date information.

Have a great day! :sunny:


Chat Plugin features
Using Babble to extend functionality of private messages
Has anyone built something for informal status updates - Chat?
What should on-site chat look like?
Quick Messages Plugin
Clicking on a tag causes loading error
Quick Messages Plugin
What should on-site chat look like?
Discourse Narrative Bot Alpha Feedback
Retort - a reaction-style plugin for Discourse
Thoughts on a plugin which turns discourse into stackoverflow
Is there a live communication element to Discourse? More like IRC than forum
Installing a particular commit of a plugin?
Changing username colors
User feedback plugin
Chat Plugin features
Suggestion: Should we change Messages To Chat?
Does Discourse have a chat room function?
No "Members Online Now" block but how about a Green Dot?
Scrolling through large topics with 'j' instead of mouse sometimes gets stuck
Issue with Emoji Picker due to Babble plugin
Chat client suggestions?
Chat System while logged into Discourse
Hubot Adapter for Discourse
Material Design Stock Theme
See who all are writing replies to a topic
Integrate discordapp into discourse plugin
Topic List Previews
Badges page not displaying
#2

I cant’ believe

I will test the plugin, and give feedback.


(James Kiesel) #3

Thanks @Devanil!

As mentioned, it’s still in a pretty nascent stage of development (as in, many things don’t work yet), but happy to hear whatever feedback you have.


#4

First, sorry for my english. I hope I can be understood.

Great plugin. Fabulous. I’m really happy to see it being created. I saw the todo list and I think that all necessary basic improvements are listed.

Some doubts and feedback:

  • The sidebar is merging with the footer? For me the footer is gone, for
    another user is appearing below the chat.

  • The sidebar would be the best position? Would not give problem on the
    phone or tablet? Is it not better above the topic list?

  • It is better the enter send the message, instead of a button, since it is a chat.

  • I think a small name would be nice. As Facebook does in group
    conversations. Only the avatar makes more sense when it is a
    conversation of two people.

  • It has a bug that makes posts disappear. I do not know why. The topic
    "Title for Babble Topic" is inaccessible. This is normal?

update: I think it is not disappearing. But when the page is refreshed, the chat opens in the beginning. And the latest posts do not appear.

  • The chat increases the number of user posts?

(James Kiesel) #5

Great stuff @Devanil, thanks!

Responses to some concerns:
The sidebar’s really rough right now, I agree. In my head I was thinking the following about it:

We add BabbleSidebar and BabbleDropdown site settings which allow you to pick whether the chat appears on the navbar, the sidebar, or both. Potentially could add support for putting it in other places as well, like above the topic lists as you mention? (Personally I think having it there would be too prominent for me, but I don’t think it’s a massive effort to support it.)

On mobile (ie, at a certain minimum screen width), we do some css-fu to hide the sidebar and replace it with an icon that you can press to make the chat full screen.

Good feedback on the user name and enter to submit, those are easy wins I’ll put on the TODO list, and you’re right that chat shouldn’t affect user post numbers.


(Mittineague) #6

Keep in mind that there has been discussion about making the hamburger menu a slide out instead of the current drop down.

You may want to develop other aspects before you get too deep into it only to have it break later.


(Joe Seyfried) #7

Strange. This is not really working for me - I have to reload most of the time to see the new posts… especially my own.


#8

Any progress? :pensive:


(James Kiesel) #9

Sorry for the delayed reply; I finally got some time carved out over the weekend to work on this thing; I’ve made some good progress, although there are still a few things to take care of before it can really get used. (Specifically live updating the notification counter in a reliable way has been tricky thus far.)

In any case, do feel free to give it another hoon if you’re so inclined; I’ve updated the TODO.md and README.md with the current state of development.

Got the chance to chat with @sam in person about this thing; he gave me some great insight for what a mature version of this plugin might look like. :smile:


(Joe Seyfried) #10

This starts to look really promising. However, I ran into a problem on both Firefox and Chrome (oddly enough, Safari works fine):

TypeError: Cannot read property 'last_read_post_number' of undefined
at Discourse.Babble.Discourse.Babble.refresh 

and…

 Uncaught Error: Property set failed: object in path "topic" could not be found or was destroyed.

If I find some time, I will try this on a fresh Discourse container, or even better, from my dev version, but maybe @gdpelican can figure out what goes wrong from these errors already?


(James Kiesel) #11

Cool, thanks for the feedback; I’ll put it on the list of things to look at.


(Joe Seyfried) #12

Oh. Here are some new findings: the problem seems to be browser-independent (repro also with Edge). However: it is account-specific! My admin account can access everything just fine. All accounts with lower permissions fail to retrieve the babble topic. FWIW, the error completely breaks all drop-down menus, so you cannot access your account, notifications, or even log out…

Weird addition: the babble topic appears in my admin account (“Title for babble topic”), but I cannot enter that topic. If I try (its URL ending on http://…/t/title-for-babble-topic/-1/2), I end in the Admin Quick start guide.


(James Kiesel) #13

Sweet, those are emminently fix-able things (I have a bad habit of testing stuff out with admin accounts it seems)

The admin topic thing is an artifact of the way we’re storing the chat thread as a deleted topic, which is much less than ideal but was the easiest thing that worked to start.

Ideally I’d have a flag on a topic which marked it as a chat topic, which would mark it to behave differently than your typical topic (don’t show up in the topics view list, don’t increase a user’s post count when posted to, etc.). But, I’d really rather not involve DB changes or migrations in this plugin if possible, so rooting around a bit to find a better way to store chat topics is going on the list.

Thanks again for your sharp QA eye, @JSey!


(Kane York) #14

Mark it as unlisted. That’s the visible database column.


(Joe Seyfried) #15

You’re very welcome, @gdpelican - looks like you’re finally creating what I’ve been trying to do for a while - but since I was missing some Ruby+ES6 XPs plus a truckload of time to dig myself into this: a huge thanks for your work. This could be one of the missing pieces I was waiting for before I can go live with my Discourse project…


(Joe Seyfried) #16

The topic is created as invisible already. I guess the culprit lies in the fixed topic ID of -1. Could that cause the problems, @riking? In my previous shoutbox attempts, I tried to determine the one topic by slug/title - which may fail, of course, but only if there is already a Topic with the odd title “Title for Babble Topic” - you might even add an MD5 to that (or change it to some magic string, like f9a171080d7f4e64e59ab886ac0d8316) since (almost) no one will actually see it.


(Kane York) #17

OK, yeah, it’s not going to like that. Use a client site setting to store the topic ID.


(James Kiesel) #18

Since we’ll want to pull this out into multiple chat topics in the not-too-distant future, I spent a little time today on a different approach; creating a user similar to the hidden Discourse.system_user (with ID -2 instead of -1), and have that ‘person’ create all the chat topics, which will be set to invisible by default.

This will allow us to get our available chat topics by going Babble::User.find_or_create.topics, and allow for a pretty easy path to a dashboard where an admin could create, delete, or moderate chats as necessary.

Thoughts on this, @riking?


(Jonathan Pautsch) #19

This is amazing, I can’t wait for more updates! I’ll see about maybe brushing up on the codebase and helping contribute, I’d love to see this plugin fully developed. Not much free time lately though so no promises. :wink:

I actually came here to say I ran into the same error, except it then mysteriously resolved itself. Perhaps it was a caching issue.


(James Kiesel) #20

I fixed it today, but also it had to do with the topic not being set up correctly the first time through, so it may very well have fixed itself on your installation as well :heart: