You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refresh the tree very often, by using some function like this (this makes it easier to reproduce):
asyncfunctionrefreshVeryOften(provider: NodeDependenciesProvider){while(true){awaitnewPromise(f=>setTimeout(f,10));// Wait 10ms, or some other small amount of timeprovider._onDidChangeTreeData.fire();}}
Try to run the added view action a couple of times
Try to expand/collapse some tree items. It might take some times to reproduce
Expected results
Despite the refreshes, I would expect the onDidExpandElement and onDidCollapseElement listeners to run and console.log the event. I would also expect the nodeDependencies.editEntry command to always run, and the function is passed a TreeItem.
Actual result
onDidExpandElement often does not get called, even though in the UI, I see that the tree view item is expanded
onDidCollapseElement often does not get called, even though in the UI, I see that the tree view item is collapsed
The nodeDependencies.editEntry registered command sometimes gets called with no arguments, i.e. no TreeItem is passed.
Video example
This is in a different project, namely my Semaphore CI extension. Note that I have set the refresh delay to 2 seconds (2000ms).
Same for collapsing/expanding events. In the video you can see the element being expanded and collapsed, but not every change in the UI is shown in the events.
Speculated cause
I think some part of the tree view is removed before the new one is finished rendering, during a refresh. Either way it seems like some race/timing condition, because it sometimes happens and sometimes doesn't, even though the code path on the extension side should be exactly the same.
The text was updated successfully, but these errors were encountered:
Does this issue occur when all extensions are disabled?: No/unknown, because I need an extension to show the behavior in the first place.
95e79164be1f7d883ed9ffda8b7d4ad3a17e6c1e
. Also seen with Ubuntu 20.04.Steps to Reproduce:
nodeDependencies.editEntry
command and add it to theview/item/context
, as per the example.onDidExpandElement
andonDidCollapseElement
listener that just runconsole.log
. e.g.:Expected results
Despite the refreshes, I would expect the
onDidExpandElement
andonDidCollapseElement
listeners to run andconsole.log
the event. I would also expect thenodeDependencies.editEntry
command to always run, and the function is passed aTreeItem
.Actual result
onDidExpandElement
often does not get called, even though in the UI, I see that the tree view item is expandedonDidCollapseElement
often does not get called, even though in the UI, I see that the tree view item is collapsednodeDependencies.editEntry
registered command sometimes gets called with no arguments, i.e. noTreeItem
is passed.Video example
This is in a different project, namely my Semaphore CI extension. Note that I have set the refresh delay to 2 seconds (2000ms).
Same for collapsing/expanding events. In the video you can see the element being expanded and collapsed, but not every change in the UI is shown in the events.
Speculated cause
I think some part of the tree view is removed before the new one is finished rendering, during a refresh. Either way it seems like some race/timing condition, because it sometimes happens and sometimes doesn't, even though the code path on the extension side should be exactly the same.
The text was updated successfully, but these errors were encountered: