Skip to content

ReviewZoneWidget makes duplicate calls to show() + hide() #174263

Closed

Description

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.76.0
  • OS Version: macOS

Steps to Reproduce:

  1. Click on a line gutter icon for an expanded comment thread.
  2. ReviewZoneWidget.toggleExpand() sets the comment thread's collapsibleState to Collapsed:
    this._commentThread.collapsibleState = languages.CommentThreadCollapsibleState.Collapsed;
  3. This causes the widget's listener on the thread's collapsible state to fire synchronously and call hide():
  4. toggleExpand() follows this up with an explicit, duplicate call to 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

commentsComments Provider/Widget/Panel issuesdebtCode quality issuesinsiders-releasedPatch has been released in VS Code Insiders

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions