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

Add useInspector hook #732

Closed

Conversation

km1chno
Copy link
Contributor

@km1chno km1chno commented Nov 14, 2024

This PR is the next part of #666 right after #693.

Changes

  • Extract the convoluted inspector logic in webview from Preview and PreviewView to a custom hook useInspector
  • Simplify inspector related interfaces (see Project.ts)
  • Remove the requestStack parameter in inspect functions. For Show margin and padding of inspected element #666 we will need to request the stack every time, because it's necessary to evaluate padding/margins, therefore requestStack would always be true, so we can remove it. I decided to do it now because it also simplifies useInspector logic.

How Has This Been Tested:

TODO: Testing after #693 is merged

Copy link

vercel bot commented Nov 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
radon-ide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 1:31pm

@km1chno km1chno changed the title @km1chno/add use inspector hook Add useInspector hook Nov 14, 2024
@km1chno km1chno changed the base branch from main to @km1chno/fix-inspector-stack November 14, 2024 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant