feat 591 : A .taskboard file for every individual board#643
Conversation
Fixed README links in section # How to Contribute
…le the drag-n-drop feature
…es for better usability
Review Summary by QodoImplement individual
WalkthroughsDescription• Implements individual .taskboard files for every board, addressing tickets #561, #591, #554, and #723 • Introduces TaskBoardFileManager for managing board configuration persistence and caching with debounced saves • Adds v2 migration system with template board creation on first install and migration notifications • Refactors drag-drop manager with auto-scroll functionality during drag operations and improved error tracking • Updates settings UI with date format validation using date-fns library and refactored data access patterns • Enhances task content formatting with new date utility functions and improved extraction methods • Refactors advanced filter components to use board ID-based management instead of leaf/index-based approach • Reorganizes imports across codebase to use explicit .js extensions for ES modules and relative paths • Replaces console logging with bugReporterManagerInsatance.addToLogs() for centralized error tracking • Expands enums with new UI options (ViewInSplitTab, ViewInWindow), task properties, and view types • Improves file scanning to exclude .taskboard files and adds validation for unsupported checkbox symbols • Adds boards explorer and merge boards commands for enhanced board management • Removes legacy components and board operations utilities in favor of new file-based architecture Diagramflowchart LR
A["Individual Board Files<br/>`.taskboard`"] -->|"TaskBoardFileManager"| B["Board Persistence<br/>& Caching"]
C["Plugin Main"] -->|"Monkey-patch"| A
C -->|"v2 Migration"| D["Template Creation<br/>& Notifications"]
E["Drag-Drop Manager"] -->|"Auto-scroll &<br/>Error Tracking"| F["Enhanced UX"]
G["Settings UI"] -->|"Date Validation"| H["Improved Config"]
I["Advanced Filters"] -->|"Board ID-based"| J["Flexible Filtering"]
B --> K["Board Registry<br/>& Metadata"]
File Changes1. src/managers/DragDropTasksManager.ts
|
Code Review by Qodo
Context used✅ Tickets:
🎫 FR : A `.taskboard` file for every board in your vault 🎫 OPTI : Store the `viewPort` data in the `.taskboard` file for the specific board instead of in localStorage to avoid the extra operations during panning 🎫 [FEATURE REQUEST] Allow user to create multiple views inside the same `.taskboard` file +1 more 1. Moved file regenerates boardData.id
|
| const handlenodePositionChange = useCallback(() => { | ||
| try { | ||
| const stored = localStorage.getItem(NODE_POSITIONS_STORAGE_KEY); | ||
| if (stored) { | ||
| allBoardPositions = JSON.parse(stored); | ||
| if (typeof allBoardPositions !== 'object' || allBoardPositions === null) { | ||
| allBoardPositions = {}; | ||
| } | ||
| // Update positions for current board with validation | ||
| const nodesDataMap: Record<string, nodePositionData> = {}; | ||
| for (const node of nodes) { | ||
| const x = Number.isFinite(node.position?.x) ? node.position.x : 0; | ||
| const y = Number.isFinite(node.position?.y) ? node.position.y : 0; | ||
| const width = Number.isFinite(node?.width) ? node.width ?? 300 : 300; | ||
| nodesDataMap[node.id] = { x, y, width }; | ||
| } | ||
| } catch (error) { | ||
| console.warn('Failed to load existing positions:', error); | ||
| allBoardPositions = {}; | ||
| } | ||
|
|
||
| // Update positions for current board with validation | ||
| const posMap = nodes.reduce((acc, n) => { | ||
| const x = Number.isFinite(n.position?.x) ? n.position.x : 0; | ||
| const y = Number.isFinite(n.position?.y) ? n.position.y : 0; | ||
| acc[n.id] = { x, y }; | ||
| return acc; | ||
| }, {} as Record<string, nodePosition>); | ||
|
|
||
| setPositions(posMap); | ||
| allBoardPositions[String(activeBoardIndex)] = posMap; | ||
|
|
||
| try { | ||
| localStorage.setItem(NODE_POSITIONS_STORAGE_KEY, JSON.stringify(allBoardPositions)); | ||
| // Only update useRef - no state update needed, avoiding re-render | ||
| allNodesData.current = nodesDataMap; | ||
| emitMapDataUpdatedSignal(true); |
There was a problem hiding this comment.
2. Map save drops hidden nodes 📎 Requirement gap ≡ Correctness
Map node layout persistence is overwritten with only the currently rendered nodes, so tasks not present under the current filter/project can have their saved positions deleted. Returning to a previous filter/project can therefore reset/rearrange node positions.
Agent Prompt
## Issue description
Saving map layout currently replaces the persisted `nodesData` with only the nodes visible in the current render, which can erase positions for tasks hidden by filters/projects.
## Issue Context
The Map View should preserve layout for all tasks across context switches. Persisted `nodesData` should be updated as a merge (update known nodes, keep existing entries for hidden nodes), not as a full overwrite.
## Fix Focus Areas
- src/components/MapView/MapView.tsx[555-568]
- src/components/MapView/MapView.tsx[171-186]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Will merge this PR for now in the main branch of |
This PR implements everything mentioned in the following tickets :
.taskboardfile to store each board inside the vault #591viewPortdata in the.taskboardfile for the specific board instead of in localStorage to avoid the extra operations during panning #554.taskboardfile #723Also, refer this discussion topics :