Skip to content
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

Hydration Error - Integration #328

Open
HazAT opened this issue Jan 24, 2024 · 1 comment
Open

Hydration Error - Integration #328

HazAT opened this issue Jan 24, 2024 · 1 comment
Assignees
Labels
Type: Enhancement New feature or request

Comments

@HazAT
Copy link
Member

HazAT commented Jan 24, 2024

https://github.com/BuilderIO/hydration-overlay
^

Let's add an integration for Hydration Errors using this plugin (only for Next.js now).
The idea is, you click on Hydration Error tab, if one occurred you see a diff of the DOM inside.
Of course, the prerequisite is that you configure the plugin yourself, but Spotlight could just act as an overlay replacement.

  • Figure out if we can extract the overlay and inject it into Spotlight
  • Add New "Hydration Error" Integration
  • Render the error in Spotlight
@Shubhdeep12 Shubhdeep12 self-assigned this Jan 24, 2024
@Shubhdeep12
Copy link
Collaborator

Hi @HazAT i checked the plugin.

How about this approach:

  • we create a feature request in the plugin to give a option to use spotlight for overlay.
  • by doing that user will have to do same config(no change)
  • but we add this logic in their overlay to call openSpotlight('/hydration-error') instead of rendering overlay modal with difference viewer.
  • and here in our spotlight-overlay in hydrationError tab we will render Difference viewer with data as they are attaching data to window object which can be accessed in spotlight as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants