*Why* do you want UserScripts?

trevor's Avatar

trevor

08 Jan, 2009 08:29 AM

The issue of UserScripts (rather, Propane's lack of them) has suddenly come up rather a few times, and (as I write this) Propane only went on public release this morning.

Note: let me be perfectly clear early on - I'm not saying 'no' to UserScripts. This little missive is to start the ball rolling to make sure I get the feature right.

Here's why there are no UserScripts: I originally wrote Propane just for me - to scratch my itch.

After a while, I let my colleagues at ENTP use Propane and sat back and watched them for a long time (months).

Every time I saw an obvious pain point when we used Campfire, I added a feature. UserScripts were never on my radar because I'd just bake the goodness right in.

Obviously that's not going to scale - I can't watch everyone - and UserScripts are a great way to (as @Caged is fond of saying) "outsource the awesome".

So here's the deal:

It would be utterly trivial to look for a JS file in app-support and run it at a known point (where I install my own JS based hooks). It's about 5 minutes of effort.

I immediately think that's an overly-simplistic solution though. If the popularity of per-room notifications and feature requests asking to "ignore the actions of certain users" is anything to go by, a single JS file isn't going to cut it.

I could take the same route as Fluid, and integrate Greasekit directly into Propane. No clear idea on how much effort that is without looking over the code - shouldn't be a killer though.

It would certainly be a powerful tool, however I don't like that approach either because it feels too 'generic'. The whole point of Propane is to optimize the experience just for Campfire.

If a user wants a script to only run for a given room they shouldn't need to know the room's URL. Heck, I hide the URL because it's an implementation detail - it's got nothing to do with Propane's primary goal of sharing ideas with people.

I'm convinced there's a better and more natural way to expose hooks to let you customize the user-experience in Propane - but I need to know what sort of pain-points you "it needs userscripts" folks plan on addressing.

That way I can craft a solution that's optimized for Propane/Campfire rather than just bolt in something powerful-yet-generic that ends up feeling half-assed when you use it.

Your feedback/comments here would be appreciated.

Thanks, Trevor

  1. 1 Posted by Ian Beck on 08 Jan, 2009 04:51 PM

    Ian Beck's Avatar

    Although I'd count myself as an advocate for userscripts, the only reason would be if you weren't going to bake in the functionality in other ways. For instance, I vastly prefer your notification system over my Fluid+userscript system I've been using previously. It's easier to configure, better integrated with the app, and less prone to missing messages or other bugginess.

    On the other hand, take something like hiding enter/leave notifications. If for some reason something like this wasn't something you wanted to integrate with the app, then I would want to have the option to be able to extend the app with a userscript. There may well be other, even more fringe requests that would be better examples; that's just a specific feature that I was wanting that would be easily addressed with a userscript.

    For me, then, I'm only inclined to request userscripts if you're inclined to keep the app's featureset fairly minimized. If your philosophy is quality of implementation over customizability and you're open and responsive to feature requests (as you appear to be), I can certainly respect that. I may not get the features that I want as quickly, but ultimately if they do make it in they'll likely be better.

    And that's all I've got.

    Ian

  2. 2 Posted by Eric on 10 Feb, 2009 03:38 AM

    Eric's Avatar

    The biggest reason I would want userscripts is to do custom things with input or output.

    A great example is the userscript to translate twitter URLs to twictures, so if you end up pasting a twitter link (instead of dragging it), it'll give you a twicture anyways:

    http://github.com/defunkt/lacampfire/blob/cc8ecb2424f60bd35648971589d330cddd9ec562/lacampfire.user.js#L17-21

  3. Support Staff 3 Posted by trevor on 10 Feb, 2009 08:56 AM

    trevor's Avatar

    Hey,

    while feedback from only two people is hardly enough of a sample to declare something as a "vast majority" I'm going to go ahead and try it on for size:

    It looks like the "list of userscripts propane should load" is going to be the same for all rooms in the vast majority of cases. I.e. it's not likely you'll want a subset of rooms to auto-twicture or "hide enter/leave notifications".

    That's not to say you couldn't have your userscript be per-room aware, just that Propane doesn't need to confuse the average user with too many options.

    Do you guys think that's a fair statement to make?

    Trev

  4. 4 Posted by Eric on 10 Feb, 2009 04:06 PM

    Eric's Avatar

    I totally think that's a reasonable first step.

    I can't picture cases where I would want room-specific userscripts, but it wouldn't surprise me if I came across such a case in the future.

  5. 5 Posted by Ian Beck on 10 Feb, 2009 05:11 PM

    Ian Beck's Avatar

    I agree with Eric on having userscripts be app-wide not being too limiting, particularly for the here and now.

    I like the idea of flexibly being allowed to assign scripts to specific rooms in theory, but I can't think of any examples in practice where I would find it useful enough to justify the increased complexity.

    Ian

  6. 6 Posted by System on 14 Feb, 2009 01:24 AM

    System's Avatar

    A Lighthouse ticket was created for this discussion

  7. 7 Posted by michael on 01 Mar, 2010 04:18 PM

    michael's Avatar

    Has anything become of this? There are certainly some changes I'd like to make to the app (hiding all the entered/left room messages, for one), but I don't know if there's any way to accomplish that. Thanks!

  8. Support Staff 8 Posted by trevor on 19 Mar, 2010 04:36 PM

    trevor's Avatar

    Hey,

    Hiding entered/left messages is actually a pretty pervasive request and it tickles another feature with Propane: notifications.

    It would be (at least initially) confusing if you installed a userscript to remove enter/leave notifications but didn't update your notifications preferences. You'd see the unread count increase in the tab-bar, but there wouldn't be a new message in the transcript...

    So for "hide enter/leave messages", I think that needs to be a first-class feature of Propane.

    You'd activate it with a simple checkbox (lowering the barrier to entry compared to a userscript). When activated, enter/leave messages would always be removed from the historic transcript.

    Incoming enter/leave messages would also be hidden, unless (in notification preferences) you have checked "I want to know whenever someone enters/leaves the room".

    Trev

  9. 9 Posted by Christopher Hau... on 25 Mar, 2010 05:43 PM

    Christopher Haupt's Avatar

    Big thumbs up on the hiding entered/left messages feature from the team here at Webvanta. Because of our mobile nature and the every changing flow of people in the rooms, these sequences really get in the way for us.

    Did scripting progress? As far as scripts go, we use that kind of functionality in other apps for triggering special messaging/formatting to tie together messages that feed into campfire as a hub (e.g. github, ci server, etc). Nice to have, and can be global in nature. Would be cool in Propane.

  10. trevor closed this discussion on 28 Aug, 2013 08:10 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac