Skip to content

Commit 40d32ea

Browse files
committed
refactor: Rename TaskLayoutComponent key to BlockedBy
1 parent 184b817 commit 40d32ea

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Layout/TaskLayoutOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export enum TaskLayoutComponent {
88
// NEW_TASK_FIELD_EDIT_REQUIRED
99
Description = 'description',
1010
Id = 'id',
11-
BlockedBy = 'blockedBy',
11+
DependsOn = 'blockedBy',
1212
Priority = 'priority',
1313
RecurrenceRule = 'recurrenceRule',
1414
CreatedDate = 'createdDate',

src/Query/Query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ Problem line: "${line}"`;
319319
this._taskLayoutOptions.setVisibility(TaskLayoutComponent.Id, !hide);
320320
break;
321321
case 'depends on':
322-
this._taskLayoutOptions.setVisibility(TaskLayoutComponent.BlockedBy, !hide);
322+
this._taskLayoutOptions.setVisibility(TaskLayoutComponent.DependsOn, !hide);
323323
break;
324324
default:
325325
this.setError('do not understand hide/show option', line);

src/TaskSerializer/DefaultTaskSerializer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export class DefaultTaskSerializer implements TaskSerializer {
170170
case TaskLayoutComponent.RecurrenceRule:
171171
if (!task.recurrence) return '';
172172
return symbolAndStringValue(shortMode, recurrenceSymbol, task.recurrence.toText());
173-
case TaskLayoutComponent.BlockedBy: {
173+
case TaskLayoutComponent.DependsOn: {
174174
if (task.blockedBy.length === 0) return '';
175175
return symbolAndStringValue(shortMode, dependsOnSymbol, task.blockedBy.join(','));
176176
}

tests/Renderer/TaskLineRenderer.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ describe('task line rendering - layout options', () => {
279279
});
280280

281281
it('renders with depends on', async () => {
282-
await testLayoutOptions(['Do exercises #todo #health', ' ⛔️ 123456,abc123'], [TaskLayoutComponent.BlockedBy]);
282+
await testLayoutOptions(['Do exercises #todo #health', ' ⛔️ 123456,abc123'], [TaskLayoutComponent.DependsOn]);
283283
});
284284
});
285285

0 commit comments

Comments
 (0)