Code Monkey home page Code Monkey logo

babble's Introduction

A Shoutbox style plugin for Discourse.

Code Climate

You can view some ongoing discussion about this plugin on Discourse Meta

Demo

Check out a live instance of Discourse with Babble installed on it here: http://discourse-babble.com (You'll have to make an account to see the chat)

Installation

Edit your web template and add the project clone url. Then, rebuild your web container so that the plugin installs. Check out the official guide for more info.

- git clone https://github.com/gdpelican/babble.git
Adding a chat channel

To create a new channel, visit the admin/chats route, select 'Make a New Channel', and create a chat.

You can either create a channel available to a particular category, or one available to a set of groups.

Other usage notes
  • Babble is now configured to appear as a sidebar, which should result in a better experience overall. You may choose whether it occupies the left or right side of the screen in the settings (On small screens, it will automatically expand to take up the whole screen)
  • If you have a custom header, Babble may not play nicely with Discourse's somewhat complicated scrolling behaviour. To account for this, turn on the 'Babble Adaptive Height' setting under /admin/site_settings/category/plugins?filter=babble
  • Your users can disable babble for themselves by selecting the 'Disable Babble chat completely' option under the 'Interface' section in their User preferences
  • Babble also offers an option to play a notification sound when new messages are received

Contributing

Bug reports

Check out the issues list to take a look at known issues and report ones we don't know about yet.

Code

Pull requests welcome! See CONTRIBUTING.md

Translations

Babble is currently available in English, German, French, Spanish, Italian, Finnish, Russian, Polish, and Korean. If you'd like it translated into your language, let me know! Babble is now on Transifex, which should result in a better translation experience for all.

Donations

Babble is free and open source and always will be. If you feel you've gotten value from using it and would like to support the developer behind it, please use the link below. <3 <3

Donate

babble's People

Contributors

angusmcleod avatar danielvlopes avatar davidgnavas avatar eviltrout avatar gdpelican avatar glouds avatar gtanczyk avatar icq4ever avatar joesey avatar kacpersaw avatar kamilaborowska avatar lassik avatar lis2 avatar mathieubruguier avatar merefield avatar miguelangellv avatar piamancini avatar pmusaraj avatar pr000t avatar rizka10 avatar sesamoeffnedich avatar ted-strauss-k1 avatar teejo75 avatar tgxworld avatar tomekgnomek avatar willwh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

babble's Issues

"Could not save that post" with code 422

Hi !

I don't know why, but I get a 422 when I try to add a message to chat.

POST http://xxx/babble/topics/117/post 422 (Unprocessable Entity)

I get the error message "Could not save that port. Try again later" in Babble. However, the post is created in the topic, and a page refreshing update correctly Babble.

Do you have an idea ?

Clear old notifications

Currently a user who logs in infrequently will see a count of all the chats since they last logged in. This can be in the hundreds... This is a meaningless and intimidating number to a user who hasn't discovered the feature yet.

Even when they finally view the chat window, they can only see the last 20 or so chat messages. The last post might be several days old. Telling them about hundreds of unviewable and/or stale messages is pointless.

I propose to clear all chat notifications older than 24 hours. This will prevent a buildup over time.

Alternatively, reset the counter to zero when the user logs in after a long time gone. Then when a "1" appears, it will make a visual impact.

Discourse displays notifications “1 new or updated topic. Click to show.” for the chat thread.

When someone posts in the chat thread, two things happen: Babble displays the notification badge, and Discourse notifies about new or unread posts. This is confusing… However, I think this should be handled in core Discourse: hidden topics should not push notifications, because clicking on the banner results in: nothing.

(sorry - I seem to click every button available around here. It's getting better now, I hope. ;) )

cf.: https://meta.discourse.org/t/non-staff-receive-notifications-of-unlisted-topics/24276/7 - I guess we should try to revive that discussion over there…

Ctrl+Enter not working in Firefox

First: great work on the 0.4.0 release!

Minor nitpicking: the Ctrl+Enter functionality (which is great, btw - and my team has just yesterday started to complain that you cannot insert line breaks but for
s) does not work for Firefox. This is simply due to the fact that Firefox does not convert Ctrl+Enter or Alt+Enter into line breaks when handling input (unlike Safari or Chrome).

I will send a PR for a very basic fix: allow Ctrl, Alt and Shift as modifiers to let a keycode 13 pass through. The great thing about that would be: it allows users to stick to the habits of their favourite browsers.

feature request: filter babble topic from email digest

I am getting babble posts showing up in my email digest, which is weird. I see 2 possible ways of fixing this: i) force exclusion of the babble post from digest. ii) provide a setting (checkbox) that filters out all posts from designated babble category from the digest.

Un-hard-code Babble User id

Currently the id of the created Babble::User is hardcoded to -2, which is a little bit safe but not that safe. We should extract this to a hidden site setting, per the suggestion here

Channel title restrictions

When creating a new channel, the Channel Title must meet all the requirements of a topic title - min length, min entropy, prettify, no duplicate topics, etc.

It would make sense to bypass the usual restrictions for a chat title. "Live Chat" for example is too short to meet the default 15 char minimum.

If the title is not acceptable, the only error given is "Unable to save that chat channel. Please try again." This is too generic, it can indicate any number of problems with the plugin.

Either:

  • bypass the usual title requirements
  • show more descriptive errors
  • have an error log somewhere

Delete old messages?

I think that large topic could low performance and database. I think that babble should delete the last messages, not "mark as deleted", delete from database.

Maybe keep the 200 last messages?

Number in notifications

