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

Fixes ContextRoot for requesters in nested shadowRoots #3834

Merged
merged 2 commits into from Apr 24, 2023

Conversation

sorvell
Copy link
Member

@sorvell sorvell commented Apr 22, 2023

Fixes #3833.

ContextRoot now stores the root target (event.composedPath()[0]) to avoid issues with event re-targeting.

Steven Orvell added 2 commits April 21, 2023 17:59
Fixes #3833 by avoiding event re-targeting issues when context
requesting elements are in nested shadowRoots.
@changeset-bot
Copy link

changeset-bot bot commented Apr 22, 2023

🦋 Changeset detected

Latest commit: 9903d2b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@lit-labs/context Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Apr 22, 2023

📊 Tachometer Benchmark Results

Summary

nop-update

  • lit-html-kitchen-sink: unsure 🔍 -8% - +0% (-1.40ms - +0.10ms)
    this-change vs tip-of-tree

render

  • lit-element-list: 73.27ms - 78.09ms
  • lit-html-kitchen-sink: unsure 🔍 -5% - +9% (-1.67ms - +2.73ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -7% - +4% (-0.80ms - +0.48ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: faster ✔ 1% - 6% (0.43ms - 3.27ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -2% - +5% (-0.77ms - +2.31ms)
    this-change vs tip-of-tree

update

  • lit-element-list: 759.30ms - 768.23ms
  • lit-html-kitchen-sink: unsure 🔍 -2% - +6% (-1.16ms - +4.64ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -0% - +5% (-0.28ms - +13.64ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -3% - +0% (-2.74ms - +0.21ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -1% - +1% (-4.79ms - +5.09ms)
    this-change vs tip-of-tree

update-reflect

  • lit-element-list: 733.18ms - 740.80ms
  • reactive-element-list: unsure 🔍 -1% - +1% (-5.49ms - +4.27ms)
    this-change vs tip-of-tree

Results

lit-element-list

render

VersionAvg timevs
73.27ms - 78.09ms-

update

VersionAvg timevs
759.30ms - 768.23ms-

update-reflect

VersionAvg timevs
733.18ms - 740.80ms-
lit-html-kitchen-sink

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
29.99ms - 33.03ms-unsure 🔍
-5% - +9%
-1.67ms - +2.73ms
slower ❌
1% - 14%
0.33ms - 4.07ms
tip-of-tree
tip-of-tree
29.39ms - 32.56msunsure 🔍
-9% - +5%
-2.73ms - +1.67ms
-unsure 🔍
-1% - +12%
-0.25ms - +3.58ms
previous-release
previous-release
28.23ms - 30.39msfaster ✔
1% - 13%
0.33ms - 4.07ms
unsure 🔍
-11% - +1%
-3.58ms - +0.25ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
72.63ms - 76.00ms-unsure 🔍
-2% - +6%
-1.16ms - +4.64ms
unsure 🔍
-5% - +3%
-3.56ms - +2.60ms
tip-of-tree
tip-of-tree
70.21ms - 74.94msunsure 🔍
-6% - +2%
-4.64ms - +1.16ms
-unsure 🔍
-8% - +2%
-5.72ms - +1.29ms
previous-release
previous-release
72.21ms - 77.38msunsure 🔍
-4% - +5%
-2.60ms - +3.56ms
unsure 🔍
-2% - +8%
-1.29ms - +5.72ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
16.05ms - 16.78ms-unsure 🔍
-8% - +0%
-1.40ms - +0.10ms
unsure 🔍
-4% - +2%
-0.65ms - +0.39ms
tip-of-tree
tip-of-tree
16.41ms - 17.72msunsure 🔍
-1% - +9%
-0.10ms - +1.40ms
-unsure 🔍
-1% - +8%
-0.23ms - +1.28ms
previous-release
previous-release
16.17ms - 16.91msunsure 🔍
-2% - +4%
-0.39ms - +0.65ms
unsure 🔍
-7% - +1%
-1.28ms - +0.23ms
-
lit-html-repeat

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
10.67ms - 11.46ms-unsure 🔍
-7% - +4%
-0.80ms - +0.48ms
unsure 🔍
-7% - +4%
-0.75ms - +0.48ms
tip-of-tree
tip-of-tree
10.72ms - 11.73msunsure 🔍
-4% - +7%
-0.48ms - +0.80ms
-unsure 🔍
-6% - +6%
-0.66ms - +0.71ms
previous-release
previous-release
10.73ms - 11.67msunsure 🔍
-4% - +7%
-0.48ms - +0.75ms
unsure 🔍
-6% - +6%
-0.71ms - +0.66ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
276.18ms - 288.80ms-unsure 🔍
-0% - +5%
-0.28ms - +13.64ms
unsure 🔍
-1% - +4%
-3.94ms - +10.93ms
tip-of-tree
tip-of-tree
272.87ms - 278.74msunsure 🔍
-5% - +0%
-13.64ms - +0.28ms
-unsure 🔍
-3% - +1%
-8.10ms - +1.72ms
previous-release
previous-release
275.06ms - 282.93msunsure 🔍
-4% - +1%
-10.93ms - +3.94ms
unsure 🔍
-1% - +3%
-1.72ms - +8.10ms
-
lit-html-template-heavy

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
53.26ms - 55.12ms-faster ✔
1% - 6%
0.43ms - 3.27ms
unsure 🔍
-3% - +2%
-1.61ms - +1.04ms
tip-of-tree
tip-of-tree
54.96ms - 57.11msslower ❌
1% - 6%
0.43ms - 3.27ms
-slower ❌
0% - 6%
0.13ms - 2.99ms
previous-release
previous-release
53.53ms - 55.42msunsure 🔍
-2% - +3%
-1.04ms - +1.61ms
faster ✔
0% - 5%
0.13ms - 2.99ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
105.50ms - 107.20ms-unsure 🔍
-3% - +0%
-2.74ms - +0.21ms
unsure 🔍
-2% - +1%
-1.94ms - +0.83ms
tip-of-tree
tip-of-tree
106.41ms - 108.82msunsure 🔍
-0% - +3%
-0.21ms - +2.74ms
-unsure 🔍
-1% - +2%
-0.92ms - +2.34ms
previous-release
previous-release
105.81ms - 108.00msunsure 🔍
-1% - +2%
-0.83ms - +1.94ms
unsure 🔍
-2% - +1%
-2.34ms - +0.92ms
-
reactive-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
50.21ms - 52.71ms-unsure 🔍
-2% - +5%
-0.77ms - +2.31ms
unsure 🔍
-3% - +3%
-1.59ms - +1.65ms
tip-of-tree
tip-of-tree
49.78ms - 51.60msunsure 🔍
-4% - +1%
-2.31ms - +0.77ms
-unsure 🔍
-4% - +1%
-2.12ms - +0.64ms
previous-release
previous-release
50.39ms - 52.47msunsure 🔍
-3% - +3%
-1.65ms - +1.59ms
unsure 🔍
-1% - +4%
-0.64ms - +2.12ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
771.84ms - 778.57ms-unsure 🔍
-1% - +1%
-4.79ms - +5.09ms
unsure 🔍
-0% - +1%
-3.26ms - +5.85ms
tip-of-tree
tip-of-tree
771.43ms - 778.68msunsure 🔍
-1% - +1%
-5.09ms - +4.79ms
-unsure 🔍
-0% - +1%
-3.60ms - +5.90ms
previous-release
previous-release
770.83ms - 776.98msunsure 🔍
-1% - +0%
-5.85ms - +3.26ms
unsure 🔍
-1% - +0%
-5.90ms - +3.60ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
762.74ms - 768.84ms-unsure 🔍
-1% - +1%
-5.49ms - +4.27ms
unsure 🔍
-1% - +0%
-5.50ms - +3.46ms
tip-of-tree
tip-of-tree
762.58ms - 770.21msunsure 🔍
-1% - +1%
-4.27ms - +5.49ms
-unsure 🔍
-1% - +1%
-5.44ms - +4.62ms
previous-release
previous-release
763.53ms - 770.09msunsure 🔍
-0% - +1%
-3.46ms - +5.50ms
unsure 🔍
-1% - +1%
-4.62ms - +5.44ms
-

tachometer-reporter-action v2 for Benchmarks

Copy link
Member

@kevinpschaaf kevinpschaaf left a comment

Choose a reason for hiding this comment

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

Lgtm

@sorvell sorvell merged commit 9a4a178 into main Apr 24, 2023
6 of 7 checks passed
@sorvell sorvell deleted the context-root-nested branch April 24, 2023 16:02
@lit-robot lit-robot mentioned this pull request Apr 25, 2023
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.

[labs/context] ContextRoot fails for consumers in nested shadowRoots
3 participants