Skip to content

Commit ca42550

Browse files
chore: remove unused 'descendantCount' from tagging API (#2970)
See openedx/openedx-core#517
1 parent 0fe8109 commit ca42550

7 files changed

Lines changed: 0 additions & 146 deletions

File tree

src/taxonomy/data/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export interface QueryOptions {
3838

3939
export interface TagData {
4040
childCount: number;
41-
descendantCount: number;
4241
depth: number;
4342
externalId: string;
4443
id: number;

src/taxonomy/tag-list/TagListTable.test.jsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ const mockTagsResponse = {
5858
...tagDefaults,
5959
value: 'root tag 1',
6060
child_count: 1,
61-
descendant_count: 14,
6261
_id: 1001,
6362
sub_tags_url: '/request/to/load/subtags/1',
6463
usage_count: 1,
@@ -67,7 +66,6 @@ const mockTagsResponse = {
6766
...tagDefaults,
6867
value: 'root tag 2',
6968
child_count: 1,
70-
descendant_count: 10,
7169
_id: 1002,
7270
sub_tags_url: '/request/to/load/subtags/2',
7371
usage_count: 0,
@@ -76,7 +74,6 @@ const mockTagsResponse = {
7674
...tagDefaults,
7775
value: 'root tag 3',
7876
child_count: 1,
79-
descendant_count: 5,
8077
_id: 1003,
8178
sub_tags_url: '/request/to/load/subtags/3',
8279
usage_count: 3,
@@ -310,7 +307,6 @@ describe('<TagListTable />', () => {
310307
...tagDefaults,
311308
value: 'a new tag',
312309
child_count: 0,
313-
descendant_count: 0,
314310
_id: 1234,
315311
});
316312
const { creatingRow, input } = await openTopLevelDraftRow();
@@ -357,7 +353,6 @@ describe('<TagListTable />', () => {
357353
...tagDefaults,
358354
value: 'a new tag',
359355
child_count: 0,
360-
descendant_count: 0,
361356
_id: 1234,
362357
}]);
363358
}, 100);
@@ -376,7 +371,6 @@ describe('<TagListTable />', () => {
376371
...tagDefaults,
377372
value: 'a new tag',
378373
child_count: 0,
379-
descendant_count: 0,
380374
_id: 1234,
381375
});
382376
const { creatingRow, input } = await openTopLevelDraftRow();
@@ -403,7 +397,6 @@ describe('<TagListTable />', () => {
403397
...tagDefaults,
404398
value: 'a new tag',
405399
child_count: 0,
406-
descendant_count: 0,
407400
_id: 1234,
408401
});
409402
const { creatingRow, input } = await openTopLevelDraftRow();
@@ -420,7 +413,6 @@ describe('<TagListTable />', () => {
420413
...tagDefaults,
421414
value: 'xyz tag',
422415
child_count: 0,
423-
descendant_count: 0,
424416
_id: 1234,
425417
});
426418
const { creatingRow, input } = await openTopLevelDraftRow();
@@ -442,7 +434,6 @@ describe('<TagListTable />', () => {
442434
...tagDefaults,
443435
value: 'xyz tag',
444436
child_count: 0,
445-
descendant_count: 0,
446437
_id: 1234,
447438
});
448439
const { creatingRow, input } = await openTopLevelDraftRow();
@@ -477,7 +468,6 @@ describe('<TagListTable />', () => {
477468
...tagDefaults,
478469
value: requestData.tag,
479470
child_count: 0,
480-
descendant_count: 0,
481471
_id: Math.floor(Math.random() * 10000),
482472
}];
483473
});
@@ -546,7 +536,6 @@ describe('<TagListTable />', () => {
546536
...tagDefaults,
547537
value: 'Tag A',
548538
child_count: 0,
549-
descendant_count: 0,
550539
_id: 4567,
551540
});
552541

@@ -837,7 +826,6 @@ describe('<TagListTable /> isolated async subtag tests', () => {
837826
...tagDefaults,
838827
value: 'child-new',
839828
child_count: 0,
840-
descendant_count: 0,
841829
_id: 2222,
842830
parent_value: 'root tag 1',
843831
});
@@ -858,7 +846,6 @@ describe('<TagListTable /> isolated async subtag tests', () => {
858846
...tagDefaults,
859847
value: 'child appears immediately',
860848
child_count: 0,
861-
descendant_count: 0,
862849
_id: 3333,
863850
parent_value: 'root tag 1',
864851
});
@@ -879,7 +866,6 @@ describe('<TagListTable /> isolated async subtag tests', () => {
879866
...tagDefaults,
880867
value: 'nested child',
881868
child_count: 0,
882-
descendant_count: 0,
883869
_id: 4444,
884870
parent_value: 'the child tag',
885871
});
@@ -903,7 +889,6 @@ describe('<TagListTable /> isolated async subtag tests', () => {
903889
...tagDefaults,
904890
value: 'nested child appears immediately',
905891
child_count: 0,
906-
descendant_count: 0,
907892
_id: 5555,
908893
parent_value: 'the child tag',
909894
});
@@ -928,7 +913,6 @@ describe('<TagListTable /> isolated async subtag tests', () => {
928913
...tagDefaults,
929914
value: 'great grandchild',
930915
child_count: 0,
931-
descendant_count: 0,
932916
_id: 6666,
933917
parent_value: 'the grandchild tag',
934918
});
@@ -951,7 +935,6 @@ describe('<TagListTable /> isolated async subtag tests', () => {
951935
...tagDefaults,
952936
value: 'great grandchild appears immediately',
953937
child_count: 0,
954-
descendant_count: 0,
955938
_id: 7777,
956939
parent_value: 'the grandchild tag',
957940
});

src/taxonomy/tag-list/hooks.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ const useEditActions = ({
125125
parentValue: parentTagValue,
126126
depth: parentTag ? parentTag.depth + 1 : 0,
127127
childCount: 0,
128-
descendantCount: 0,
129128
subTagsUrl: null,
130129
externalId: '',
131130
}, parentTagValue);

0 commit comments

Comments
 (0)