📋 Implementation Details
1. Added Required Imports:
import {
LayoutGrid, List, Table2, Search, Film, Plus, Layers,
PanelRightClose, PanelRightOpen, Check, X, Settings2,
ListTodo, ListX // ← NEW ICONS
} from 'lucide-vue-next'
2. Added Computed Property for Task Column State:
// Check if all task columns are visible
const allTaskColumnsVisible = computed(() => {
const taskColumns = allColumns.value.filter(col => col.type === 'task')
return taskColumns.length > 0 && taskColumns.every(col => props.columnVisibility[col.id] !== false)
})
3. Added Toggle Method:
const toggleAllTaskColumns = () => {
const newVisibility = { ...props.columnVisibility }
const taskColumns = allColumns.value.filter(col => col.type === 'task')
// If all task columns are visible, hide them; otherwise show them
const shouldHide = allTaskColumnsVisible.value
taskColumns.forEach(col => {
newVisibility[col.id] = !shouldHide
})
emit('update:column-visibility', newVisibility)
}
🎉 Implementation Complete
The shot table toolbar now includes a task columns toggle button with the following features:
- ✅ Similar to AssetBrowser: Provides the same show/hide task functionality
- ✅ Integrated Design: Fits seamlessly into existing toolbar layout
- ✅ Smart Behavior: Automatically detects and toggles all task columns
- ✅ Visual Feedback: Dynamic icons and text based on current state
- ✅ Table View Only: Only appears where task columns exist
- ✅ Efficient Workflow: One-click toggle for common task management needs
Users can now easily show/hide task columns in the shot table, just like in the asset browser!