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(popover, tooltip): skip ref setup logic on component removal #11132

Merged
merged 3 commits into from
Dec 23, 2024

Conversation

jcfranco
Copy link
Member

@jcfranco jcfranco commented Dec 22, 2024

Related Issue: #10731

Summary

Adds a guard to popover and tooltip ref callbacks to avoid missing ref warnings on removal. After #10310, ref callbacks are invoked both when the component is added and removed (see #11093).

BEGIN_COMMIT_OVERRIDE
omitted from changelog
END_COMMIT_OVERRIDE

@github-actions github-actions bot added the bug Bug reports for broken functionality. Issues should include a reproduction of the bug. label Dec 22, 2024
@jcfranco jcfranco changed the title fix(popover, tooltip): skip ref set up logic on component removal fix(popover, tooltip): skip ref setup logic on component removal Dec 22, 2024
@jcfranco jcfranco requested a review from driskull December 22, 2024 16:02
@@ -729,6 +729,54 @@ describe("calcite-popover", () => {
});
});

describe("warning messages", () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

I'll submit a follow-up PR to clean this up and also try to add some reusable tests/utils.

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 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 labels Dec 23, 2024
@jcfranco jcfranco merged commit e67b1fe into dev Dec 23, 2024
17 checks passed
@jcfranco jcfranco deleted the jcfranco/avoid-ref-setup-logic-on-removal branch December 23, 2024 17:29
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