Component storybook prototype - #59
Draft
aidenybai wants to merge 3 commits into
Draft
Conversation
A Next.js app that scans all React components on the page using bippy and displays them in a storybook-like panel showing: - Component names with expand/collapse - Props with serialized values - Hooks state (useState values, etc.) - Class component state - Children components - DOM bounding rects Features: - Live scanning via bippy's instrument() hook - Debounced updates to avoid render loops - Search/filter components by name - Highlight overlay to outline components on the page - Highlight-all mode - Collapsible panel - User/All component filter toggle - Demo page with Counter, Toggle, UserCard, NotificationList The scanner script (scripts/component-scanner.ts) is a standalone module that uses bippy as an installed package. Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
A single self-contained JS file that can be pasted into any browser console on any page with React components. Creates a storybook panel that shows all components with their props, hooks, state, and bounds. No dependencies required -- reads React fiber internals directly from the page's __REACT_DEVTOOLS_GLOBAL_HOOK__ and DOM. Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
…rklet Each component now shows when expanded: - Visual frame: iframe rendering the component's actual DOM with page stylesheets, scaled to fit the preview area - Tabbed interface: DOM | Props | Hooks | State | Bounds - DOM tab: syntax-highlighted HTML tree of the component's DOM - Props/Hooks/State tabs: key-value pairs - Bounds tab: component dimensions and position Also fixed click handling (stopPropagation on panel to prevent host page event handlers from interfering). Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a Next.js component storybook prototype to scan and display React components with their state using
bippy.The implementation includes a standalone
bippy-based scanner script and a Next.js UI. It handles large component trees by debouncing scans, filtering, and collapsing components by default to ensure a responsive user experience.