Skip to content

Commit 375352a

Browse files
docs(ui): add JTabView to plugin skill docs (#628)
* docs(ui): add JTabView to plugin skill docs and code review checklist - Add JTabView API reference to editor-ui SKILL.md (triggers, section, example) - Update Settings Panel example to demonstrate tabbed layout - Mention JTabView in plugin CLAUDE.md component list - Add plugin maintenance checklist item to CLAUDE.md Code Review Checklist - Bump plugin version to 1.1.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> * docs(ui): clarify zero-based tab indexing in JTabView example Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> --------- Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a8cefce commit 375352a

File tree

4 files changed

+37
-9
lines changed

4 files changed

+37
-9
lines changed

.claude-plugin/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Unity framework for runtime hot updates. Unity 2022.3+, C#.
1010

1111
### JEngine.UI (com.jasonxudeveloper.jengine.ui)
1212
- **MessageBox**: Async modal dialogs with UniTask (runtime)
13-
- **Editor Components**: JButton, JTextField, JStack, JCard, etc. (editor)
13+
- **Editor Components**: JButton, JTextField, JStack, JCard, JTabView, etc. (editor)
1414
- **Design Tokens**: Theme-aware colors, spacing, typography
1515

1616
## Key Patterns

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "jengine",
33
"description": "AI guide for game development with JEngine Unity hot-update framework",
4-
"version": "1.0.6",
4+
"version": "1.1.0",
55
"author": {
66
"name": "JasonXuDeveloper"
77
},

.claude-plugin/skills/editor-ui/SKILL.md

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: editor-ui
3-
description: JEngine Editor UI component library with theming. Triggers on: custom inspector, editor window, Unity editor UI, UIElements, VisualElement, JButton, JStack, JCard, JTextField, JDropdown, design tokens, dark theme, light theme, editor styling, themed button, form layout, progress bar, status bar, toggle button, button group
3+
description: JEngine Editor UI component library with theming. Triggers on: custom inspector, editor window, Unity editor UI, UIElements, VisualElement, JButton, JStack, JCard, JTextField, JDropdown, JTabView, tab view, tabbed container, design tokens, dark theme, light theme, editor styling, themed button, form layout, progress bar, status bar, toggle button, button group
44
---
55

66
# JEngine Editor UI Components
@@ -241,6 +241,28 @@ bc.SetPath("New", "Path");
241241
bc.Clear();
242242
```
243243

244+
### JTabView - Tabbed Container
245+
```csharp
246+
// Basic tab view
247+
var tabs = new JTabView()
248+
.AddTab("General", generalContent)
249+
.AddTab("Advanced", advancedContent)
250+
.AddTab("Debug", debugContent);
251+
252+
// Responsive: max 3 tabs per row before wrapping
253+
var responsiveTabs = new JTabView(maxTabsPerRow: 3)
254+
.AddTab("Tab 1", content1)
255+
.AddTab("Tab 2", content2);
256+
257+
// Programmatic selection (zero-based index: 0=General, 1=Advanced, 2=Debug)
258+
tabs.SelectTab(2); // Select "Debug" tab
259+
260+
// Read state
261+
int selected = tabs.SelectedIndex; // -1 if no tabs
262+
int count = tabs.TabCount;
263+
int maxPerRow = tabs.MaxTabsPerRow;
264+
```
265+
244266
## Design Tokens
245267

246268
The `Tokens` class provides named constants that adapt to Unity's dark/light theme.
@@ -365,7 +387,7 @@ enum AlignItems { Start, Center, End, Stretch }
365387

366388
## Game Development Examples
367389

368-
### Settings Panel
390+
### Settings Panel (with Tabs)
369391
```csharp
370392
public class GameSettingsWindow : EditorWindow
371393
{
@@ -384,8 +406,8 @@ public class GameSettingsWindow : EditorWindow
384406
root.style.paddingBottom = Tokens.Spacing.Lg;
385407
root.style.paddingLeft = Tokens.Spacing.Lg;
386408

387-
// Graphics Section
388-
var graphics = new JSection("Graphics")
409+
// Graphics tab content
410+
var graphics = new JStack(GapSize.MD)
389411
.Add(
390412
new JFormField("VSync", _vsyncToggle = new JToggle(true)),
391413
new JFormField("Target FPS", _fpsDropdown = new JDropdown<int>(
@@ -394,17 +416,22 @@ public class GameSettingsWindow : EditorWindow
394416
formatSelectedValue: static fps => fps == -1 ? "Unlimited" : $"{fps} FPS",
395417
formatListItem: static fps => fps == -1 ? "Unlimited" : $"{fps} FPS")));
396418

397-
// Audio Section
398-
var audio = new JSection("Audio")
419+
// Audio tab content
420+
var audio = new JStack(GapSize.MD)
399421
.Add(new JFormField("Master Volume", _volumeSlider = new JProgressBar(0.8f)
400422
.WithHeight(20)));
401423

424+
// Tabbed settings
425+
var tabs = new JTabView()
426+
.AddTab("Graphics", graphics)
427+
.AddTab("Audio", audio);
428+
402429
// Actions
403430
var actions = new JButtonGroup(
404431
new JButton("Apply", ApplySettings, ButtonVariant.Primary),
405432
new JButton("Reset", ResetSettings, ButtonVariant.Secondary));
406433

407-
root.Add(graphics, audio, actions);
434+
root.Add(tabs, actions);
408435
rootVisualElement.Add(root);
409436
}
410437
}

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,4 @@ Document all public APIs with XML comments.
9292
- [ ] Thread-safe where needed
9393
- [ ] Proper resource cleanup
9494
- [ ] Unit tests added for non-core package changes
95+
- [ ] Plugin skill docs updated for new/changed JEngine.Util or JEngine.UI APIs (see `.claude/rules/plugin-maintenance.md`)

0 commit comments

Comments
 (0)