From cea66ae413de174b9c62de88cd27cf8b7fca2708 Mon Sep 17 00:00:00 2001 From: Cassandra Choi Date: Tue, 21 May 2024 19:18:14 +0000 Subject: [PATCH] fix(cdk/tree): remove `NB:` comments --- src/cdk/a11y/key-manager/tree-key-manager.ts | 2 +- src/cdk/tree/tree.ts | 6 +++--- .../cdk-tree-custom-key-manager-example.ts | 2 +- src/material/tree/tree-using-tree-control.spec.ts | 2 +- src/material/tree/tree.spec.ts | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cdk/a11y/key-manager/tree-key-manager.ts b/src/cdk/a11y/key-manager/tree-key-manager.ts index 305b93d7402b..817f19646b3b 100644 --- a/src/cdk/a11y/key-manager/tree-key-manager.ts +++ b/src/cdk/a11y/key-manager/tree-key-manager.ts @@ -142,7 +142,7 @@ export class TreeKeyManager implements TreeKeyMana switch (key) { case 'Tab': - // NB: return here, in order to allow Tab to actually tab out of the tree + // Return early here, in order to allow Tab to actually tab out of the tree return; case 'ArrowDown': diff --git a/src/cdk/tree/tree.ts b/src/cdk/tree/tree.ts index f670bcc2a598..5e7381be8203 100644 --- a/src/cdk/tree/tree.ts +++ b/src/cdk/tree/tree.ts @@ -382,7 +382,7 @@ export class CdkTree this._dataSubscription = combineLatest([ dataStream, this._nodeType, - // NB: the data is unused below, however we add it here to essentially + // We don't use the expansion data directly, however we add it here to essentially // trigger data rendering when expansion changes occur. expansionModel.changed.pipe( startWith(null), @@ -955,8 +955,8 @@ export class CdkTree * nodes into a single array. * * If any nodes are not expanded, then their children will not be added into the array. - * NB: this will still traverse all nested children in order to build up our - * internal data models, but will not include them in the returned array. + * This will still traverse all nested children in order to build up our internal data + * models, but will not include them in the returned array. */ private _flattenNestedNodesWithExpansion(nodes: readonly T[], level = 0): Observable { const childrenAccessor = this._getChildrenAccessor(); diff --git a/src/components-examples/cdk/tree/cdk-tree-custom-key-manager/cdk-tree-custom-key-manager-example.ts b/src/components-examples/cdk/tree/cdk-tree-custom-key-manager/cdk-tree-custom-key-manager-example.ts index f3da6fbbd01d..ae33cef02076 100644 --- a/src/components-examples/cdk/tree/cdk-tree-custom-key-manager/cdk-tree-custom-key-manager-example.ts +++ b/src/components-examples/cdk/tree/cdk-tree-custom-key-manager/cdk-tree-custom-key-manager-example.ts @@ -167,7 +167,7 @@ export class VimTreeKeyManager implements TreeKeyM switch (keyCode) { case TAB: - // NB: return here, in order to allow Tab to actually tab out of the tree + // Return early here, in order to allow Tab to actually tab out of the tree return; case DOWN_ARROW: diff --git a/src/material/tree/tree-using-tree-control.spec.ts b/src/material/tree/tree-using-tree-control.spec.ts index 0c6721b2e1d2..a019043d4143 100644 --- a/src/material/tree/tree-using-tree-control.spec.ts +++ b/src/material/tree/tree-using-tree-control.spec.ts @@ -457,7 +457,7 @@ describe('MatTree', () => { (getNodes(treeElement)[1] as HTMLElement).click(); fixture.detectChanges(); - // NB: only four elements are present here; children are not present + // Note: only four elements are present here; children are not present // in DOM unless the parent node is expanded. expect( getNodes(treeElement) diff --git a/src/material/tree/tree.spec.ts b/src/material/tree/tree.spec.ts index 494b2bcb42fd..75dc34a05e3e 100644 --- a/src/material/tree/tree.spec.ts +++ b/src/material/tree/tree.spec.ts @@ -444,7 +444,7 @@ describe('MatTree', () => { (getNodes(treeElement)[1] as HTMLElement).click(); fixture.detectChanges(); - // NB: only four elements are present here; children are not present + // Note: only four elements are present here; children are not present // in DOM unless the parent node is expanded. expect( getNodes(treeElement)