Skip to content

Commit 73a236e

Browse files
authored
Merge pull request #235 from objectstack-ai/copilot/fix-unused-props-errors
2 parents 10e9242 + 3853e1f commit 73a236e

File tree

6 files changed

+288
-49
lines changed

6 files changed

+288
-49
lines changed

content/docs/components/basic/sidebar.mdx

Lines changed: 280 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,75 @@ The Sidebar component provides a collapsible navigation sidebar for applications
1111

1212
<ComponentDemo
1313
schema={{
14-
type: 'sidebar',
15-
items: [
16-
{ label: 'Dashboard', icon: 'home', href: '/' },
17-
{ label: 'Projects', icon: 'folder', href: '/projects' },
18-
{ label: 'Team', icon: 'users', href: '/team' },
19-
{ label: 'Settings', icon: 'settings', href: '/settings' }
14+
type: 'sidebar-provider',
15+
body: [
16+
{
17+
type: 'sidebar',
18+
body: [
19+
{
20+
type: 'sidebar-content',
21+
body: [
22+
{
23+
type: 'sidebar-group',
24+
label: 'Menu',
25+
body: [
26+
{
27+
type: 'sidebar-menu',
28+
body: [
29+
{
30+
type: 'sidebar-menu-item',
31+
body: [
32+
{
33+
type: 'sidebar-menu-button',
34+
body: [{ type: 'text', content: 'Dashboard' }]
35+
}
36+
]
37+
},
38+
{
39+
type: 'sidebar-menu-item',
40+
body: [
41+
{
42+
type: 'sidebar-menu-button',
43+
body: [{ type: 'text', content: 'Projects' }]
44+
}
45+
]
46+
},
47+
{
48+
type: 'sidebar-menu-item',
49+
body: [
50+
{
51+
type: 'sidebar-menu-button',
52+
body: [{ type: 'text', content: 'Team' }]
53+
}
54+
]
55+
},
56+
{
57+
type: 'sidebar-menu-item',
58+
body: [
59+
{
60+
type: 'sidebar-menu-button',
61+
body: [{ type: 'text', content: 'Settings' }]
62+
}
63+
]
64+
}
65+
]
66+
}
67+
]
68+
}
69+
]
70+
}
71+
]
72+
},
73+
{
74+
type: 'sidebar-inset',
75+
body: [
76+
{
77+
type: 'div',
78+
className: 'p-4',
79+
body: [{ type: 'text', content: 'Main content area' }]
80+
}
81+
]
82+
}
2083
]
2184
}}
2285
title="Basic Sidebar"
@@ -26,20 +89,84 @@ The Sidebar component provides a collapsible navigation sidebar for applications
2689

2790
<ComponentDemo
2891
schema={{
29-
type: 'sidebar',
30-
groups: [
92+
type: 'sidebar-provider',
93+
body: [
3194
{
32-
title: 'Main',
33-
items: [
34-
{ label: 'Dashboard', icon: 'home', href: '/' },
35-
{ label: 'Analytics', icon: 'bar-chart', href: '/analytics' }
95+
type: 'sidebar',
96+
body: [
97+
{
98+
type: 'sidebar-content',
99+
body: [
100+
{
101+
type: 'sidebar-group',
102+
label: 'Main',
103+
body: [
104+
{
105+
type: 'sidebar-menu',
106+
body: [
107+
{
108+
type: 'sidebar-menu-item',
109+
body: [
110+
{
111+
type: 'sidebar-menu-button',
112+
body: [{ type: 'text', content: 'Dashboard' }]
113+
}
114+
]
115+
},
116+
{
117+
type: 'sidebar-menu-item',
118+
body: [
119+
{
120+
type: 'sidebar-menu-button',
121+
body: [{ type: 'text', content: 'Analytics' }]
122+
}
123+
]
124+
}
125+
]
126+
}
127+
]
128+
},
129+
{
130+
type: 'sidebar-group',
131+
label: 'Management',
132+
body: [
133+
{
134+
type: 'sidebar-menu',
135+
body: [
136+
{
137+
type: 'sidebar-menu-item',
138+
body: [
139+
{
140+
type: 'sidebar-menu-button',
141+
body: [{ type: 'text', content: 'Projects' }]
142+
}
143+
]
144+
},
145+
{
146+
type: 'sidebar-menu-item',
147+
body: [
148+
{
149+
type: 'sidebar-menu-button',
150+
body: [{ type: 'text', content: 'Team' }]
151+
}
152+
]
153+
}
154+
]
155+
}
156+
]
157+
}
158+
]
159+
}
36160
]
37161
},
38162
{
39-
title: 'Management',
40-
items: [
41-
{ label: 'Projects', icon: 'folder', href: '/projects' },
42-
{ label: 'Team', icon: 'users', href: '/team' }
163+
type: 'sidebar-inset',
164+
body: [
165+
{
166+
type: 'div',
167+
className: 'p-4',
168+
body: [{ type: 'text', content: 'Main content area' }]
169+
}
43170
]
44171
}
45172
]
@@ -51,13 +178,69 @@ The Sidebar component provides a collapsible navigation sidebar for applications
51178

52179
<ComponentDemo
53180
schema={{
54-
type: 'sidebar',
55-
collapsible: true,
56-
defaultCollapsed: false,
57-
items: [
58-
{ label: 'Home', icon: 'home', href: '/' },
59-
{ label: 'Files', icon: 'folder', href: '/files' },
60-
{ label: 'Settings', icon: 'settings', href: '/settings' }
181+
type: 'sidebar-provider',
182+
body: [
183+
{
184+
type: 'sidebar',
185+
collapsible: 'icon',
186+
body: [
187+
{
188+
type: 'sidebar-content',
189+
body: [
190+
{
191+
type: 'sidebar-group',
192+
body: [
193+
{
194+
type: 'sidebar-menu',
195+
body: [
196+
{
197+
type: 'sidebar-menu-item',
198+
body: [
199+
{
200+
type: 'sidebar-menu-button',
201+
body: [{ type: 'text', content: 'Home' }]
202+
}
203+
]
204+
},
205+
{
206+
type: 'sidebar-menu-item',
207+
body: [
208+
{
209+
type: 'sidebar-menu-button',
210+
body: [{ type: 'text', content: 'Files' }]
211+
}
212+
]
213+
},
214+
{
215+
type: 'sidebar-menu-item',
216+
body: [
217+
{
218+
type: 'sidebar-menu-button',
219+
body: [{ type: 'text', content: 'Settings' }]
220+
}
221+
]
222+
}
223+
]
224+
}
225+
]
226+
}
227+
]
228+
}
229+
]
230+
},
231+
{
232+
type: 'sidebar-inset',
233+
body: [
234+
{
235+
type: 'div',
236+
className: 'p-4',
237+
body: [
238+
{ type: 'sidebar-trigger' },
239+
{ type: 'text', content: 'Main content area' }
240+
]
241+
}
242+
]
243+
}
61244
]
62245
}}
63246
title="Collapsible Sidebar"
@@ -97,12 +280,80 @@ interface SidebarSchema {
97280

98281
<ComponentDemo
99282
schema={{
100-
type: 'sidebar',
101-
items: [
102-
{ label: 'Inbox', icon: 'inbox', href: '/inbox', badge: 12 },
103-
{ label: 'Drafts', icon: 'file-text', href: '/drafts', badge: 3 },
104-
{ label: 'Sent', icon: 'send', href: '/sent' },
105-
{ label: 'Trash', icon: 'trash', href: '/trash' }
283+
type: 'sidebar-provider',
284+
body: [
285+
{
286+
type: 'sidebar',
287+
body: [
288+
{
289+
type: 'sidebar-content',
290+
body: [
291+
{
292+
type: 'sidebar-group',
293+
body: [
294+
{
295+
type: 'sidebar-menu',
296+
body: [
297+
{
298+
type: 'sidebar-menu-item',
299+
body: [
300+
{
301+
type: 'sidebar-menu-button',
302+
body: [
303+
{ type: 'text', content: 'Inbox' },
304+
{ type: 'badge', content: '12', className: 'ml-auto' }
305+
]
306+
}
307+
]
308+
},
309+
{
310+
type: 'sidebar-menu-item',
311+
body: [
312+
{
313+
type: 'sidebar-menu-button',
314+
body: [
315+
{ type: 'text', content: 'Drafts' },
316+
{ type: 'badge', content: '3', className: 'ml-auto' }
317+
]
318+
}
319+
]
320+
},
321+
{
322+
type: 'sidebar-menu-item',
323+
body: [
324+
{
325+
type: 'sidebar-menu-button',
326+
body: [{ type: 'text', content: 'Sent' }]
327+
}
328+
]
329+
},
330+
{
331+
type: 'sidebar-menu-item',
332+
body: [
333+
{
334+
type: 'sidebar-menu-button',
335+
body: [{ type: 'text', content: 'Trash' }]
336+
}
337+
]
338+
}
339+
]
340+
}
341+
]
342+
}
343+
]
344+
}
345+
]
346+
},
347+
{
348+
type: 'sidebar-inset',
349+
body: [
350+
{
351+
type: 'div',
352+
className: 'p-4',
353+
body: [{ type: 'text', content: 'Main content area' }]
354+
}
355+
]
356+
}
106357
]
107358
}}
108359
title="Sidebar with Badges"

packages/components/src/renderers/data-display/table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
} from '../../ui/table';
2020
import { cn } from '../../lib/utils';
2121

22-
export const SimpleTableRenderer = ({ schema, className, ..._props }: any) => {
22+
export const SimpleTableRenderer = ({ schema, className }: any) => {
2323
const data = useDataScope(schema.bind);
2424
const columns = schema.props?.columns || [];
2525

packages/components/src/renderers/placeholders.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { ComponentRegistry } from '@object-ui/core';
1111
import { cn } from '../lib/utils';
1212
import { Box, FileQuestion } from 'lucide-react';
1313

14-
export const PlaceholderRenderer = ({ schema, className, ...props }: any) => {
14+
export const PlaceholderRenderer = ({ schema, className }: any) => {
1515
const type = schema.type;
1616
const isView = type.startsWith('view:');
1717
const isWidget = type.startsWith('widget:');

packages/plugin-aggrid/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
"@types/react": "^19.2.9",
4848
"@types/react-dom": "^19.2.3",
4949
"@vitejs/plugin-react": "^4.2.1",
50-
"ag-grid-community": "^35.0.1",
51-
"ag-grid-react": "^32.3.4",
50+
"ag-grid-community": "^32.3.9",
51+
"ag-grid-react": "^32.3.9",
5252
"typescript": "^5.9.3",
5353
"vite": "^7.3.1",
5454
"vite-plugin-dts": "^4.5.4"

packages/plugin-aggrid/src/AgGridImpl.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export default function AgGridImpl({
223223
}, [columnDefs, editable, columnConfig]);
224224

225225
// Merge grid options with props
226-
const mergedGridOptions: GridOptions = useMemo(() => ({
226+
const mergedGridOptions = useMemo(() => ({
227227
...gridOptions,
228228
pagination,
229229
paginationPageSize,

0 commit comments

Comments
 (0)