Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent hiding unresolved tree branches #167047

Merged
merged 3 commits into from
Jan 3, 2023

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.

@@ -625,6 +625,9 @@ class FindFilter<T> implements ITreeFilter<T, FuzzyScore | LabelFuzzyScore>, IDi
}

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