MoOx / tab

Pretty new tab for you browser.
http://tab.putaindecode.io/
MIT License
47 stars 9 forks source link

Choose a thing so user can extend page behavior/style #22

Closed MoOx closed 10 years ago

MoOx commented 10 years ago

Ref #18

MoOx commented 10 years ago

Also https://github.com/putaindecode/pretty-new-tab/issues/12#issuecomment-57625266

armandabric commented 10 years ago

All this feature have one thing in common: it will increase the complexity of the page. This not a problem: it's a choice to make. Will this page stay basic ? or we want to really be customisable/have a more functionalities ? If yes, it will be needed to refactor the code be compliant with.

kud commented 10 years ago

Yep, true. Do we want to customise everything or just want a random image generator?

MoOx commented 10 years ago

You don't get my point. My point is just to make a external script loader (so users can code their custom stuff). This should take just a bunch of lines. Not that much.

Anyway, build + test are inevitable if project get customisation gui.

madx commented 10 years ago

The page must stay basic, I think it is a great feature of the projet. However, adding a very simple way to add custom behaviour should be quite simple.

madx commented 10 years ago

I've been thinking about this a litte bit and here is what I propose:

This way, we can ship custom plugins directly in this repo, and users can still add their custom behaviour.

Here's an hypothetical example of what I mean:

loadPlugin("speed-dial") // #18
loadPlugin("pretty-clock") // #27

console.log("OMG THIS IS MY CUSTOM SCRIPT")
madx commented 10 years ago

Also, I think custom scripts should be able to add settings options to the modal, so we should make the settings manager able to handle this fact

MoOx commented 10 years ago

I think we should really keep this simple for now & just support injected script from url or localstorage. Maybe offer a simple generic api (widget position ? configurable field ?) is a nice idea.

For now this issue should just correspond to script(s) injection. What about handling /?scripts=url1.js,url2.js&styles=url1.css ?

For config, I would like to be able to share my config with a simple url (this is a nice feature isn't it ?) But this is more something we should handle (url + localstorage) in #12