Skip to content

Commit 2397857

Browse files
committed
pruning and adding shadcn
1 parent a45af6c commit 2397857

37 files changed

Lines changed: 682 additions & 1986 deletions

.github/actions/setup-venv/action.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,27 @@ runs:
4848
path: |
4949
~/Library/Caches/Homebrew
5050
/opt/homebrew/Cellar/lsl
51+
/opt/homebrew/Cellar/pugixml
5152
/opt/homebrew/Frameworks/LSL.framework
53+
/opt/homebrew/opt/pugixml
5254
/usr/local/Cellar/lsl
55+
/usr/local/Cellar/pugixml
5356
/usr/local/Frameworks/LSL.framework
54-
key: brew-${{ runner.os }}-${{ hashFiles('.github/actions/setup-venv/action.yaml') }}
57+
/usr/local/opt/pugixml
58+
key: brew-lsl-pugixml-${{ runner.os }}-${{ hashFiles('.github/actions/setup-venv/action.yaml') }}
5559

5660
- name: Install LSL (macOS)
5761
if: runner.os == 'macOS' && inputs.install-lsl == 'true'
5862
shell: bash
5963
run: |
6064
BREW_PREFIX=$(brew --prefix)
65+
66+
if ! brew list pugixml &>/dev/null; then
67+
echo "Installing pugixml..."
68+
brew install pugixml
69+
else
70+
echo "pugixml already installed"
71+
fi
6172
6273
# Check if LSL is already installed.
6374
# Homebrew's lsl formula may install as a framework (LSL.framework) rather
@@ -89,6 +100,7 @@ runs:
89100
if [[ -n "$LSL_LIB" ]]; then
90101
echo "LSL library found at: $LSL_LIB"
91102
echo "PYLSL_LIB=$LSL_LIB" >> $GITHUB_ENV
103+
echo "DYLD_LIBRARY_PATH=${BREW_PREFIX}/lib:${BREW_PREFIX}/opt/pugixml/lib:${DYLD_LIBRARY_PATH:-}" >> $GITHUB_ENV
92104
else
93105
echo "ERROR: LSL library not found after installation"
94106
find "${BREW_PREFIX}" -name "liblsl.*" -type f 2>/dev/null || true

.github/workflows/test.yaml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,6 @@ jobs:
124124
- name: Check frontend formatting
125125
working-directory: frontend
126126
run: npm run format:check
127-
- name: Lint frontend
128-
working-directory: frontend
129-
run: npm run lint
130-
- name: Run frontend unit tests
131-
working-directory: frontend
132-
run: npm run test:unit -- --run
133-
- name: Install Playwright browser
134-
working-directory: frontend
135-
run: npx playwright install --with-deps chromium
136-
- name: Run frontend E2E tests
137-
working-directory: frontend
138-
run: npm run test:e2e
139127
- name: Build frontend static assets
140128
working-directory: frontend
141-
run: npm run build
129+
run: npm run build

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
.ruff_cache
22
.DS_Store
33

4+
# Frontend static build output
5+
src/MoBI_View/web/static/
6+
47
# Byte-compiled / optimized / DLL files
58
__pycache__/
69
*.py[cod]

frontend/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ node_modules
77
.wrangler
88
/.svelte-kit
99
/build
10-
/playwright-report
11-
/test-results
1210

1311
# OS
1412
.DS_Store

frontend/.oxlintrc.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

frontend/.prettierignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +0,0 @@
1-
.svelte-kit
2-
node_modules
3-
playwright-report
4-
test-results
5-
../src/MoBI_View/web/static

frontend/.prettierrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
2-
"plugins": ["prettier-plugin-svelte"],
2+
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
33
"overrides": [
44
{
55
"files": "*.svelte",
66
"options": {
77
"parser": "svelte"
88
}
99
}
10-
]
10+
],
11+
"tailwindStylesheet": "./src/routes/layout.css"
1112
}

frontend/.vscode/extensions.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

frontend/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ The app is built as static HTML, JavaScript, and CSS with `@sveltejs/adapter-sta
66
Production assets are emitted directly to `../src/MoBI_View/web/static`, which is
77
the directory served by the Python WebSocket/HTTP server.
88

9+
UI styling is initialized with Tailwind CSS v4 and shadcn-svelte. No shadcn
10+
components are checked in yet; add them only when a feature needs them.
11+
912
## Commands
1013

1114
```sh
1215
npm run dev
1316
npm run check
1417
npm run format:check
15-
npm run test:unit -- --run
16-
npm run test:e2e
1718
npm run build
1819
```
1920

frontend/components.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://shadcn-svelte.com/schema.json",
3+
"tailwind": {
4+
"css": "src/routes/layout.css",
5+
"baseColor": "neutral"
6+
},
7+
"aliases": {
8+
"components": "$lib/components",
9+
"utils": "$lib/utils",
10+
"ui": "$lib/components/ui",
11+
"hooks": "$lib/hooks",
12+
"lib": "$lib"
13+
},
14+
"typescript": true,
15+
"registry": "https://shadcn-svelte.com/registry",
16+
"style": "vega",
17+
"iconLibrary": "lucide",
18+
"menuColor": "default",
19+
"menuAccent": "subtle"
20+
}

0 commit comments

Comments
 (0)