Skip to content

Improve inspector#795

Merged
jfboeve merged 4 commits into
lightning-js:mainfrom
guilhermesimoes:feat/improve-inspector
May 19, 2026
Merged

Improve inspector#795
jfboeve merged 4 commits into
lightning-js:mainfrom
guilhermesimoes:feat/improve-inspector

Conversation

@guilhermesimoes
Copy link
Copy Markdown
Contributor

@guilhermesimoes guilhermesimoes commented May 18, 2026

Each commit improves its own thing, so I recommend reviewing commit by commit.

  • Fix inspector parent handling. This includes:
    • Not appending to the DOM divs of childs created without a parent, and assigned a parent afterwards.
    • Not removing from the DOM divs of childs after they're removed from their parent.
  • Search up the entire proto tree for getters and setters to override (needed when extending CoreNode).
  • Show component class name in the inspector (very useful when extending CoreNode).

Comment thread src/main-api/Inspector.ts Outdated
chiefcll added a commit to solid-tv/solid that referenced this pull request May 18, 2026
- Fix unparenting bug in DOM renderer: setting `parent = null` now removes
  the div from its previous parent (mirrors lightning-js/renderer#795), and
  `destroy()` is safe if the node was unparented first.
- Sync `node.states` to `div.dataset.states` so focus/active states are
  visible in devtools and styleable via attribute selectors.
- Set `componentName` for `<Dynamic component="..." />` so runtime-resolved
  intrinsics show up in the inspector with the same field the jsx-locator
  babel plugin uses.
- Add Alt+click-to-log inspector (gated by `isDev` + `Config.debug`) that
  walks the ElementNode tree by hit-position to find the deepest visible
  child, logs its key state, and pins it to `window.$el`. Lives in a new
  `core/clickInspector.ts` with a small `initClickInspector()` entry point.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Comment thread src/main-api/Inspector.ts
Comment thread src/main-api/Inspector.ts Outdated
@guilhermesimoes guilhermesimoes requested a review from jfboeve May 19, 2026 10:22
@jfboeve
Copy link
Copy Markdown
Collaborator

jfboeve commented May 19, 2026

Looks good! Thanks for contributing

@jfboeve jfboeve merged commit a9d3ef1 into lightning-js:main May 19, 2026
2 checks passed
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.

2 participants