Skip to content

Commit f13095d

Browse files
committed
Update components to use Mantine with rationale
1 parent 9d5110f commit f13095d

File tree

2 files changed

+45
-47
lines changed

2 files changed

+45
-47
lines changed

specification/v2_screenshots.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55

66
---
77

8-
This document provides visual screenshots of the **Shadcn UI prototype** implementation. These complement the ASCII wireframes in the UX specification documents.
8+
This document provides visual screenshots from the **Shadcn UI prototype** (`v2/prototype/shadcn`). These complement the ASCII wireframes in the UX specification documents.
9+
10+
**Note:** The V2 implementation will use **Mantine** (see [V2 Tech Stack](v2_tech_stack.md#mantine-rationale)). These Shadcn screenshots remain as historical reference showing how the UX spec translates to a working UI. The Mantine implementation will have the same screens and functionality with slightly different visual styling.
911

1012
## Table of Contents
1113
* [Server List](#server-list)
@@ -111,6 +113,7 @@ Configure filesystem roots exposed to the connected server.
111113

112114
## Notes
113115

114-
- All screenshots are from the `v2/prototype/shadcn` branch
116+
- All screenshots are from the `v2/prototype/shadcn` branch (historical reference)
117+
- The actual V2 implementation will use Mantine (`v2/prototype/mantine`)
115118
- Dark theme is supported throughout the application (toggle in header)
116119
- Screenshots may not reflect the latest implementation - refer to wireframes for authoritative UX

specification/v2_tech_stack.md

Lines changed: 40 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -19,60 +19,55 @@
1919
* React
2020

2121
### Components and Theme
22-
Let's choose a feature-rich component set with easy theming control
23-
* -[ ] [Mantine](https://ui.mantine.dev/)
24-
* -[x] [Shadcn](https://ui.shadcn.com/)
22+
* -[x] [Mantine](https://ui.mantine.dev/)
23+
* -[ ] [Shadcn](https://ui.shadcn.com/)
2524

26-
#### Shadcn Rationale
25+
#### Mantine Rationale
2726

28-
Shadcn is recommended based on evaluation of both prototype implementations (`v2/prototype/shadcn` and `v2/prototype/mantine`).
27+
Mantine is recommended based on evaluation of both prototype implementations (`v2/prototype/shadcn` and `v2/prototype/mantine`) and group discussion.
2928

30-
**Why Shadcn over Mantine:**
29+
**Notes from Prototype Comparison:**
3130

32-
| Requirement | Shadcn | Mantine |
33-
|-------------|--------|---------|
34-
| Component ownership | Yes - Copy to codebase | No - npm dependency |
35-
| Styling approach | Tailwind CSS | CSS-in-JS (emotion) |
36-
| Bundle size | Minimal - Only used components | Larger - Full library |
37-
| Customization | Full control - Edit source directly | Theme config only |
38-
| Dark mode | CSS variables | Context provider |
31+
Shadcn lacks layout components, requiring extensive Tailwind class management for containers, spacing, and alignment. This adds friction and cognitive load, based on our experiences with the current Inspector. Mantine's layout components (`Flex`, `Stack`, etc.) make the code more concise and easier to understand.
3932

40-
**Benefits:**
41-
42-
1. **Component Ownership** - Components are copied into your project, not installed as dependencies. This means:
43-
- More control over implementation details
44-
- Easier to modify for project-specific needs
45-
46-
2. **Tailwind CSS Integration**:
47-
- Theme customization via CSS variables
48-
- Smaller production bundles (unused styles purged)
49-
50-
3. **Simpler Theme Architecture** - CSS variables for theming:
51-
- Light/dark mode via CSS class toggle
52-
- Easy to extend with custom color schemes
53-
- Works seamlessly with Tailwind
33+
Although the code may be less directly customizable, we don't expect extensive theming or branding to be a priority for Inspector as a debugging tool.
5434

55-
4. **Developer Experience from Prototype**:
56-
- Faster iteration when modifying components
57-
- More readable component code
58-
- Easier debugging (source is in your project)
35+
See [PR #980 discussion](https://github.com/modelcontextprotocol/inspector/pull/980#issuecomment-3667102518) for example code comparison.
5936

60-
**Tradeoffs:**
37+
| Requirement | Mantine | Shadcn |
38+
|-------------|---------|--------|
39+
| Layout components | Yes - Flex, Stack, Group, Grid | No - Use Tailwind divs |
40+
| Out-of-box experience | Yes - Comprehensive | Partial - Assemble yourself |
41+
| Code verbosity | Concise JSX props | Verbose Tailwind classes |
42+
| Styling approach | Props + theme config | Tailwind utility classes |
43+
| Documentation | Extensive API docs | Component examples |
6144

62-
- **Initial setup** - Requires adding components individually (vs Mantine's single install)
63-
- **Less "batteries included"** - Some advanced features need additional work (e.g., date pickers, rich text)
64-
- **Documentation** - Mantine has more extensive API docs for each prop
65-
66-
**Prototype Comparison:**
67-
68-
Both prototypes implement the same V2 UX spec. Key observations:
45+
**Benefits:**
6946

70-
| Aspect | Shadcn Prototype | Mantine Prototype |
71-
|--------|------------------|-------------------|
72-
| Code clarity | Component code visible in project | Abstracted in node_modules |
73-
| Theme toggle | CSS class swap | useMantineColorScheme hook |
74-
| Custom styling | Add Tailwind classes directly | Override with sx prop or styles API |
75-
| Component modification | Edit the file | Create wrapper or fork |
47+
1. **Built-in Layout Components** - Mantine provides layout primitives as JSX components:
48+
- `Flex`, `Stack`, `Group`, `Grid`, `Center`, `Container`
49+
- No need to manage `div` elements with Tailwind classes
50+
- More declarative, readable code
51+
52+
2. **Reduced Class Management** - Compare the same UI element:
53+
```tsx
54+
// Mantine - concise
55+
<Alert icon={<IconAlertTriangle />} color="yellow" title="Warning">
56+
{message}
57+
</Alert>
58+
59+
// Shadcn + Tailwind - verbose class strings
60+
<div className="flex items-start gap-3 rounded-lg border border-yellow-200
61+
bg-yellow-50 p-4 text-yellow-800 dark:border-yellow-900 dark:bg-yellow-950
62+
dark:text-yellow-200">
63+
<IconAlertTriangle className="h-5 w-5 flex-shrink-0" />
64+
<div className="flex-1"><p className="font-medium">Warning</p>{message}</div>
65+
</div>
66+
```
67+
68+
3. **Better Out-of-Box Experience**:
69+
- Single install provides all components
70+
- Consistent API across all components
7671

7772
## Proxy Server
7873
### Language and Runtime

0 commit comments

Comments
 (0)