Skip to content

Commit beee500

Browse files
[1.5.0] Rainbow viewer (#10)
* Various changes to begin work on v1.5.0 - Added a show/hide button for objects - Added colors for objects - Now uses user theme for UI - Focusing a comm file will now focus its corresponding webview too - Added file names to the webview titles * Improve filter popup * Improve zoom and rendering options * Switch viewer to Svelte * Fix bugs * Fix selection bug * Add "hide all other objects" button on object right click * Revamp help popup * Update settings popup * Add pre-commits and CI checks for linting and formatting * Edit CI * Fix styling errors * Fix linting errors * Improve tailwind theme * Fix style error * Reorganise folders * Update resources links * Use toggle component in groups popup * Fix groups with same name in same object * Update Changelog.md
1 parent f0373d9 commit beee500

119 files changed

Lines changed: 8968 additions & 6906 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,79 @@ name: CI
22

33
on:
44
push:
5-
branches: [ main ]
65
pull_request:
7-
branches: [ main ]
86

97
jobs:
8+
checks:
9+
name: Lint & type-check
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Set up Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 22.15
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.11"
23+
24+
- name: Install npm dependencies
25+
run: npm install
26+
27+
- name: Install Python tools
28+
run: pip install ruff mypy
29+
30+
- name: Prettier
31+
run: npx prettier --check "src/**/*.ts" "webviews/viewer/src/**/*.{ts,svelte}" "webviews/export/**/*.{js,css,html}"
32+
33+
- name: ESLint
34+
run: npx eslint --max-warnings=0 src/ webviews/export/
35+
36+
- name: TypeScript
37+
run: npx tsc --noEmit
38+
39+
- name: svelte-check
40+
run: npx svelte-check --tsconfig webviews/viewer/tsconfig.json --fail-on-warnings
41+
42+
- name: Ruff lint
43+
run: python3 -m ruff check python/lsp/ python/med2obj.py
44+
45+
- name: Ruff format
46+
run: python3 -m ruff format --check python/lsp/ python/med2obj.py
47+
48+
- name: mypy
49+
run: python3 -m mypy
50+
1051
build:
52+
name: Package
1153
runs-on: ubuntu-latest
54+
needs: checks
1255
steps:
1356
- uses: actions/checkout@v4
57+
1458
- name: Set up Node.js
1559
uses: actions/setup-node@v4
1660
with:
1761
node-version: 22.15
62+
1863
- name: Install Python
1964
run: sudo apt-get update && sudo apt-get install -y python3 python3-pip python3-nox python3-venv
65+
2066
- name: Install npm dependencies
2167
run: npm install
68+
2269
- name: Install vsce
2370
run: npm install -g @vscode/vsce
71+
2472
- name: Build and package
2573
run: python3 -m nox -s package -v --no-error-on-missing-interpreters
74+
2675
- name: Upload artifacts
2776
uses: actions/upload-artifact@v4
2877
with:
2978
name: vsix-package
3079
path: "*.vsix"
31-
retention-days: 30
80+
retention-days: 30

.gitignore

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Node modules
22
node_modules/
33

4+
# Webview build output
5+
webviews/viewer/dist/
6+
47
# Build output
58
dist/
69

@@ -47,6 +50,7 @@ yarn.lock
4750
vsc-extension-quickstart.md
4851

4952
**/__pycache__/
53+
5054
# Fichiers temporaires ou backup
5155
*.tmp
5256
*.swp
@@ -59,14 +63,7 @@ vsc-extension-quickstart.md
5963

6064
*.js.map
6165

62-
node_modules/
63-
dist/
64-
65-
yarn.lock
6666
*.vsix
67-
68-
# Exclude extension package
69-
vs-code-aster-*.vsix
7067
.vscode-test
7168
out/
7269

.husky/pre-commit

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
set -e
3+
4+
npx prettier --write "src/**/*.ts" "webviews/viewer/src/**/*.{ts,svelte}" "webviews/export/**/*.{js,css,html}"
5+
git add -u
6+
npx eslint --max-warnings=0 src/ webviews/export/
7+
npx svelte-check --tsconfig webviews/viewer/tsconfig.json --fail-on-warnings
8+
python3 -m ruff check python/lsp/ python/med2obj.py
9+
python3 -m ruff format --check python/lsp/ python/med2obj.py

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist/
2+
node_modules/
3+
python/
4+
*.min.js
5+
*.min.css

.prettierrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"plugins": ["prettier-plugin-svelte"],
3+
"overrides": [
4+
{
5+
"files": "*.svelte",
6+
"options": {
7+
"parser": "svelte"
8+
}
9+
}
10+
],
11+
"singleQuote": true,
12+
"semi": true,
13+
"printWidth": 100,
14+
"tabWidth": 2,
15+
"trailingComma": "es5"
16+
}

