feedback.js icon indicating copy to clipboard operation
feedback.js copied to clipboard

Decouple API and UI

Open baer opened this issue 13 years ago • 3 comments

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.

baer avatar Oct 02 '12 21:10 baer

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.

niklasvh avatar Oct 03 '12 00:10 niklasvh

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?

baer avatar Oct 03 '12 02:10 baer

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.

niklasvh avatar Oct 03 '12 22:10 niklasvh