Skip to content

Commit 318890a

Browse files
committed
feat(devtools): add aurelia devtools sidebar UI
Introduces a dedicated Aurelia DevTools sidebar integrated into the Chrome Elements panel, replacing the prior top‑level DevTools UI approach. Adds a full sidebar architecture including a new sidebar app, debug host, and supporting UI components (HTML/CSS/TS), plus e2e/unit test scaffolding and fixtures. Wires CI workflows to run e2e tests against the new flow. This lays groundwork for a richer, in‑panel inspection experience for Aurelia components and DI, with enhanced templates, bindings, and timeline support.
1 parent 69c865f commit 318890a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+9772
-9615
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: E2E Tests
2+
3+
on:
4+
push:
5+
branches: [main, 'feat/**']
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
e2e:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '22'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Install Playwright browsers
27+
run: npx playwright install chromium --with-deps
28+
29+
- name: Install fixture app dependencies
30+
run: npm run e2e:fixture:install
31+
32+
- name: Build extension
33+
run: npm run build
34+
35+
- name: Run E2E tests
36+
run: npx playwright test --config=e2e/playwright.config.ts
37+
env:
38+
CI: true
39+
40+
- name: Upload test results
41+
uses: actions/upload-artifact@v4
42+
if: failure()
43+
with:
44+
name: playwright-report
45+
path: playwright-report/
46+
retention-days: 7
47+
48+
- name: Upload test traces
49+
uses: actions/upload-artifact@v4
50+
if: failure()
51+
with:
52+
name: test-traces
53+
path: test-results/
54+
retention-days: 7

.github/workflows/unit-tests.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
branches: [main, 'feat/**']
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
unit:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '22'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Run unit tests
27+
run: npm test
28+
29+
- name: Upload coverage report
30+
uses: actions/upload-artifact@v4
31+
if: always()
32+
with:
33+
name: coverage-report
34+
path: coverage/
35+
retention-days: 7

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ node_modules
33
.DS_STORE
44
/coverage
55
dist/*
6+
e2e/fixtures/aurelia-app/dist
7+
/playwright-report
8+
/test-results

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This project is a work in progress. The current version is not yet available on
1212

1313
----
1414

15-
A browser extension for debugging Aurelia 1 and 2 applications. Features a top-level DevTools tab with modern, professional interface and dual-tab architecture for comprehensive debugging.
15+
A browser extension for debugging Aurelia 1 and 2 applications. Integrates as a sidebar pane in Chrome's Elements panel for seamless component inspection.
1616

1717
## Features
1818

@@ -71,7 +71,7 @@ Install the latest Node.js and npm versions.
7171
1. Run `npm run start` to start development mode
7272
2. Load the extension in Chrome (see Installation > Manual Installation)
7373
3. Pin the Aurelia Extension in the toolbar to verify detection: "Aurelia 2 detected on this page."
74-
4. Open Developer Tools and navigate to the "⚡ Aurelia" tab
74+
4. Open Developer Tools, go to the Elements panel, and find the "Aurelia" sidebar pane
7575
5. For code changes:
7676
- Reload the extension in `chrome://extensions`
7777
- Close and reopen Developer Tools (or Ctrl+R in the DevTools inspect window)
@@ -166,29 +166,31 @@ This event-first approach keeps the surface area tiny (just listen and dispatch)
166166
## Architecture
167167

168168
### Core Components
169-
- **Main Application** (`src/main.ts`, `src/app.ts`) - Aurelia 2 app rendering the DevTools UI
169+
- **Sidebar Application** (`src/sidebar/`) - Aurelia 2 app rendering the Elements panel sidebar
170170
- **Extension Scripts**:
171171
- `detector.ts` - Detects Aurelia versions on web pages
172172
- `background.ts` - Service worker managing extension state
173173
- `contentscript.ts` - Finds Aurelia instances in DOM
174-
- `devtools.js` - Creates the DevTools panel
174+
- `devtools.js` - Creates the Elements sidebar pane
175175

176176
### Build System
177-
- **Vite** - Modern build tool replacing Webpack
177+
- **Vite** - Modern build tool
178178
- **TypeScript** - Type safety and modern JavaScript features
179-
- **Aurelia 2** - Framework for the DevTools UI itself
179+
- **Aurelia 2** - Framework for the sidebar UI itself
180180

181181
### File Structure
182182
```
183183
src/
184-
├── main.ts # Entry point
185-
├── app.ts, app.html # Main Aurelia app
186-
├── backend/ # Debug host and communication
184+
├── sidebar/ # Sidebar application
185+
│ ├── main.ts # Entry point
186+
│ ├── sidebar-app.ts # Main ViewModel
187+
│ ├── sidebar-app.html # Template
188+
│ ├── sidebar-app.css # Styles
189+
│ └── sidebar-debug-host.ts # Communication layer
187190
├── background/ # Service worker
188191
├── contentscript/ # Page content interaction
189192
├── detector/ # Aurelia version detection
190-
├── devtools/ # DevTools panel creation
191-
├── resources/elements/ # UI components
193+
├── devtools/ # Sidebar pane creation
192194
├── shared/ # Common types and utilities
193195
└── popups/ # Extension popup pages
194196
```

docs/deployment.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,15 @@ All deployments must pass:
190190
```bash
191191
# Required files in dist/:
192192
├── manifest.json # Extension manifest
193-
├── index.html # DevTools panel entry
193+
├── sidebar.html # Sidebar pane entry
194194
├── build/
195-
│ ├── entry.js # Main application
196-
│ ├── background.js # Service worker
197-
│ ├── contentscript.js # Content script
198-
│ └── detector.js # Aurelia detector
199-
├── images/ # Extension icons
200-
└── popups/ # Extension popups
195+
│ ├── sidebar.js # Sidebar application
196+
│ ├── background.js # Service worker
197+
│ ├── contentscript.js # Content script
198+
│ └── detector.js # Aurelia detector
199+
├── devtools/ # DevTools page
200+
├── images/ # Extension icons
201+
└── popups/ # Extension popups
201202
```
202203

203204
## Chrome Web Store Review Process
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Aurelia 2 E2E Fixture</title>
6+
</head>
7+
<body>
8+
<app></app>
9+
<script type="module" src="/src/main.ts"></script>
10+
</body>
11+
</html>

0 commit comments

Comments
 (0)