-
Notifications
You must be signed in to change notification settings - Fork 29
Feature: Ability to opt out of built in error handling #305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds an opt-in feature to disable the built-in DOM-based error handling in the FileDiff and File components, allowing developers to handle rendering errors with custom error boundaries or other mechanisms.
Changes:
- Added
disableErrorHandlingboolean option to FileDiff and File components - When enabled, rendering errors are rethrown instead of being caught and displayed in the DOM
- Updated documentation in both VanillaAPI and ReactAPI constants files
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| packages/diffs/src/components/FileDiff.ts | Added disableErrorHandling option to FileDiffOptions interface and implemented error rethrow logic in the render method |
| packages/diffs/src/components/File.ts | Added disableErrorHandling option to FileOptions interface and implemented error rethrow logic in the render method |
| apps/docs/app/docs/VanillaAPI/constants.ts | Added documentation examples for the new disableErrorHandling option in both FileDiff and File examples |
| apps/docs/app/docs/ReactAPI/constants.ts | Added documentation examples for the new disableErrorHandling option in both DiffOptions and FileOptions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add prop to disable error handling * Add docs * Update apps/docs/app/docs/VanillaAPI/constants.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update apps/docs/app/docs/ReactAPI/constants.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update apps/docs/app/docs/VanillaAPI/constants.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update apps/docs/app/docs/ReactAPI/constants.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add prop to disable error handling * Add docs * Update apps/docs/app/docs/VanillaAPI/constants.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update apps/docs/app/docs/ReactAPI/constants.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update apps/docs/app/docs/VanillaAPI/constants.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update apps/docs/app/docs/ReactAPI/constants.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Basically File/FileDiff components can now opt out of the built in dom based error handling.
The prop to do so is
disableErrorHandling: trueFixes #290