feedback
feedback copied to clipboard
Refactor API to use strongly typed generics and push/pop style model
:scroll: Description
- Better feedback now has a generic type for an input object (passed into
show) and an output object (passed into hide, returned from show) that enforces end to end type safety - Legacy
simpleFeedbacksystem was moved to a static method (necessary to set the default type params) simpleFeedbacknow runs theonSubmitcallback before closing the feedback flow- Custom feedback forms are passed a
FeedbakcFormControllerthat exposes the screenshot and scroll controllers - Custom feedback forms are expected to take the screenshot, construct the feedback object, and call
hidethemselves
:bulb: Motivation and Context
There are three core goals with this rewrite:
- Maintain a backwards compatible API for users that don't want the new features/flexibility
- Provide end to end type safety for custom feedback forms
- Allow for custom feedback flows to get the screenshot from within the form so they can run async submit logic BEFORE closing the feedback form
:green_heart: How did you test it?
:pencil: Checklist
- [ ] I reviewed submitted code
- [ ] I added tests to verify changes
- [ ] I updated the docs if needed
- [ ] All tests passing
- [ ] No breaking changes