Skip to content

Conversation

ericholscher
Copy link
Member

Fixes #541

@ericholscher ericholscher requested review from humitos and a team as code owners February 18, 2025 22:21
};

_hideFlyout = (e) => {
this.opened = false;
this._close();
Copy link
Contributor

Choose a reason for hiding this comment

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

Lit provides a native way to update dependent attributes/variables on reactive property changes. We should use that pattern instead of relying on manually calling methods like this. With willUpdate(), the current code would be fine

https://lit.dev/docs/components/lifecycle/#willupdate

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

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

Take a look at the tests I wrote and try to write a test case for this case. These cases where we need to interact with the elements to do QA are pretty hard to notice after deploy otherwise.

@ericholscher
Copy link
Member Author

Cool... I'm a little lost in general with all of this, so might take a while to get back to this.

@humitos
Copy link
Member

humitos commented Feb 24, 2025

@ericholscher let me know if I can help here or if you want me to take over it.

@ericholscher
Copy link
Member Author

ericholscher commented Feb 24, 2025

Feel free to run with it. It was just a small bug I wanted to fix, but the PR feedback seems to require a ton of research that I don't have energy for currently.

@ericholscher
Copy link
Member Author

I think this is still a bug, and this PR makes things better, but I'm going to close it since folks didn't want to ship it.

@humitos
Copy link
Member

humitos commented Jun 1, 2025

This is still a bug and Anthony opened a bye issue for it. It's not that we don't want to ship it, there is feedback about how to use the framework to solve this issue that wasn't addressed: #542 (comment)

@agjohnson
Copy link
Contributor

This logic that we have here now might also be the cause of #585. If we aren't always using the magic helpers _open/_close to open/close, updates to properties will be inconsistent like this. Using willUpdate avoids this and allows this.opened = false to always update related attributes.

@ericholscher
Copy link
Member Author

Yea, it's definitely the same issue as #585.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flyout gets reset in odd state after search is opened
3 participants