Skip to content

Commit e7b1363

Browse files
committed
✨ feat(settings-webview): migrate to Tailwind CSS and improve UI
- migrate from Fluent UI to Tailwind CSS for a lighter and more customizable UI - add heroicons for settings categories - implement a new SettingsSettings component for general app settings - improve classname handling with tailwind-merge - add vscode theme support - add a header with title and buttons - add a new dev command to start settings webview 📦 build(settings-webview): update dependencies and build process - update dependencies in package.json - add a new dev command to start settings webview - update build command to include settings-webview - updated copy script to include settings webview files ✅ test(settings-webview): update tests for Tailwind CSS - update tests to reflect the new tailwind css implementation - update tests to reflect the new heroicons implementation 🔧 chore(.vscode): add dev settings task and update watch task - add a new task to watch settings webview changes - update watch task to include settings webview - set up background process to check settings webview server 📝 docs(settings-webview): update README.md with Tailwind CSS info - update README.md to reflect changes to tailwind css
1 parent 5c8ce57 commit e7b1363

File tree

14 files changed

+956
-2038
lines changed

14 files changed

+956
-2038
lines changed

.vscode/tasks.json

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"tasks": [
66
{
77
"label": "watch",
8-
"dependsOn": ["npm: dev", "npm: watch:tsc", "npm: watch:esbuild"],
8+
"dependsOn": ["npm: dev", "npm: dev:settings", "npm: watch:tsc", "npm: watch:esbuild"],
99
"presentation": {
1010
"reveal": "never"
1111
},
@@ -59,6 +59,28 @@
5959
"group": "watch",
6060
"reveal": "always"
6161
}
62+
},
63+
{
64+
"label": "npm: dev:settings",
65+
"type": "npm",
66+
"script": "dev:settings",
67+
"group": "build",
68+
"problemMatcher": {
69+
"owner": "vite",
70+
"pattern": {
71+
"regexp": "^$"
72+
},
73+
"background": {
74+
"activeOnStart": true,
75+
"beginsPattern": ".*VITE.*",
76+
"endsPattern": ".*Local:.*"
77+
}
78+
},
79+
"isBackground": true,
80+
"presentation": {
81+
"group": "settings-webview",
82+
"reveal": "always"
83+
}
6284
}
6385
]
6486
}

esbuild.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,23 @@ const copyWebviewFiles = {
194194
},
195195
}
196196

197+
const copySettingsWebviewFiles = {
198+
name: "copy-settings-webview-files",
199+
setup(build) {
200+
build.onEnd(() => {
201+
const settingsWebviewBuildFolder = path.join(__dirname, "settings-webview", "dist")
202+
const settingsWebviewTargetFolder = path.join(__dirname, "dist", "settings-webview")
203+
if (fs.existsSync(settingsWebviewBuildFolder)) {
204+
fs.mkdirSync(settingsWebviewTargetFolder, { recursive: true })
205+
fsExtra.copySync(settingsWebviewBuildFolder, settingsWebviewTargetFolder)
206+
console.log("Copied settings-webview files to dist/settings-webview")
207+
} else {
208+
console.warn("settings-webview/dist folder does not exist. Skipping copy.")
209+
}
210+
})
211+
},
212+
}
213+
197214
const extensionConfig = {
198215
bundle: true,
199216
minify: production,
@@ -203,7 +220,7 @@ const extensionConfig = {
203220
copyWasmFiles,
204221
copyLocalesFiles,
205222
copyWebviewFiles,
206-
/* add to the end of plugins array */
223+
copySettingsWebviewFiles,
207224
esbuildProblemMatcherPlugin,
208225
{
209226
name: "alias-plugin",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@
359359
"build:webview": "cd webview-ui && npm run build",
360360
"build:settings-webview": "cd settings-webview && npm run build",
361361
"build:esbuild": "node esbuild.js --production",
362-
"compile": "tsc -p . --outDir out && node esbuild.js",
362+
"compile": "npm run build:settings-webview && tsc -p . --outDir out && node esbuild.js",
363363
"install:all": "npm install npm-run-all && npm-run-all -l -p install-*",
364364
"install-extension": "npm install",
365365
"install-webview": "cd webview-ui && npm install",

settings-webview/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Settings Webview Migration
22

3-
This folder contains a new implementation of the Roo Code settings panel using React, TypeScript, Vite, Vitest, React Router, and Fluent UI. The goal is to gradually migrate all settings from the current implementation in `@webview-ui/src/components/settings/SettingsView.tsx` to this new implementation.
3+
This folder contains a new implementation of the Roo Code settings panel using React, TypeScript, Vite, Vitest, React Router, and TailwindCSS. The goal is to gradually migrate all settings from the current implementation in `@webview-ui/src/components/settings/SettingsView.tsx` to this new implementation.
44

55
## Architecture
66

@@ -9,7 +9,7 @@ This folder contains a new implementation of the Roo Code settings panel using R
99
- **Vite**: Fast development and building
1010
- **Vitest**: Testing framework
1111
- **React Router**: Navigation
12-
- **Fluent UI**: UI component library
12+
- **TailwindCSS**: Utility-first CSS framework
1313

1414
## Development Process
1515

0 commit comments

Comments
 (0)