hydration-overlay icon indicating copy to clipboard operation
hydration-overlay copied to clipboard

Integration(Spotlight): Integration Request for Spotlight.

Open Shubhdeep12 opened this issue 1 year ago • 3 comments

Hi,

I'd like to request the addition of integration support with Spotlightjs (https://spotlightjs.com/about/).

This enhancement would allow users to seamlessly view the Hydration error Overlay directly within the Spotlight overlay after integrating the hydration-overlay with the Spotlight.

Here is the associated GitHub issue for your reference: Link to GitHub Issue

We've also provided a proposed approach in the comments: Link to Comment

I would greatly appreciate your consideration and feedback on this feature request.

Thanks

Shubhdeep12 avatar Jan 28 '24 14:01 Shubhdeep12

I've added the integration support here in this branch - https://github.com/Shubhdeep12/hydration-overlay/tree/feat/spotlight-integration Let me know your feedback. Thanks

Shubhdeep12 avatar Jan 28 '24 14:01 Shubhdeep12

Thanks for this attempt! I want to integrate with as many tools as possible.

Looking at your code, there are a few small things that need to happen to merge this code:

  • we can't have spotlight in dependencies. It needs to be a peerDependencies entry, or else everyone will be installing spotlight despite them not needing it
  • Because of that, you can't have a top-level import of @spotlightjs/spotlight: it needs to become a dynamic import in the component.
  • I would like a new integration test added in tests/* that showcases the library working with spotlightjs to make sure everything works well.

If you make these changes, I think we should be good to go!

samijaber avatar Jan 29 '24 16:01 samijaber

On it @samijaber Thanks for the feedback

Shubhdeep12 avatar Jan 29 '24 16:01 Shubhdeep12