@@ -15,13 +15,13 @@ import { ObjectChart } from '@object-ui/plugin-charts';
1515import { ListView } from '@object-ui/plugin-list' ;
1616import { DetailView , RecordChatterPanel } from '@object-ui/plugin-detail' ;
1717import { ObjectView as PluginObjectView , ViewTabBar } from '@object-ui/plugin-view' ;
18- import type { ViewTabItem , AvailableViewType } from '@object-ui/plugin-view' ;
18+ import type { ViewTabItem } from '@object-ui/plugin-view' ;
1919// Import plugins for side-effects (registration)
2020import '@object-ui/plugin-grid' ;
2121import '@object-ui/plugin-kanban' ;
2222import '@object-ui/plugin-calendar' ;
2323import { Button , Empty , EmptyTitle , EmptyDescription , NavigationOverlay , DropdownMenu , DropdownMenuContent , DropdownMenuItem , DropdownMenuTrigger , DropdownMenuSeparator } from '@object-ui/components' ;
24- import { Plus , Table as TableIcon , Settings2 , Wrench , KanbanSquare , Calendar , LayoutGrid , Activity , GanttChart , MapPin , BarChart3 , ChevronRight } from 'lucide-react' ;
24+ import { Plus , Table as TableIcon , Settings2 , Wrench , KanbanSquare , Calendar , LayoutGrid , Activity , GanttChart , MapPin , BarChart3 } from 'lucide-react' ;
2525import type { ListViewSchema , ViewNavigationConfig , FeedItem } from '@object-ui/types' ;
2626import { MetadataToggle , MetadataPanel , useMetadataInspector } from './MetadataInspector' ;
2727import { ViewConfigPanel } from './ViewConfigPanel' ;
@@ -44,18 +44,6 @@ const VIEW_TYPE_ICONS: Record<string, ComponentType<{ className?: string }>> = {
4444 chart : BarChart3 ,
4545} ;
4646
47- /** Available view types for quick-switch palette */
48- const AVAILABLE_VIEW_TYPES : AvailableViewType [ ] = [
49- { type : 'grid' , label : 'Grid' , description : 'Spreadsheet-style rows and columns' } ,
50- { type : 'kanban' , label : 'Kanban' , description : 'Drag cards between columns' } ,
51- { type : 'calendar' , label : 'Calendar' , description : 'View records on a calendar' } ,
52- { type : 'gallery' , label : 'Gallery' , description : 'Visual card layout' } ,
53- { type : 'timeline' , label : 'Timeline' , description : 'Chronological event view' } ,
54- { type : 'gantt' , label : 'Gantt' , description : 'Project timeline with dependencies' } ,
55- { type : 'map' , label : 'Map' , description : 'Geographic location view' } ,
56- { type : 'chart' , label : 'Chart' , description : 'Data visualization' } ,
57- ] ;
58-
5947const FALLBACK_USER = { id : 'current-user' , name : 'Demo User' } ;
6048
6149/**
@@ -697,12 +685,6 @@ export function ObjectView({ dataSource, objects, onEdit }: any) {
697685 < TableIcon className = "h-4 w-4 text-primary" />
698686 </ div >
699687 < div className = "min-w-0" >
700- { /* Breadcrumb: Object > View */ }
701- < div className = "flex items-center gap-1 text-xs text-muted-foreground mb-0.5" >
702- < span className = "truncate" > { objectLabel ( objectDef ) } </ span >
703- < ChevronRight className = "h-3 w-3 shrink-0" />
704- < span className = "truncate font-medium text-foreground" > { activeView ?. label || t ( 'console.objectView.allRecords' ) } </ span >
705- </ div >
706688 < h1 className = "text-base sm:text-lg font-semibold tracking-tight text-foreground truncate" > { objectLabel ( objectDef ) } </ h1 >
707689 { objectDef . description && (
708690 < p className = "text-xs text-muted-foreground truncate hidden sm:block max-w-md" > { objectDesc ( objectDef ) } </ p >
@@ -763,7 +745,7 @@ export function ObjectView({ dataSource, objects, onEdit }: any) {
763745 </ div >
764746 </ div >
765747
766- { /* View Tabs — Airtable-style named- view switcher with management UX */ }
748+ { /* View Tabs — read-only view switcher (design features like drag/add are in ViewConfigPanel) */ }
767749 { views . length > 1 && (
768750 < div className = "border-b px-3 sm:px-4 bg-background overflow-x-auto shrink-0" >
769751 < ViewTabBar
@@ -777,39 +759,7 @@ export function ObjectView({ dataSource, objects, onEdit }: any) {
777759 activeViewId = { activeViewId }
778760 onViewChange = { handleViewChange }
779761 viewTypeIcons = { VIEW_TYPE_ICONS }
780- config = { { ...objectDef . viewTabBar , reorderable : isAdmin ? true : objectDef . viewTabBar ?. reorderable } }
781- onAddView = { isAdmin ? ( ) => { setViewConfigPanelMode ( 'create' ) ; setShowViewConfigPanel ( true ) ; } : undefined }
782- onRenameView = { ( id : any , newName : any ) => {
783- // Rename is wired for future backend integration
784- console . info ( '[ViewTabBar] Rename view:' , id , newName ) ;
785- } }
786- onDuplicateView = { ( id : any ) => {
787- console . info ( '[ViewTabBar] Duplicate view:' , id ) ;
788- } }
789- onDeleteView = { ( id : any ) => {
790- console . info ( '[ViewTabBar] Delete view:' , id ) ;
791- } }
792- onSetDefaultView = { ( id : any ) => {
793- console . info ( '[ViewTabBar] Set default view:' , id ) ;
794- } }
795- onShareView = { ( id : any ) => {
796- console . info ( '[ViewTabBar] Share view:' , id ) ;
797- } }
798- onPinView = { ( id : any , pinned : any ) => {
799- console . info ( '[ViewTabBar] Pin view:' , id , pinned ) ;
800- } }
801- onReorderViews = { ( viewIds : any ) => {
802- console . info ( '[ViewTabBar] Reorder views:' , viewIds ) ;
803- } }
804- onChangeViewType = { ( id : any , newType : any ) => {
805- console . info ( '[ViewTabBar] Change view type:' , id , newType ) ;
806- } }
807- onConfigView = { isAdmin ? ( id : any ) => {
808- handleViewChange ( id ) ;
809- setViewConfigPanelMode ( 'edit' ) ;
810- setShowViewConfigPanel ( true ) ;
811- } : undefined }
812- availableViewTypes = { AVAILABLE_VIEW_TYPES }
762+ config = { { reorderable : false } }
813763 />
814764 </ div >
815765 ) }
0 commit comments