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 simpleFeedback system was moved to a static method (necessary to set the default type params)
simpleFeedback now runs the onSubmit callback before closing the feedback flow
Custom feedback forms are passed a FeedbakcFormController that exposes the screenshot and scroll controllers
Custom feedback forms are expected to take the screenshot, construct the feedback object, and call hide themselves
💡 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
💡 Motivation and Context
There are three core goals with this rewrite:
💚 How did you test it?
📝 Checklist
🔮 Next steps