Components
View
Drive view components switch between list and grid while sharing commands and table metadata.
Shared primitives
DriveViewProvideruseDriveViewContext()createDriveViewConfig()DriveViewConfigProvider
Provider-specific views
LocalDriveViewGoogleDriveView
The provider-specific view decides how to render the current mode. The shared view context decides which mode is active.
What actually changes between modes
In the current implementation:
gridrendersDriveGridCardbased layoutslistrenders aDataTable- loading state switches between
DriveGridLoadingandTableSkeleton
Why commands belong in view config
createDriveViewConfig() lets each view receive:
- row-level commands through
commands.node - bulk commands through
commands.selectedNodes
That is why the floating command menu can work in both grid and list mode without separate command implementations for each visual layout.