niklasvh / feedback.js

Feedback form with screenshot
http://experiments.hertzen.com/jsfeedback/
Other
870 stars 196 forks source link

Decouple API and UI #11

Open baer opened 12 years ago

baer commented 12 years ago

As a UX designer I may want to hook into the feedback functionality from navigation elements other than a button.

The implementation encourages a very specific user interaction - namely using a bootstrap button floating at the bottom of a page. This feature will allow a developer to call feedback.js more simply and will remove the bootstrap button as the default UI.

niklasvh commented 12 years ago

This functionality was infact there already, but I had forgotten to expose the API in the script (fixed now). I added an example along with it (https://github.com/niklasvh/feedback.js/blob/master/examples/invoke_api.html).

As for the look, the library doesn't require bootstrap CSS to be included (it uses a minimal version with different naming, feedback.css), so the look and feel can be fully customized within that CSS file without affecting the look of the page even if it does use bootstrap.

baer commented 12 years ago

Cool thanks for that example!

As for customizing the CSS, the bootstrap stuff should probably be removed and included separately. Most people will include libraries in a /vendor directory separate from application styles in order to provide a clean upgrade path. I'd even be okay with having bootstrap as a dependency of the library as it seems to be a new standard on the web. Thoughts?

niklasvh commented 12 years ago

The two new examples I put up don't have have bootstrap css files included at all, i.e. only use the feedback.css which is specifically for this script and not bootstrap. Maybe it would be ideal to remove it from the index.html example as well, just to make it clear that it isn't part of the library nor necessary.