This feature allows users to see the original positions of swimlanes, lists, and cards before the list naming feature was added in commit 719ef87efceacfe91461a8eeca7cf74d11f4cc0a.
The original positions tracking system automatically captures and stores the initial positions of all board entities (swimlanes, lists, and cards) when they are created. This allows users to:
The system uses a new PositionHistory
collection with the following structure:
{
boardId: String, // Board ID
entityType: String, // 'swimlane', 'list', or 'card'
entityId: String, // Entity ID
originalPosition: Object, // Original position data
originalSwimlaneId: String, // Original swimlane (for lists/cards)
originalListId: String, // Original list (for cards)
originalTitle: String, // Original title
createdAt: Date, // When tracked
updatedAt: Date // Last updated
}
Position tracking happens automatically when entities are created. No manual intervention required.
<!-- Show original position for a swimlane -->
{{> originalPosition entityId=swimlane._id entityType="swimlane"}}
<!-- Show original position for a list -->
{{> originalPosition entityId=list._id entityType="list"}}
<!-- Show original position for a card -->
{{> originalPosition entityId=card._id entityType="card"}}
import { addOriginalPositionToSwimlane, addOriginalPositionToList, addOriginalPositionToCard } from '/client/lib/originalPositionHelpers';
// Track original position for a swimlane
addOriginalPositionToSwimlane(swimlaneId);
// Track original position for a list
addOriginalPositionToList(listId);
// Track original position for a card
addOriginalPositionToCard(cardId);
// Track swimlane
Meteor.call('positionHistory.trackSwimlane', swimlaneId);
// Track list
Meteor.call('positionHistory.trackList', listId);
// Track card
Meteor.call('positionHistory.trackCard', cardId);
// Get swimlane original position
Meteor.call('positionHistory.getSwimlaneOriginalPosition', swimlaneId);
// Get list original position
Meteor.call('positionHistory.getListOriginalPosition', listId);
// Get card original position
Meteor.call('positionHistory.getCardOriginalPosition', cardId);
// Check if swimlane has moved
Meteor.call('positionHistory.hasSwimlaneMoved', swimlaneId);
// Check if list has moved
Meteor.call('positionHistory.hasListMoved', listId);
// Check if card has moved
Meteor.call('positionHistory.hasCardMoved', cardId);
// Get all position history for a board
Meteor.call('positionHistory.getBoardHistory', boardId);
// Get position history by entity type
Meteor.call('positionHistory.getBoardHistoryByType', boardId, 'swimlane');
Meteor.call('positionHistory.getBoardHistoryByType', boardId, 'list');
Meteor.call('positionHistory.getBoardHistoryByType', boardId, 'card');
<template name="swimlane">
<div class="swimlane">
<!-- Existing swimlane content -->
<!-- Add original position info -->
{{> originalPosition entityId=_id entityType="swimlane"}}
</div>
</template>
<template name="list">
<div class="list">
<!-- Existing list content -->
<!-- Add original position info -->
{{> originalPosition entityId=_id entityType="list"}}
</div>
</template>
<template name="card">
<div class="card">
<!-- Existing card content -->
<!-- Add original position info -->
{{> originalPosition entityId=_id entityType="card"}}
</div>
</template>
<template name="board">
<div class="board">
<!-- Existing board content -->
<!-- Add original positions view -->
{{> originalPositionsView}}
</div>
</template>
Position tracking is enabled by default. To disable it, comment out the tracking hooks in the model files:
// In models/swimlanes.js, models/lists.js, models/cards.js
// Comment out the tracking hooks:
/*
Meteor.setTimeout(() => {
const entity = Collection.findOne(doc._id);
if (entity) {
entity.trackOriginalPosition();
}
}, 100);
*/
Modify the CSS files to customize the appearance:
client/components/common/originalPosition.css
client/components/boards/originalPositionsView.css
No database migration is required. The system automatically creates the PositionHistory
collection when first used.
For issues or questions about the original positions tracking feature, please: