Skip to content

Prevent hiding unresolved tree branches#167047

Merged
joaomoreno merged 3 commits intomicrosoft:mainfrom
gjsjohnmurray:fix-66971v2
Jan 3, 2023
Merged

Prevent hiding unresolved tree branches#167047
joaomoreno merged 3 commits intomicrosoft:mainfrom
gjsjohnmurray:fix-66971v2

Conversation

@gjsjohnmurray
Copy link
Contributor

This PR is my second attempt at resolving #66971, following feedback from @joaomoreno on my original PR (#164472).

I am submitting it as a draft because of the 2 ts(2339) problems it contains. I will add a comment to the offending line.

}

if (this.tree.findMode === TreeFindMode.Filter) {
if (element.hasChildren && element.childrenUnresolved) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Problems reported on this line:

Property 'hasChildren' does not exist on type 'T'.
Property 'childrenUnresolved' does not exist on type 'T'.

What (if any) is the right way to resolve these?

Copy link
Member

Choose a reason for hiding this comment

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

We can create an additional option for the tree:

readonly defaultFindVisibility?: TreeVisibility | ((e: T) => TreeVisibility);

Will push commits to this branch.

@gjsjohnmurray
Copy link
Contributor Author

/assign @joaomoreno

@joaomoreno joaomoreno added this to the January 2023 milestone Jan 2, 2023
@joaomoreno
Copy link
Member

Thanks for the effort and idea @gjsjohnmurray, this is a clever way to solve/mitigate this problem. Sorry it took me so long to get here! 🍻

Unsure if this PR should close #66971, IMO that's a larger work item.

@joaomoreno joaomoreno marked this pull request as ready for review January 2, 2023 14:42
@joaomoreno joaomoreno changed the title Another approach to fixing #66971, after feedback on #164472 Prevent hiding unresolved tree branches Jan 2, 2023
@joaomoreno joaomoreno merged commit 4a7489d into microsoft:main Jan 3, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 2023
@gjsjohnmurray gjsjohnmurray deleted the fix-66971v2 branch April 16, 2023 12:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants