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

Make workflow steps optional and allow them to be ordered

Open baer opened this issue 13 years ago • 9 comments

As a UX designer I may want to change the workflow of the feedback mechanism to fit my particular context.

The current workflow is modeled off of Google's feedback mechanism and is somewhat static. For example in the context of Google+ it may be very useful to black out sensitive information. If this were implemented for site like www.NewYorker.com however, there might be no need to block out sections of the DOM. These steps should be modular, optional and have the ability to be ordered.

baer avatar Oct 02 '12 23:10 baer

Totally agree. It was one of the major changes I wanted to make in my previous update, where I changed most of the code/API into a more module driven approach, where they could setup manually which pages / steps should be included in the feedback process.

Currently there are only three modules, a Form module (which I think only supports textarea's atm), the screenshot module and a review module, and they are all included by default (https://github.com/niklasvh/feedback.js/blob/master/src/Core.js#L93-95). They can be ordered in any order you want, except for the review one, which only should/works on last page I believe (don't really see why you would want to have it anywhere else anyway).

For the screenshot module, an option to disable the blackout and/or highlight feature would be suitable.

niklasvh avatar Oct 03 '12 00:10 niklasvh

I think this is a good default ordering but this should probably be customizable in the initialization step.

baer avatar Oct 03 '12 02:10 baer

It can be customized by assigning the options.pages, i.e. for example:

Feedback({pages: [ new window.Feedback.Form(), new window.Feedback.Screenshot(), new window.Feedback.Review() ]});

niklasvh avatar Oct 03 '12 22:10 niklasvh

It'd be better if a user didn't have to new internal objects in order to customize the UI.

Feedback({ blackout: false; // defaults to true });

baer avatar Oct 03 '12 23:10 baer

The options passed to Feedback are passed along to the internal object of screenshot module, so:

Feedback({pages: [ new window.Feedback.Form(), new window.Feedback.Screenshot({blackout.false}), new window.Feedback.Review() ]});

would be same as:

Feedback({ blackout: false; // defaults to true });

niklasvh avatar Oct 03 '12 23:10 niklasvh

It's not that it doesn't work it's just best to make things as simple as possible for the users. jQuery and bootstrap just drop in and work. Are you opposed to this change?

baer avatar Oct 04 '12 00:10 baer

Maybe I misunderstood what you are after, but as I understood it, the functionality is already there as you described it (apart from the blackout: false option actually implemented)?

niklasvh avatar Oct 04 '12 00:10 niklasvh

The fact that I submitted this as an enhancement without realizing it was already there shows that these apis for customization should be simplified.

It would be really great to use feedback.js just by including it!

baer avatar Oct 04 '12 00:10 baer

Hi, great work greatly appreciated.

But now is there a way to skip the blackout/highlight step and take a screenshot of all page only?

The code you refer is not working anymore:

Feedback({
    blackout: false; // defaults to true
});
Feedback({pages: [
new window.Feedback.Form(),
new window.Feedback.Screenshot({blackout.false}),
new window.Feedback.Review()
]});

ricvale avatar Jun 20 '18 03:06 ricvale