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

fix(tree): fix has-children logic #11347

Merged
merged 4 commits into from
Jan 28, 2025
Merged

Conversation

jcfranco
Copy link
Member

@jcfranco jcfranco commented Jan 21, 2025

Related Issue: #10731

Summary

✨🚸☑️🔨✨

@driskull Thanks for the patch!

@github-actions github-actions bot added the bug Bug reports for broken functionality. Issues should include a reproduction of the bug. label Jan 21, 2025
@jcfranco jcfranco added pr ready for visual snapshots Adding this label will run visual snapshot testing. no changelog entry Use the commit override to avoid a changelog entry and removed bug Bug reports for broken functionality. Issues should include a reproduction of the bug. labels Jan 21, 2025
@jcfranco jcfranco requested a review from driskull January 21, 2025 19:17
Copy link
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

👍

@jcfranco
Copy link
Member Author

@driskull This change introduces a visual regression. We'll need to investigate further. 🥲

@jcfranco jcfranco marked this pull request as draft January 22, 2025 00:37
@driskull
Copy link
Member

😢 seems like that property getter isn't working

@driskull
Copy link
Member

Or maybe showBulletPoint needs some more logic

@jcfranco jcfranco removed the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Jan 28, 2025
@github-actions github-actions bot added the bug Bug reports for broken functionality. Issues should include a reproduction of the bug. label Jan 28, 2025
@jcfranco jcfranco added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Jan 28, 2025
@jcfranco jcfranco marked this pull request as ready for review January 28, 2025 09:22
Copy link
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

👍

@@ -266,6 +268,7 @@ export class TreeItem extends LitElement implements InteractiveComponent {
)[0];

this.childTree = childTree;
this.requestUpdate("hasChildren");
Copy link
Member

Choose a reason for hiding this comment

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

If childTree is a state() property, it wouldn't update the hasChildren getter?

Copy link
Member Author

Choose a reason for hiding this comment

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

It updates the getter, but it doesn't reflect (see example). There were a couple of ways to fix this, but an explicit update request seemed the simplest.

@jcfranco jcfranco changed the title fix(tree): fix regression in has-children logic fix(tree): fix has-children logic Jan 28, 2025
@jcfranco jcfranco merged commit 5328ba7 into dev Jan 28, 2025
18 checks passed
@jcfranco jcfranco deleted the jcfranco/10731-fix-tree-state-rendering branch January 28, 2025 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports for broken functionality. Issues should include a reproduction of the bug. no changelog entry Use the commit override to avoid a changelog entry pr ready for visual snapshots Adding this label will run visual snapshot testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants