Skip to content

5876-align-outline-expansion-with-vscode#9583

Merged
colin-grant-work merged 3 commits intoeclipse-theia:masterfrom
scottaxcell:5876-align-outline-expansion-with-vscode
Jun 23, 2021
Merged

5876-align-outline-expansion-with-vscode#9583
colin-grant-work merged 3 commits intoeclipse-theia:masterfrom
scottaxcell:5876-align-outline-expansion-with-vscode

Conversation

@scottaxcell
Copy link

@scottaxcell scottaxcell commented Jun 11, 2021

What it does

Fixes #5876 by aligning the node expand/collapse behavior of the outline-view-widget with VS Code. Previously, the behavior of the outline-view-widget matched the default behavior of a tree-widget.

The tree-widget now has an optional expandOnlyOnExpansionToggleClick prop that will separate the expand/collapse and selection behavior on an expandable node. When this prop is true, expand/collapse of a node will only occur when the expansion toggle is selected.

Rename outline-view-tree.ts to outline-view-tree-model.ts to match class name.

How to test

  1. Open a file that will have expandable nodes in the outline.
  2. Open the outline.
  3. Expanding and collapsing of an expandable node should only occur when the expansion toggle is clicked and not when any other part of the node is clicked.

Review checklist

Reminder for reviewers

Signed-off-by: Scott Axcell scott.axcell@xilinx.com

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scottaxcell thank you for the contribution, please be sure to sign the eclipse contributor agreement (eca) with the same email as your authorship so it can be accepted.

@vince-fugnitto vince-fugnitto added outline issues related to the outline tree issues related to the tree (ex: tree widget) labels Jun 11, 2021
Scott Axcell added 2 commits June 11, 2021 12:05
1) Add expandOnlyOnExpansionToggleClick to TreeProps.
2) Enable expandOnlyOnExpansionToggleClick for OutlineViewWidget.
3) Prevent node expansion in the TreeWidget when expandOnlyOnExpansionToggleClick is enabled.
4) Rename outline-view-tree.ts to outline-view-tree-model.ts to match class name.
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed that the changes align the outline behavior with vscode, meaning that the collapsible node only expands when the toggle is clicked, and not generally like with other trees with the node is clicked 👍 :

outline-updates

I do not have any further comments about the source-code, but I'll give others the chance to review as well.

Copy link
Contributor

@colin-grant-work colin-grant-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working well, but the code could be cleaned up a bit. Please see my comments below.

@scottaxcell
Copy link
Author

@colin-grant-work thank you for the detailed code review. I have cleaned up the code as you recommended.

Copy link
Contributor

@colin-grant-work colin-grant-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and is working for me. Thanks for the contribution!

@colin-grant-work colin-grant-work merged commit 62116bf into eclipse-theia:master Jun 23, 2021
@vince-fugnitto vince-fugnitto added this to the 1.15.0 milestone Jun 30, 2021
dna2github pushed a commit to dna2fork/theia that referenced this pull request Aug 25, 2021
* 5876-align-outline-expansion-with-vscode

1) Add expandOnlyOnExpansionToggleClick to TreeProps.
2) Enable expandOnlyOnExpansionToggleClick for OutlineViewWidget.
3) Prevent node expansion in the TreeWidget when expandOnlyOnExpansionToggleClick is enabled.
4) Rename outline-view-tree.ts to outline-view-tree-model.ts to match class name.

Co-authored-by: Scott Axcell <scott.axcell@xilinx.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

outline issues related to the outline tree issues related to the tree (ex: tree widget)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[outline-view] align outline tree expand/collapse behaviours with VS Code

3 participants