-
Notifications
You must be signed in to change notification settings - Fork 34.9k
Closed
Labels
commentsComments Provider/Widget/Panel issuesComments Provider/Widget/Panel issuesdebtCode quality issuesCode quality issuesinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insiders
Milestone
Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.76.0
- OS Version: macOS
Steps to Reproduce:
- Click on a line gutter icon for an expanded comment thread.
ReviewZoneWidget.toggleExpand()
sets the comment thread'scollapsibleState
toCollapsed
:this._commentThread.collapsibleState = languages.CommentThreadCollapsibleState.Collapsed; - This causes the widget's listener on the thread's collapsible state to fire synchronously and call
hide()
:this.hide(); toggleExpand()
follows this up with an explicit, duplicate call tohide()
:this.hide();
For the other direction, the problem is the same and show()
is called twice with identical parameters on every change.
I am not sure if these duplicate calls cause unnecessary rendering or similar elsewhere in the stack, but they seem redundant. I think relying on the listener for onDidChangeCollapsibleState
is probably sufficient, but I am not that familiar enough with the code base to have a confident opinion here.
Metadata
Metadata
Assignees
Labels
commentsComments Provider/Widget/Panel issuesComments Provider/Widget/Panel issuesdebtCode quality issuesCode quality issuesinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insiders