Skip to content

Commit 4185fcd

Browse files
chore: remove unused 'descendantCount' from tagging API - removed upstream
See openedx/openedx-core#517
1 parent 4db8fca commit 4185fcd

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,23 +58,20 @@ 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
},
6564
{
6665
...tagDefaults,
6766
value: 'root tag 2',
6867
child_count: 1,
69-
descendant_count: 10,
7068
_id: 1002,
7169
sub_tags_url: '/request/to/load/subtags/2',
7270
},
7371
{
7472
...tagDefaults,
7573
value: 'root tag 3',
7674
child_count: 1,
77-
descendant_count: 5,
7875
_id: 1003,
7976
sub_tags_url: '/request/to/load/subtags/3',
8077
},
@@ -268,7 +265,6 @@ describe('<TagListTable />', () => {
268265
...tagDefaults,
269266
value: 'a new tag',
270267
child_count: 0,
271-
descendant_count: 0,
272268
_id: 1234,
273269
});
274270
const { creatingRow, input } = await openTopLevelDraftRow();
@@ -315,7 +311,6 @@ describe('<TagListTable />', () => {
315311
...tagDefaults,
316312
value: 'a new tag',
317313
child_count: 0,
318-
descendant_count: 0,
319314
_id: 1234,
320315
}]);
321316
}, 100);
@@ -334,7 +329,6 @@ describe('<TagListTable />', () => {
334329
...tagDefaults,
335330
value: 'a new tag',
336331
child_count: 0,
337-
descendant_count: 0,
338332
_id: 1234,
339333
});
340334
const { creatingRow, input } = await openTopLevelDraftRow();
@@ -361,7 +355,6 @@ describe('<TagListTable />', () => {
361355
...tagDefaults,
362356
value: 'a new tag',
363357
child_count: 0,
364-
descendant_count: 0,
365358
_id: 1234,
366359
});
367360
const { creatingRow, input } = await openTopLevelDraftRow();
@@ -378,7 +371,6 @@ describe('<TagListTable />', () => {
378371
...tagDefaults,
379372
value: 'xyz tag',
380373
child_count: 0,
381-
descendant_count: 0,
382374
_id: 1234,
383375
});
384376
const { creatingRow, input } = await openTopLevelDraftRow();
@@ -400,7 +392,6 @@ describe('<TagListTable />', () => {
400392
...tagDefaults,
401393
value: 'xyz tag',
402394
child_count: 0,
403-
descendant_count: 0,
404395
_id: 1234,
405396
});
406397
const { creatingRow, input } = await openTopLevelDraftRow();
@@ -435,7 +426,6 @@ describe('<TagListTable />', () => {
435426
...tagDefaults,
436427
value: requestData.tag,
437428
child_count: 0,
438-
descendant_count: 0,
439429
_id: Math.floor(Math.random() * 10000),
440430
}];
441431
});
@@ -504,7 +494,6 @@ describe('<TagListTable />', () => {
504494
...tagDefaults,
505495
value: 'Tag A',
506496
child_count: 0,
507-
descendant_count: 0,
508497
_id: 4567,
509498
});
510499

@@ -795,7 +784,6 @@ describe('<TagListTable /> isolated async subtag tests', () => {
795784
...tagDefaults,
796785
value: 'child-new',
797786
child_count: 0,
798-
descendant_count: 0,
799787
_id: 2222,
800788
parent_value: 'root tag 1',
801789
});
@@ -816,7 +804,6 @@ describe('<TagListTable /> isolated async subtag tests', () => {
816804
...tagDefaults,
817805
value: 'child appears immediately',
818806
child_count: 0,
819-
descendant_count: 0,
820807
_id: 3333,
821808
parent_value: 'root tag 1',
822809
});
@@ -837,7 +824,6 @@ describe('<TagListTable /> isolated async subtag tests', () => {
837824
...tagDefaults,
838825
value: 'nested child',
839826
child_count: 0,
840-
descendant_count: 0,
841827
_id: 4444,
842828
parent_value: 'the child tag',
843829
});
@@ -861,7 +847,6 @@ describe('<TagListTable /> isolated async subtag tests', () => {
861847
...tagDefaults,
862848
value: 'nested child appears immediately',
863849
child_count: 0,
864-
descendant_count: 0,
865850
_id: 5555,
866851
parent_value: 'the child tag',
867852
});
@@ -886,7 +871,6 @@ describe('<TagListTable /> isolated async subtag tests', () => {
886871
...tagDefaults,
887872
value: 'great grandchild',
888873
child_count: 0,
889-
descendant_count: 0,
890874
_id: 6666,
891875
parent_value: 'the grandchild tag',
892876
});
@@ -909,7 +893,6 @@ describe('<TagListTable /> isolated async subtag tests', () => {
909893
...tagDefaults,
910894
value: 'great grandchild appears immediately',
911895
child_count: 0,
912-
descendant_count: 0,
913896
_id: 7777,
914897
parent_value: 'the grandchild tag',
915898
});

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)