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: tooltip type error #988

Merged
merged 2 commits into from
Sep 26, 2024
Merged

fix: tooltip type error #988

merged 2 commits into from
Sep 26, 2024

Conversation

luwes
Copy link
Contributor

@luwes luwes commented Sep 26, 2024

fix #986

@luwes luwes self-assigned this Sep 26, 2024
@luwes luwes requested review from heff and a team as code owners September 26, 2024 13:33
Copy link

vercel bot commented Sep 26, 2024

@luwes is attempting to deploy a commit to the Mux Team on Vercel.

A member of the Team first needs to authorize it.

}

this.tooltipEl = this.shadowRoot.querySelector('media-tooltip');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we still want to get the media-tooltip if the shadow dom was SSR'd

Copy link
Collaborator

Choose a reason for hiding this comment

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

question(non-blocking): given the error, should we just move tooltipEl to a getter that lazy evals this.shadowRoot.querySelector('media-tooltip');?

this.removeEventListener('click', this.#clickListener);
this.tooltipEl = null;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

on disconnected we don't want to empty this property because we only query it in the constructor, not in connectedCallback

Copy link

vercel bot commented Sep 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
media-chrome ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 26, 2024 2:12pm
media-chrome-demo-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 26, 2024 2:12pm

Copy link

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 88.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 76.89%. Comparing base (3ea80df) to head (93324bd).
Report is 111 commits behind head on main.

Files with missing lines Patch % Lines
src/js/media-chrome-button.ts 88.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #988      +/-   ##
==========================================
- Coverage   78.55%   76.89%   -1.67%     
==========================================
  Files          59       50       -9     
  Lines       11080    12088    +1008     
  Branches        0      695     +695     
==========================================
+ Hits         8704     9295     +591     
- Misses       2376     2768     +392     
- Partials        0       25      +25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@cjpillsbury cjpillsbury left a comment

Choose a reason for hiding this comment

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

One nb question/suggestion. Otherwise lgtm.

}

this.tooltipEl = this.shadowRoot.querySelector('media-tooltip');
Copy link
Collaborator

Choose a reason for hiding this comment

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

question(non-blocking): given the error, should we just move tooltipEl to a getter that lazy evals this.shadowRoot.querySelector('media-tooltip');?

@luwes
Copy link
Contributor Author

luwes commented Sep 26, 2024

good idea. for now it's fine I think because we don't reset it anymore. we cache it right after the DOM is appended so the query will always return the media-tooltip element.

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.

TypeError: Cannot read properties of null (reading 'updateXOffset')
2 participants