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: Wrap hydration debug message node types in quotes #4609

Merged
merged 1 commit into from
Dec 15, 2024

Conversation

rschristian
Copy link
Member

Re: #4065 (comment)

Expected a DOM node of type color-mixer but found as available DOM-node(s)

This is a pretty rough error message to decipher, some wrapping quotes should help.


Doing away with empty text nodes by default (as mentioned on slack) would certainly help too, but I do think the quotes are always useful for determining exactly what is being referred to. For example, if an <a> is replaced by a <p>:

Expected a DOM node of type p but found a as available DOM-node(s)

My first instinct would be a word is missing there, not that it's referring to an anchor tag, personally.

Expected a DOM node of type "p" but found "a" as available DOM-node(s)

Much better, IMO

@rschristian rschristian changed the title fix: Wrap hydration debug message vars in quotes fix: Wrap hydration debug message node types in quotes Dec 15, 2024
Copy link

github-actions bot commented Dec 15, 2024

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -0% - +0% (-3.60ms - +3.90ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +1% (-0.06ms - +0.15ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -1% - +2% (-0.50ms - +1.33ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -1% - +2% (-0.15ms - +0.42ms)
    preact-local vs preact-main
  • replace1k: faster ✔ 1% - 3% (0.38ms - 1.83ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -4% - +4% (-0.08ms - +0.08ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +1% (-0.18ms - +0.42ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -3% - +4% (-0.77ms - +1.16ms)
    preact-local vs preact-main

usedJSHeapSize

  • create10k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +2% (-0.01ms - +0.03ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -3% - +3% (-0.27ms - +0.35ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.01ms - +0.01ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +0% (-0.02ms - +0.01ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    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

create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local926.95ms - 932.86ms-unsure 🔍
-0% - +0%
-3.60ms - +3.90ms
preact-main927.45ms - 932.06msunsure 🔍
-0% - +0%
-3.90ms - +3.60ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local19.20ms - 19.21ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main19.20ms - 19.21msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.55ms - 16.75ms-unsure 🔍
-0% - +1%
-0.06ms - +0.15ms
preact-main16.56ms - 16.64msunsure 🔍
-1% - +0%
-0.15ms - +0.06ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.53ms - 1.55ms-unsure 🔍
-1% - +2%
-0.01ms - +0.03ms
preact-main1.52ms - 1.54msunsure 🔍
-2% - +1%
-0.03ms - +0.01ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local68.69ms - 70.13ms-unsure 🔍
-1% - +2%
-0.50ms - +1.33ms
preact-main68.42ms - 69.56msunsure 🔍
-2% - +1%
-1.33ms - +0.50ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local9.98ms - 10.50ms-unsure 🔍
-3% - +3%
-0.27ms - +0.35ms
preact-main10.03ms - 10.37msunsure 🔍
-3% - +3%
-0.35ms - +0.27ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.96ms - 17.40ms-unsure 🔍
-1% - +2%
-0.15ms - +0.42ms
preact-main16.85ms - 17.23msunsure 🔍
-2% - +1%
-0.42ms - +0.15ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.76ms - 3.77ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
preact-main3.75ms - 3.77msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-
replace1k
  • Browser: chrome-headless
  • Sample size: 100
  • Built by: CI #4205
  • Commit: 19fd98c

duration

VersionAvg timevs preact-localvs preact-main
preact-local67.60ms - 68.18ms-faster ✔
1% - 3%
0.38ms - 1.83ms
preact-main68.33ms - 69.66msslower ❌
1% - 3%
0.38ms - 1.83ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.96ms - 2.98ms-unsure 🔍
-1% - +0%
-0.02ms - +0.01ms
preact-main2.97ms - 2.99msunsure 🔍
-0% - +1%
-0.01ms - +0.02ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local30.08ms - 30.81ms-unsure 🔍
-2% - +1%
-0.46ms - +0.43ms
preact-main30.20ms - 30.72msunsure 🔍
-1% - +2%
-0.43ms - +0.46ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local35.06ms - 36.20ms-unsure 🔍
-2% - +3%
-0.80ms - +0.98ms
preact-main34.86ms - 36.23msunsure 🔍
-3% - +2%
-0.98ms - +0.80ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local26.03ms - 26.33ms-unsure 🔍
-1% - +1%
-0.20ms - +0.25ms
preact-main25.98ms - 26.33msunsure 🔍
-1% - +1%
-0.25ms - +0.20ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local26.13ms - 27.45ms-unsure 🔍
-5% - +1%
-1.41ms - +0.40ms
preact-main26.68ms - 27.91msunsure 🔍
-2% - +5%
-0.40ms - +1.41ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local24.24ms - 25.63ms-unsure 🔍
-3% - +5%
-0.65ms - +1.16ms
preact-main24.10ms - 25.26msunsure 🔍
-5% - +3%
-1.16ms - +0.65ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local22.12ms - 22.52ms-unsure 🔍
-3% - +0%
-0.69ms - +0.02ms
preact-main22.36ms - 22.95msunsure 🔍
-0% - +3%
-0.02ms - +0.69ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 130
  • Built by: CI #4205
  • Commit: 19fd98c

duration

VersionAvg timevs preact-localvs preact-main
preact-local1.94ms - 2.06ms-unsure 🔍
-4% - +4%
-0.08ms - +0.08ms
preact-main1.95ms - 2.06msunsure 🔍
-4% - +4%
-0.08ms - +0.08ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local34.08ms - 34.49ms-unsure 🔍
-1% - +1%
-0.18ms - +0.42ms
preact-main33.94ms - 34.38msunsure 🔍
-1% - +1%
-0.42ms - +0.18ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.22ms - 1.23ms-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-local30.38ms - 31.78ms-unsure 🔍
-3% - +4%
-0.77ms - +1.16ms
preact-main30.22ms - 31.54msunsure 🔍
-4% - +2%
-1.16ms - +0.77ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.91ms - 2.93ms-unsure 🔍
-0% - +1%
-0.00ms - +0.02ms
preact-main2.91ms - 2.92msunsure 🔍
-1% - +0%
-0.02ms - +0.00ms
-

tachometer-reporter-action v2 for CI

Copy link

Size Change: +28 B (+0.04%)

Total Size: 62.3 kB

Filename Size Change
debug/dist/debug.js 3.83 kB +10 B (+0.26%)
debug/dist/debug.module.js 3.83 kB +9 B (+0.24%)
debug/dist/debug.umd.js 3.91 kB +9 B (+0.23%)
ℹ️ 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
devtools/dist/devtools.js 260 B
devtools/dist/devtools.module.js 274 B
devtools/dist/devtools.umd.js 346 B
dist/preact.js 4.7 kB
dist/preact.min.js 4.72 kB
dist/preact.min.module.js 4.72 kB
dist/preact.min.umd.js 4.74 kB
dist/preact.module.js 4.72 kB
dist/preact.umd.js 4.76 kB
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

Coverage Status

coverage: 99.615%. remained the same
when pulling 19fd98c on fix/hydration-mismatch-warning-clarity
into 2b82799 on main.

@rschristian rschristian merged commit bb68456 into main Dec 15, 2024
15 checks passed
@rschristian rschristian deleted the fix/hydration-mismatch-warning-clarity branch December 15, 2024 19:34
@JoviDeCroock JoviDeCroock mentioned this pull request Dec 18, 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.

3 participants