freeman-lab / control-panel

embeddable panel of inputs for parameter setting
MIT License
237 stars 17 forks source link

Prama finds #10

Closed dy closed 8 years ago

dy commented 8 years ago

Hi @freeman-lab, very nice lib! I was really laughing hard when I saw this repo, as recently I’ve spent 3 days on exact functionality in prama (parameters manager). Funny thing is that API is literally the same. But prama is nowhere close to the nice style of control-panel. Therefore I can just share bugs and features I stumbled upon. First off, it seems range slider does not work in iOS. I used Lea Veorou’s multirange for that purpose. Second, it would be really nice to have control panel draggable, because some components, like gl-spectrum are full-screen. Though that task can be solved by user. Third, I found that saving and loading current state to sessionStorage might come in handy at debugging, to avoid setting up parameters anew each page reload. Wished I knew that package 3 days before!

rreusser commented 8 years ago

Yup. Range slider = my bad. No good reason that's not implemented, just kinda ad-hoc and nontrivial to get all the touch behavior just right. 😄

freeman-lab commented 8 years ago

@dfcreative cool thanks, funny coincidence! This is great info, really helpful to know. I'll make issues for these points.

I also just checked out gl-spectrum, that's really nice! I've done something similar for a few art music things (not nearly as well) so am excited to see how you did it. 👀 😄

dy commented 8 years ago

I considered your code and functionality (I like it very much actually), and I have a proposal which can be winning both for control-panel and prama, to avoid duplicating. I can take control-panel as a dependency for prama, and provide high-level interface for it, in particular:

In turn, control-panel will be responsible for managing components, their values, state, style. I think it might be winning both for users who want fast-and-furious settings (instead of test runners btw) and for the ones who want minimal code with high customization (pure control-panel). It also will clean up and separate concerns of both packages. Anyways I was going to spend some time on it.

The only thing, I need a couple of improvements to the API of control-panel:

rreusser commented 8 years ago

Don't mind at all! Everyone wins!