After a massive chat session yesterday, one of my team colleagues (who missed the session) mentioned that the notification stated a very high number of unread chat messages - but the number of messages visible in Babble was much lower. We should introduce a max() here…

Title overlaps text on mobile

Something's up with the CSS on the chat channel title. Desktop is not affected, only mobile. It's positioned lower than it should be and overlaps with the text area. When scrolling this frequently means overlapped text.

I don't think its a text overflow problem. Even short channel names such as "chat" are affected.

See screenshot:
screenshot_2015-12-02-12-37-22

Lacking responsiveness for mobile phones

Unfortunately, I don't really have a clue on how to tackle this, but I thought I'd report it anyway: if you try to use the shoutbox from a mobile phone, you will most likely end up with the on-screen keyboard hiding the input box. Furthermore, you cannot scroll up, so you basically have to type your shout text blindly.

Tested this on an Android device, I don't know about iOS.

Babble displaces system notification badges in fix-this-thing?!

I just gave the fix-this-thing branch a spin on the latest Discourse - with very odd results. Before Babble is active, everything's fine. After installing, the system notification looks like this:
bildschirmfoto 2015-09-02 um 19 54 07
...because there's a .d-header .icons .unread-private-messages style definition with a ridiculous left:82px; - I don't have any clue where this might come from. Just wanted to post my findings… :(

Negative chat count appearing

Just got a report of a '-31' notification count appearing on the babble icon

A quick patch would be to ensure that we never display a negative number, but I'm more interested in why that number would ever be negative. The code for calculating it looks like this:

    var totalUnreadCount = topic.highest_post_number - topic.last_read_post_number
    var windowUnreadCount = _.min([totalUnreadCount, topic.postStream.posts.length])

which means that topic.highest_post_number < topic.last_read_post_number, which currently in my brain == wtf

Hook into Discourse I18n

Instead of hard coding string values (such as 'Send', and the placeholder message suggested in #9), we should be hooking into Discourse's client-side I18n so the strings can be translated.

Minor glitch on older Firefoxes

Here's how Babble looks like in Firefox ESR 17 (I know… but Discourse has a minimum spec of FF 14):

bildschirmfoto 2015-09-12 um 18 53 30

(Happens only when the browser window is relatively small and spans the whole browser height…)

Timestamps show “invalid date” in Safari+Firefox

This is an issue I only came across in Safari:
bildschirmfoto 2015-08-04 um 19 41 20
These disappear after a reload, the generated HTML reads as follows:

<span class="relative-date" title="Invalid date" data-time="NaN" data-format="tiny">Invalid date</span>

Image scaling with correct aspect ratio?

Tried pasting an image for the first time yesterday. I like that the width is scaled, but it doesn't seem to scale the height accordingly? In short: the aspect ratio looks way off to me:

screenshot-chanologynorge org 2015-08-28 08-06-15

A horizontal slider/scroller also cropped up after pasting the image.

Chat topic creation for special groups currently undocumented

First of all, congratulations for this release - this is great stuff!

I have found one inconsistency: if a user has insufficient rights to read a chat topic, they should not get the topic switcher or the topic name in the list of chat topics. They cannot click into that chat, however, but they should not see that list in the first place.

Differentiate current user's chat messages

Probably by floating the current user's messages to the right, and perhaps applying some different styling to those messages, a la FB messenger, tinder, whatsapp, etc.

I'd like to make this configurable, with a default of 'off' (although depending on how good it looks I might be convinced to default it to 'on')

This will require a touch of design; if you're thinking to pick this up, I'd love to see a rough sketch of what you're thinking before implementing 😄

Temporary unread count on submitting a message

Currently, submitting a message causes an unread '1' to briefly appear on the bullhorn, then disappear once the post is deemed 'read'

Ideally we'd know that a post coming back from MessageBus is written by the current author and treat it as automatically read.

Notification badge on bullhorn icon not appearing

Expected behavior: when someone posts a chat message, it should either instantly show in the chat message list (which is working) or it should display a badge on the bullhorn icon like so:
bildschirmfoto 2015-08-04 um 18 49 14

Actual behavior: the chat message list updates all right, but if it's closed, the notification badge only displays if you reload the site.

Display 'no messages yet' placeholder when topic is empty

Currently, creating a topic starts the user out with just a composer, and no indication of what the heck this thing is.

I'd like to have some sort of placeholder message there to tell the user 'This chat channel is empty. Type in a message below to get started!'

Not working in new beta v1.5.0.beta7 +3

I've just updated my site (via full rebuild) to v1.5.0.beta7 +3 and now the babble icon is no longer visible. The plugin is enabled and working in so far as settings are concerned, but there is no interface for it now.

Editing my last post

Many chat clients support some window of self-editing functionality; I imagine it'd be nice to type something, hit the 'up' key, and be able to edit your last post for some short amount of time after it's posted.

Could not find module `discourse/mixins/presence`

Hi y'all... I'm back. And currently, I'm trying to catch up with all the great stuff you did while I was away. Currently, I'm running into this:

[Error] Error: Could not find module `discourse/mixins/presence` imported from `discourse/plugins/babble/discourse/components/babble-composer`
    end (vendor-2e72f89b7b393cd8eb92fe563e177473.js, line 11)
    (anonyme Funktion) (vendor-2e72f89b7b393cd8eb92fe563e177473.js, line 11)

…any ideas?

…yeah; I do! ;)…:

Addition 1: must have been this here on the mothership: discourse/discourse@02a968b
(I wonder when Discourse is really stable enough to really code plugins… sigh)
Addition 2: can be closed by applying this: #22

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.