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

Revert handle event #4584

Merged
merged 7 commits into from
Nov 29, 2024
Merged

Revert handle event #4584

merged 7 commits into from
Nov 29, 2024

Conversation

JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Nov 29, 2024

Resolves #4581
Reverts #4538

After trying to fix this for a while this looks like it's just incompatible with our current ecosystem and would warrant a breaking change, my sincerest apologies for backtracking on this. I've added a test in the TS tests to avoid this in the future.

There's an inherent incompatibility with using the handleEvent interface as these types are also used by our consumers to type their events and components.

Copy link

github-actions bot commented Nov 29, 2024

📊 Tachometer Benchmark Results

Summary

⏳ Benchmarks are currently running. Results below are out of date.

duration

  • create10k: unsure 🔍 -0% - +0% (-3.25ms - +4.58ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -3% - +1% (-0.51ms - +0.25ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -1% - +1% (-0.54ms - +1.04ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -2% - +5% (-0.27ms - +0.77ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +1% (-0.59ms - +0.97ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -6% - +2% (-0.15ms - +0.05ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -3% - +3% (-0.96ms - +0.93ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -2% - +3% (-0.68ms - +0.98ms)
    preact-local vs preact-main

usedJSHeapSize

  • create10k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -2% - +0% (-0.03ms - +0.00ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -6% - +0% (-0.90ms - +0.07ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.01ms - +0.00ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +0% (-0.04ms - +0.01ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -0% - +1% (-0.00ms - +0.01ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -0% - +1% (-0.00ms - +0.02ms)
    preact-local vs preact-main

Results

⏳ Benchmarks are currently running. Results below are out of date.
create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local925.72ms - 930.95ms-unsure 🔍
-0% - +0%
-3.25ms - +4.58ms
preact-main924.76ms - 930.58msunsure 🔍
-0% - +0%
-4.58ms - +3.25ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local24.84ms - 24.84ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main24.84ms - 24.84msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.50ms - 16.76ms-unsure 🔍
-3% - +1%
-0.51ms - +0.25ms
preact-main16.41ms - 17.12msunsure 🔍
-1% - +3%
-0.25ms - +0.51ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.64ms - 1.66ms-unsure 🔍
-2% - +0%
-0.03ms - +0.00ms
preact-main1.65ms - 1.68msunsure 🔍
-0% - +2%
-0.00ms - +0.03ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local72.37ms - 73.65ms-unsure 🔍
-1% - +1%
-0.54ms - +1.04ms
preact-main72.30ms - 73.22msunsure 🔍
-1% - +1%
-1.04ms - +0.54ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local13.48ms - 14.12ms-unsure 🔍
-6% - +0%
-0.90ms - +0.07ms
preact-main13.85ms - 14.58msunsure 🔍
-1% - +7%
-0.07ms - +0.90ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.15ms - 16.90ms-unsure 🔍
-2% - +5%
-0.27ms - +0.77ms
preact-main15.92ms - 16.63msunsure 🔍
-5% - +2%
-0.77ms - +0.27ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local4.49ms - 4.50ms-unsure 🔍
-0% - +0%
-0.01ms - +0.00ms
preact-main4.49ms - 4.51msunsure 🔍
-0% - +0%
-0.00ms - +0.01ms
-
replace1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local68.13ms - 69.22ms-unsure 🔍
-1% - +1%
-0.59ms - +0.97ms
preact-main67.93ms - 69.05msunsure 🔍
-1% - +1%
-0.97ms - +0.59ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.56ms - 3.59ms-unsure 🔍
-1% - +0%
-0.04ms - +0.01ms
preact-main3.57ms - 3.61msunsure 🔍
-0% - +1%
-0.01ms - +0.04ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local30.68ms - 31.53ms-unsure 🔍
-3% - +1%
-0.92ms - +0.23ms
preact-main31.06ms - 31.84msunsure 🔍
-1% - +3%
-0.23ms - +0.92ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local36.28ms - 37.83ms-unsure 🔍
-4% - +2%
-1.41ms - +0.84ms
preact-main36.53ms - 38.15msunsure 🔍
-2% - +4%
-0.84ms - +1.41ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local30.62ms - 31.66ms-unsure 🔍
-2% - +2%
-0.73ms - +0.71ms
preact-main30.65ms - 31.65msunsure 🔍
-2% - +2%
-0.71ms - +0.73ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local23.17ms - 23.69ms-unsure 🔍
-3% - +1%
-0.68ms - +0.17ms
preact-main23.34ms - 24.02msunsure 🔍
-1% - +3%
-0.17ms - +0.68ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local21.97ms - 22.25ms-unsure 🔍
-1% - +1%
-0.22ms - +0.17ms
preact-main21.99ms - 22.27msunsure 🔍
-1% - +1%
-0.17ms - +0.22ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local20.71ms - 21.42ms-unsure 🔍
-2% - +2%
-0.45ms - +0.50ms
preact-main20.71ms - 21.36msunsure 🔍
-2% - +2%
-0.50ms - +0.45ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 220
  • Built by: CI #4120
  • Commit: 8d06f28

duration

VersionAvg timevs preact-localvs preact-main
preact-local2.14ms - 2.27ms-unsure 🔍
-6% - +2%
-0.15ms - +0.05ms
preact-main2.17ms - 2.32msunsure 🔍
-2% - +7%
-0.05ms - +0.15ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.10ms - 1.11ms-unsure 🔍
-0% - +1%
-0.00ms - +0.01ms
preact-main1.10ms - 1.11msunsure 🔍
-1% - +0%
-0.01ms - +0.00ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local34.43ms - 35.86ms-unsure 🔍
-3% - +3%
-0.96ms - +0.93ms
preact-main34.54ms - 35.78msunsure 🔍
-3% - +3%
-0.93ms - +0.96ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.22ms - 1.22ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.22ms - 1.22msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
update10th1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local33.37ms - 34.50ms-unsure 🔍
-2% - +3%
-0.68ms - +0.98ms
preact-main33.17ms - 34.39msunsure 🔍
-3% - +2%
-0.98ms - +0.68ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.47ms - 3.50ms-unsure 🔍
-0% - +1%
-0.00ms - +0.02ms
preact-main3.47ms - 3.48msunsure 🔍
-1% - +0%
-0.02ms - +0.00ms
-

tachometer-reporter-action v2 for CI

Copy link

github-actions bot commented Nov 29, 2024

Size Change: -89 B (-0.14%)

Total Size: 62.5 kB

Filename Size Change
dist/preact.js 4.73 kB -14 B (-0.3%)
dist/preact.min.js 4.75 kB -15 B (-0.31%)
dist/preact.min.module.js 4.75 kB -18 B (-0.38%)
dist/preact.min.umd.js 4.77 kB -15 B (-0.31%)
dist/preact.module.js 4.75 kB -14 B (-0.29%)
dist/preact.umd.js 4.79 kB -13 B (-0.27%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 4.13 kB
compat/dist/compat.module.js 4.06 kB
compat/dist/compat.umd.js 4.2 kB
debug/dist/debug.js 3.82 kB
debug/dist/debug.module.js 3.83 kB
debug/dist/debug.umd.js 3.9 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.module.js 274 B
devtools/dist/devtools.umd.js 346 B
hooks/dist/hooks.js 1.52 kB
hooks/dist/hooks.module.js 1.56 kB
hooks/dist/hooks.umd.js 1.6 kB
jsx-runtime/dist/jsxRuntime.js 973 B
jsx-runtime/dist/jsxRuntime.module.js 947 B
jsx-runtime/dist/jsxRuntime.umd.js 1.05 kB
test-utils/dist/testUtils.js 451 B
test-utils/dist/testUtils.module.js 456 B
test-utils/dist/testUtils.umd.js 536 B

compressed-size-action

@coveralls
Copy link

coveralls commented Nov 29, 2024

Coverage Status

coverage: 99.617%. remained the same
when pulling d4d4363 on revert-handle-event
into 99e5e04 on main.

Copy link
Contributor

@lilnasy lilnasy left a comment

Choose a reason for hiding this comment

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

Ah that's unfortunate, but I think it's for the best, and it isn't too late.

rschristian is working on prop and attr directives. This could be reintroduced with a directive as well. As a bonus, that will be visually consistent with solid, and unlock #428.

test/ts/preact.tsx Outdated Show resolved Hide resolved
@JoviDeCroock JoviDeCroock merged commit b9ff1b7 into main Nov 29, 2024
13 checks passed
@JoviDeCroock JoviDeCroock deleted the revert-handle-event branch November 29, 2024 20:29
@JoviDeCroock JoviDeCroock mentioned this pull request Dec 1, 2024
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.

types: EventHandler returning (seemingly) incorrect type
4 participants