Skip to content

Commit a01bc69

Browse files
authored
Add readme (#738)
1 parent 8423511 commit a01bc69

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

extension/README.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Preact Signals Chrome Extension
2+
3+
A Chrome DevTools extension for debugging and visualizing Preact Signals in your applications.
4+
5+
## Features
6+
7+
- **Real-time Updates Panel**: Monitor signal value changes and effect executions with depth visualization
8+
- **Dependency Graph**: Visual representation of signal dependencies and relationships
9+
- **Interactive Controls**: Pause, clear, and filter updates with regex patterns
10+
- **Connection Management**: Automatic detection and connection to pages using Preact Signals
11+
12+
## Setup
13+
14+
### Prerequisites
15+
16+
1. Build the main Preact Signals packages:
17+
18+
```bash
19+
# From the root directory
20+
pnpm build
21+
```
22+
23+
2. Start the development server for the extension:
24+
25+
```bash
26+
# From the extension directory
27+
cd extension
28+
pnpm dev
29+
```
30+
31+
3. Set up demo applications (optional but recommended):
32+
```bash
33+
cd docs/demos
34+
pnpm i && pnpm start --force
35+
```
36+
37+
### Loading the Extension
38+
39+
1. Open Chrome and navigate to `chrome://extensions/`
40+
2. Enable "Developer mode" in the top right
41+
3. Click "Load unpacked"
42+
4. Select the `extension/dist` directory
43+
5. The Preact Signals extension should now appear in your extensions list
44+
45+
## Usage
46+
47+
1. Open Chrome DevTools (F12)
48+
2. Navigate to the "Preact Signals" tab
49+
3. Visit a page using Preact Signals (like the demo applications)
50+
4. The extension will automatically detect and connect to the signals system
51+
52+
### Panel Features
53+
54+
#### Updates Tab (Default)
55+
56+
- View real-time signal updates and effect executions
57+
- See dependency depth with indented visualization
58+
- Compare previous and new values side-by-side
59+
- Monitor update statistics and timestamps
60+
61+
#### Dependency Graph Tab
62+
63+
- Visualize signal relationships and dependencies
64+
- Nodes positioned by dependency depth
65+
- Color-coded by type: signals (blue), computed (orange), effects (green)
66+
- Interactive legend for understanding the visualization
67+
68+
### Controls
69+
70+
- **Pause/Resume**: Temporarily stop receiving updates
71+
- **Clear**: Reset the update history
72+
- **Filter**: Use regex patterns to show only specific signals
73+
- **Settings**: Configure grouping, rate limiting, and other options
74+
75+
## Development
76+
77+
The extension connects to the debug package (`packages/debug`) which hooks into the core signals implementation to provide real-time monitoring capabilities.
78+
79+
For development of the extension itself, the `pnpm dev` command will watch for changes and rebuild automatically.

0 commit comments

Comments
 (0)