BabelExt icon indicating copy to clipboard operation
BabelExt copied to clipboard

Would you like quite a lot of changes?

Open andrew-sayers--frontier-forums opened this issue 9 years ago • 6 comments

Hi,

I've used BabelExt as a framework for building forum extensions (a bit like RES, but on a much smaller scale). I've added quite a bit of functionality as part of that work. Would you be interested in taking some or all of it upstream? Major changes include:

  • PhantomJS build system. I know it sounds crazy, but if you think about it, PhantomJS is a cross-platform technology with great support for JSON and XML config files, that can programatically push new versions to every major extension portal
  • Browser preferences (or settings, or whatever your browser calls them). I take the point that making your own HTML config page is better for complex stuff, but my users asked for it so I've added it :)
  • BabelExt.utils.dispatch(). Dispatches to different callbacks depending on the URL, parameters and page elements, and passes in stored values and preferences. For certain types of extension (i.e. what I wrote), this makes the actual extension much easier to read and write

I realise there's a lot of stuff here so I don't expect you to accept the request wholesale. But please let me know what if anything would interest you in principle, and what if anything I can do to put it in a format you'd be happy to pull.

Holy cow, I'm super interested! I can't review this all right now, but I didn't want to leave this much longer without a reply.

PhantomJS build system. I know it sounds crazy, but if you think about it, PhantomJS is a cross-platform technology with great support for JSON and XML config files, that can programatically push new versions to every major extension portal

The author of PhantomJS is a former coworker of mine, and it's great stuff. I'm totally for this kind of thing. I'm not sure if maybe grunt/gulp might be better options, but to be honest I've not had time to play with any of the above.

Browser preferences (or settings, or whatever your browser calls them). I take the point that making your own HTML config page is better for complex stuff, but my users asked for it so I've added it :)

I'm definitely interested in having a peek at this, although my initial plan was to drastically clean up how the RES console works, because it does data-driven form generation and works pretty darn well in my opinion. That said, I want to see how your solution works! It may be a better fit for simpler addons without much in the way of settings.

BabelExt.utils.dispatch(). Dispatches to different callbacks depending on the URL, parameters and page elements, and passes in stored values and preferences. For certain types of extension (i.e. what I wrote), this makes the actual extension much easier to read and write

I'd love to see an example of this - just reading the paragraph I'm not sure I 100% grok the setup, but I want to check it out...

Long story short: I'm totally interested and I'm super excited that someone has been using BabelExt! I haven't heard from very many people, and I know it's very barebones right now. I haven't been super motivated to improve it a lot because of both a lack of time and a seeming lack of interest from anyone but myself, so this is really, really exciting! Thank you so much!

I promise to have a look over all of this soon, it would be great to chat a bit more and see what we can do here!

honestbleeps avatar Oct 27 '14 22:10 honestbleeps

Hey, I'm expecting a really busy week this week. In case I don't get another chance to talk, here's a few quick points:

Definitely agree preferences make more sense when you just need a couple of things and don't want to write a whole page for them. In short, I've borrowed Mozilla's simple-prefs API and got PhantomJS to spit out equivalents for Chrome (way more flexible) and Safari (just about as flexible). I have to admit I've only tested Safari minimally, but it seems to be the lowest common denominator for preferences. Anything more than a handful of options and it's too hard to make something cross-browser.

My GitHub page has both the projects I've used this with. The interesting parts are probably extension.js (1 and 2) and settings.json (1 and 2).

The dispatcher is kind of an organising principle for the "extension.js" files, although you might be able to tell I was still pondering the best way to use it as I wrote them. The settings are interpreted as JavaScript so comments etc. work, but the ".json" extension made more sense in context - if I've done my job right, they should give a decent idea of how things fit together.

Do you think this will ever be merged?

ghost avatar Jun 22 '15 00:06 ghost

@voltagex - have you had the chance to try it out and/or review? I have been insanely busy and while I'm excited to look at these changes, my free time has sadly been very very limited. This is a monstrously large PR and so I believe it really needs some peer review that I've not been able to commit yet.

I'm definitely open to merging it after some conversation and some clarity.

honestbleeps avatar Jun 22 '15 18:06 honestbleeps

Just at a glance it needs to be split up.

I won't have a chance to test it properly for a little while.

ghost avatar Jun 22 '15 23:06 ghost

I'd sincerely like to get some or all of it merged, it's just so monumental it's hard to review. A split would help immensely so we could at least test/merge bits of it piecemeal and decide if anything is/isn't right. For example, I'm not initially sure if I agree with the inclusion of the CSS files, etc - but I haven't had the opportunity to fully review.

honestbleeps avatar Jun 22 '15 23:06 honestbleeps