.vscode/tasks.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"label": "watch",
88
"dependsOn": [
99
"npm: watch:tsc",
10-
"npm: watch:esbuild"
10+
"npm: watch:esbuild",
11+
"npm: watch:webview"
1112
],
1213
"presentation": {
1314
"reveal": "never"
@@ -17,6 +18,26 @@
1718
"isDefault": true
1819
}
1920
},
21+
{
22+
"type": "npm",
23+
"script": "watch:webview",
24+
"group": "build",
25+
"isBackground": true,
26+
"label": "npm: watch:webview",
27+
"presentation": {
28+
"group": "watch",
29+
"reveal": "never"
30+
},
31+
"problemMatcher": {
32+
"owner": "vite-watch",
33+
"pattern": { "regexp": "^$" },
34+
"background": {
35+
"activeOnStart": false,
36+
"beginsPattern": "watching for file changes",
37+
"endsPattern": "built in \\d"
38+
}
39+
}
40+
},
2041
{
2142
"type": "npm",
2243
"script": "watch:esbuild",

.vscodeignore

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ vsc-extension-quickstart.md
1616
**/.vscode-test.*
1717
.venv
1818
noxfile.py
19-
requirements.txt
19+
requirements.txt
2020
python/data
2121
python/lsp/.venv
22-
python/.venv
22+
python/.venv
23+
webviews/viewer/src/**
24+
webviews/viewer/vite.config.ts
25+
webviews/viewer/svelte.config.js
26+
webviews/viewer/tsconfig.json
27+
webviews/viewer/tailwind.css
28+
webviews/viewer/styles.css
29+
webviews/viewer/index.js

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@ All notable changes to the **VS Code Aster** extension will be documented in thi
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.5.0] - 2026-03-13
9+
10+
Rewrote the mesh viewer UI with Svelte, and added new viewer features.
11+
12+
### Added
13+
- Migrated the mesh viewer frontend from vanilla JS/HTML to Svelte with TypeScript
14+
- Mesh viewer UI now follows the VS Code user theme
15+
- Object file names are shown in the webview tab titles
16+
- Focusing a `.comm` file now focuses its corresponding mesh viewer webview
17+
- Revamped help popup with tabs and more tips
18+
- New settings popup with various settings
19+
- Edge rendering settings
20+
- Object visibility settings
21+
- UI settings
22+
- Improved various UI components in the mesh viewer
23+
- Show/hide toggle button per object in the sidebar
24+
- Per-object color display
25+
- Zoom widget in the mesh viewer
26+
827
## [1.4.3] - 2026-03-03
928

1029
Updated dependencies.

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cff-version: 1.4.3
1+
cff-version: 1.5.0
22
title: VS Code Aster
33
message: >-
44
If you use this software, please cite it using the

README.md

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<p align="center"><img src="https://raw.githubusercontent.com/simvia-tech/vs-code-aster/main/resources/images/simvia.png" alt="Simvia Logo" width="50%" /></p>
1+
<p align="center"><img src="https://raw.githubusercontent.com/simvia-tech/vs-code-aster/main/media/images/simvia.png" alt="Simvia Logo" width="50%" /></p>
22

33
<p align="center">
4-
<a href="/"><img src="https://img.shields.io/badge/version-1.4.3-blue" alt="Version" /></a>
4+
<a href="/"><img src="https://img.shields.io/badge/version-1.5.0-blue" alt="Version" /></a>
55
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-GPL%203.0-green" alt="License" /></a>
66
</p>
77

@@ -253,17 +253,41 @@ git clone https://github.com/simvia-tech/vs-code-aster.git
253253
npm install
254254
```
255255

256-
3. Compile extension :
256+
### 3. Architecture overview
257+
258+
The extension consists of two independently compiled parts :
259+
260+
- **Extension host** (`src/`) — TypeScript compiled with esbuild, runs in Node.js inside VS Code
261+
- **Webview** (`webviews/viewer/`) — Svelte 5 + Vite app that powers the 3D visualizer; built separately into `webviews/viewer/dist/`
262+
263+
### 4. Running the extension locally
264+
265+
Press `F5` (or go to `Run > Start Debugging`) to launch a new VS Code window running the extension.
266+
267+
This starts three background watch tasks automatically (defined in `.vscode/tasks.json`) :
268+
269+
| Task | What it does |
270+
|---|---|
271+
| `npm: watch:esbuild` | Recompiles the extension host on every save |
272+
| `npm: watch:tsc` | Type-checks the extension host continuously |
273+
| `npm: watch:webview` | Rebuilds the Svelte webview on every save |
274+
275+
After making changes to the **extension host** (`src/`), reload the debug window with `Ctrl + R`.
276+
277+
After making changes to the **webview** (`webviews/viewer/src/`), wait for the `watch:webview` task to finish rebuilding, then run `Developer: Reload Webviews` from the Command Palette.
278+
279+
### 5. Building manually
280+
281+
To build everything from scratch without starting the debug session :
257282

258283
```bash
284+
# Build the webview
285+
npm run build:webview
286+
287+
# Compile and type-check the extension host
259288
npm run compile
260289
```
261290

262-
### 3. Running the extension locally
263-
264-
You can press `F5` or go to `Run > Start Debugging` to launch a new VS Code window running this extension.
265-
After making changes, you can reload the new window using `Ctrl` + `R`.
266-
267291
## Telemetry
268292

269293
**VS Code Aster** includes optional telemetry features to help improve the tool by collecting anonymous usage data.

0 commit comments

Comments
 (0)