send-feedback electron element - that could be used to get user feedback from electron app
This is documentation for all the methods on the send-feedback
element.
logs
This is array by default, if you want to attach logs to body (The issue discription provided by user) you can push the file path to this array.
removeDefaultStyles
A property if set to true, will remove the default styles. This property can be inherited from
constructor class of this custom element if set to true
.
customStyles
A property that you can set to add custom css.
loaderSuccessText
✔ Feedback sent.
The text of loader when the reporter is successful in doing it’s job.
loaderErrorText
❌ Error sending feedback! try again..
The text of loader when the reporter fails in doing it’s job.
useReporter(function || reporter, reporterData)
You can pass in custom reporter that will be called with logs, body and title.
logs are formatted as { filepath: fileContent }
filepath is whatever was pushed to logs
For customizing elements see customizing send-feedback element, it can be customized by setting attribute or by properties on element.
showLoader()
This will show a loader with text specified in loaderSuccessText
.
hideLoader(error)
This will show a loader with text specifedi in loaderErrorText
.
safeHideLoader(error)
clearFeedbackForm()
This will clear the title input, and feedback textarea. This is called only when a reporter is successful.
This will only hide loader if needed to be.