Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

debug: Provide error for illegal nesting of <button> and <a> #4376

Merged
merged 4 commits into from
May 9, 2024

Conversation

rschristian
Copy link
Member

Technically any Interactive Content is disallowed from being a child of <a> & <button>, but self nesting (<a> within <a>, <button> within <button>) seems to be the only case that actually results in a parser mismatch, hence this limited implementation.

Copy link

github-actions bot commented May 9, 2024

📊 Tachometer Benchmark Results

Summary

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

duration

  • create10k: unsure 🔍 -2% - +1% (-14.42ms - +11.44ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +0% (-0.10ms - +0.07ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -1% - +3% (-1.03ms - +1.91ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -2% - +4% (-0.26ms - +0.70ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -2% - +2% (-1.43ms - +1.10ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -5% - +3% (-0.09ms - +0.05ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -2% - +1% (-0.63ms - +0.16ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -1% - +1% (-0.15ms - +0.25ms)
    preact-local vs preact-main

usedJSHeapSize

  • create10k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +3% (-0.34ms - +0.45ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • replace1k: faster ✔ 0% - 1% (0.01ms - 0.05ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -4% - +2% (-0.04ms - +0.02ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    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-local890.40ms - 906.47ms-unsure 🔍
-2% - +1%
-14.42ms - +11.44ms
preact-main889.80ms - 910.06msunsure 🔍
-1% - +2%
-11.44ms - +14.42ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local26.75ms - 26.75ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main26.75ms - 26.75msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.62ms - 16.72ms-unsure 🔍
-1% - +0%
-0.10ms - +0.07ms
preact-main16.62ms - 16.75msunsure 🔍
-0% - +1%
-0.07ms - +0.10ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.75ms - 1.75ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.75ms - 1.75msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local75.93ms - 78.20ms-unsure 🔍
-1% - +3%
-1.03ms - +1.91ms
preact-main75.69ms - 77.56msunsure 🔍
-2% - +1%
-1.91ms - +1.03ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local14.10ms - 14.71ms-unsure 🔍
-2% - +3%
-0.34ms - +0.45ms
preact-main14.10ms - 14.60msunsure 🔍
-3% - +2%
-0.45ms - +0.34ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.48ms - 17.29ms-unsure 🔍
-2% - +4%
-0.26ms - +0.70ms
preact-main16.40ms - 16.92msunsure 🔍
-4% - +2%
-0.70ms - +0.26ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local4.86ms - 4.86ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main4.86ms - 4.86msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
replace1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local68.52ms - 70.26ms-unsure 🔍
-2% - +2%
-1.43ms - +1.10ms
preact-main68.63ms - 70.48msunsure 🔍
-2% - +2%
-1.10ms - +1.43ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.65ms - 3.68ms-faster ✔
0% - 1%
0.01ms - 0.05ms
preact-main3.67ms - 3.71msslower ❌
0% - 1%
0.01ms - 0.05ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local28.74ms - 29.29ms-unsure 🔍
-2% - +1%
-0.56ms - +0.30ms
preact-main28.82ms - 29.47msunsure 🔍
-1% - +2%
-0.30ms - +0.56ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local35.49ms - 37.35ms-unsure 🔍
-3% - +4%
-1.19ms - +1.60ms
preact-main35.17ms - 37.26msunsure 🔍
-4% - +3%
-1.60ms - +1.19ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local25.62ms - 25.97ms-unsure 🔍
-1% - +1%
-0.30ms - +0.17ms
preact-main25.70ms - 26.02msunsure 🔍
-1% - +1%
-0.17ms - +0.30ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local24.47ms - 25.35ms-unsure 🔍
-0% - +5%
-0.10ms - +1.10ms
preact-main24.00ms - 24.82msunsure 🔍
-4% - +0%
-1.10ms - +0.10ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local29.12ms - 30.77ms-unsure 🔍
-2% - +6%
-0.53ms - +1.79ms
preact-main28.50ms - 30.13msunsure 🔍
-6% - +2%
-1.79ms - +0.53ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local23.82ms - 24.91ms-unsure 🔍
-2% - +4%
-0.59ms - +1.05ms
preact-main23.52ms - 24.75msunsure 🔍
-4% - +2%
-1.05ms - +0.59ms
-
text-update

duration

VersionAvg timevs preact-localvs preact-main
preact-local1.75ms - 1.84ms-unsure 🔍
-5% - +3%
-0.09ms - +0.05ms
preact-main1.76ms - 1.87msunsure 🔍
-3% - +5%
-0.05ms - +0.09ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local0.99ms - 1.03ms-unsure 🔍
-4% - +2%
-0.04ms - +0.02ms
preact-main1.00ms - 1.04msunsure 🔍
-2% - +4%
-0.02ms - +0.04ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local27.66ms - 27.89ms-unsure 🔍
-2% - +1%
-0.63ms - +0.16ms
preact-main27.63ms - 28.38msunsure 🔍
-1% - +2%
-0.16ms - +0.63ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local29.18ms - 29.46ms-unsure 🔍
-1% - +1%
-0.15ms - +0.25ms
preact-main29.12ms - 29.41msunsure 🔍
-1% - +1%
-0.25ms - +0.15ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.70ms - 3.70ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main3.70ms - 3.70msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-

tachometer-reporter-action v2 for Benchmarks

Copy link

github-actions bot commented May 9, 2024

Size Change: +223 B (0%)

Total Size: 61.4 kB

Filename Size Change
debug/dist/debug.js 3.7 kB +72 B (+2%)
debug/dist/debug.module.js 3.69 kB +76 B (+2%)
debug/dist/debug.umd.js 3.78 kB +75 B (+2%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 4.09 kB
compat/dist/compat.module.js 4.01 kB
compat/dist/compat.umd.js 4.14 kB
devtools/dist/devtools.js 231 B
devtools/dist/devtools.module.js 240 B
devtools/dist/devtools.umd.js 314 B
dist/preact.js 4.63 kB
dist/preact.min.js 4.67 kB
dist/preact.min.module.js 4.66 kB
dist/preact.min.umd.js 4.69 kB
dist/preact.module.js 4.65 kB
dist/preact.umd.js 4.71 kB
hooks/dist/hooks.js 1.55 kB
hooks/dist/hooks.module.js 1.59 kB
hooks/dist/hooks.umd.js 1.63 kB
jsx-runtime/dist/jsxRuntime.js 976 B
jsx-runtime/dist/jsxRuntime.module.js 949 B
jsx-runtime/dist/jsxRuntime.umd.js 1.06 kB
test-utils/dist/testUtils.js 453 B
test-utils/dist/testUtils.module.js 454 B
test-utils/dist/testUtils.umd.js 536 B

compressed-size-action

@coveralls
Copy link

Coverage Status

coverage: 99.61% (+0.001%) from 99.609%
when pulling 8a45c30 on debug/button-anchor-nesting
into 414c870 on main.

@coveralls
Copy link

coveralls commented May 9, 2024

Coverage Status

coverage: 99.609% (+0.001%) from 99.608%
when pulling 06a2df1 on debug/button-anchor-nesting
into c29caa3 on main.

@rschristian rschristian changed the title feat: Provide error log for nesting of <button> and <a> debug: Provide error for illegal nesting of <button> and <a> May 9, 2024
@rschristian rschristian merged commit bfdd189 into main May 9, 2024
12 checks passed
@rschristian rschristian deleted the debug/button-anchor-nesting branch May 9, 2024 20:21
@JoviDeCroock JoviDeCroock mentioned this pull request May 15, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants