Add loading spinner for connection tree element refresh (#20621)

* added loading status to tree elements during refresh

* added message

* added lambda function

* added async

* moved addtraits to below null check

* Added debug lines for now

* added wip stack

* moved loading icon logic to inside tree item code

* added dispose logic

* Added comment explaining actions

* removed reference to NodeJs Timeout

* added showLoading status to Tree creation utils

* fixed spaces

* removed unnecessary space

* removed unnecessary timer for more responsive results

* removed call in connectionTreeActions test

* added fix to test

* stick to refresh only

* added 100 ms timeout

* added request comment
This commit is contained in:
Alex Ma
2022-11-02 09:42:06 -07:00
committed by GitHub
parent bb701c4fcf
commit 8a51bc91b4
6 changed files with 36 additions and 30 deletions

View File

@@ -450,7 +450,7 @@ suite('SQL Connection Tree Action tests', () => {
return refreshAction.run().then((value) => {
connectionManagementService.verify(x => x.isConnected(undefined, TypeMoq.It.isAny()), TypeMoq.Times.atLeastOnce());
objectExplorerService.verify(x => x.getObjectExplorerNode(TypeMoq.It.isAny()), TypeMoq.Times.atLeastOnce());
objectExplorerService.verify(x => x.refreshTreeNode(TypeMoq.It.isAny(), TypeMoq.It.isAny()), TypeMoq.Times.atLeastOnce());
objectExplorerService.verify(x => x.refreshTreeNode(TypeMoq.It.isAny(), TypeMoq.It.isAny()), TypeMoq.Times.exactly(0));
tree.verify(x => x.refresh(TypeMoq.It.isAny()), TypeMoq.Times.atLeastOnce());
});
});