TypeScript Plugin for Feedback Focal.
npm
npm install @feedbackfocal/plugin
yarn
yarn add @feedbackfocal/plugin
- Import
addFeedbackFocalfrom@feedbackfocal/plugin. - Call
addFeedbackFocalinmain.tsxand pass configuration:
import { addFeedbackFocal } from "@feedbackfocal/plugin";
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<App />
</React.StrictMode>
);
addFeedbackFocal({
projectCode: "<project-code>",
screenshotMechanism: "<screenshot-mechanism>",
});Key: projectCode
Description: A UUID associated with a project in Feedback Focal. All logins, feedback, and review sessions will be routed to the associated project.
Key: screenshotMechanism
Description: Specifies the mechanism through which screenshots should be taken.
Options:
screen-capture-api
- Captures visually accurate screenshot using Screen Capture API.
- This method will prompt the user to allow the screenshot to be taken and manually select the current tab unless their browser supports the experimental preferCurrentTab option.
- All major mobile browsers do not support the Screen Capture API.
dom-to-image
- Mimics a screenshot by cloning the DOM, painting it on a canvas, and converting that to an image.
- Currently uses bubkoo/html-to-image to handle the DOM to image conversion.
- Does not require additional prompting of the user and (theoretically) should work in all browsers, unlike the Screen Capture API, but produces lower quality images which commonly have artifacts or other rendering issues, and may not accurately represent what the user sees.