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

[ts] Use CSSStyleDeclaration for CSS property list #2869

Merged
merged 9 commits into from
Dec 21, 2020
Merged

Conversation

developit
Copy link
Member

This removes the validation we added in 10.5.6, since it's unfortunately not yet possible to allow known CSS properties and wildcard --.* custom properties (see attempt: https://gist.github.com/developit/3a29186588634648e45e8afb199626df).

Fixes #2862.

This removes the validation we added in 10.5.6, since it's unfortunately not yet possible to allow known CSS properties and wildcard `--.*` custom properties (see attempt: https://gist.github.com/developit/3a29186588634648e45e8afb199626df).
@github-actions
Copy link

github-actions bot commented Dec 16, 2020

📊 Tachometer Benchmark Results

Summary

duration

  • 02_replace1k: unsure 🔍 -3% - +0% (-4.14ms - +0.27ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: unsure 🔍 -4% - +4% (-1.32ms - +1.33ms)
    preact-local vs preact-master
  • 07_create10k: unsure 🔍 -7% - +6% (-140.85ms - +123.14ms)
    preact-local vs preact-master
  • filter_list: unsure 🔍 -3% - +2% (-0.71ms - +0.59ms)
    preact-local vs preact-master
  • hydrate1k: unsure 🔍 -3% - +2% (-3.44ms - +3.06ms)
    preact-local vs preact-master
  • many_updates: unsure 🔍 -0% - +15% (-0.08ms - +5.10ms)
    preact-local vs preact-master
  • text_update: unsure 🔍 -5% - +3% (-0.17ms - +0.12ms)
    preact-local vs preact-master

usedJSHeapSize

  • 02_replace1k: unsure 🔍 -0% - +0% (-0.01ms - +0.01ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: unsure 🔍 -0% - +0% (-0.01ms - +0.01ms)
    preact-local vs preact-master
  • 07_create10k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-master
  • filter_list: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-master
  • hydrate1k: unsure 🔍 -0% - +0% (-0.02ms - +0.00ms)
    preact-local vs preact-master
  • many_updates: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-master
  • text_update: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-master

Results

02_replace1k
  • Browser: chrome-headless 87.0.4280.88
  • Sample size: 80
  • Built by: CI #587
  • Commit: 5379194

duration

VersionAvg timevs preact-mastervs preact-local
preact-master145.22ms - 148.11ms-unsure 🔍
-0% - +3%
-0.27ms - +4.14ms
preact-local143.07ms - 146.39msunsure 🔍
-3% - +0%
-4.14ms - +0.27ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master3.60ms - 3.61ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
preact-local3.60ms - 3.61msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-

run-warmup-0

VersionAvg timevs preact-mastervs preact-local
preact-master54.56ms - 55.69ms-unsure 🔍
-1% - +1%
-0.77ms - +0.71ms
preact-local54.68ms - 55.64msunsure 🔍
-1% - +1%
-0.71ms - +0.77ms
-

run-warmup-1

VersionAvg timevs preact-mastervs preact-local
preact-master86.17ms - 87.44ms-unsure 🔍
-1% - +1%
-0.87ms - +0.97ms
preact-local86.08ms - 87.42msunsure 🔍
-1% - +1%
-0.97ms - +0.87ms
-

run-warmup-2

VersionAvg timevs preact-mastervs preact-local
preact-master97.14ms - 100.40ms-unsure 🔍
-2% - +2%
-2.13ms - +2.17ms
preact-local97.34ms - 100.15msunsure 🔍
-2% - +2%
-2.17ms - +2.13ms
-

run-warmup-3

VersionAvg timevs preact-mastervs preact-local
preact-master53.46ms - 55.58ms-unsure 🔍
-2% - +4%
-0.85ms - +1.90ms
preact-local53.12ms - 54.86msunsure 🔍
-3% - +2%
-1.90ms - +0.85ms
-

run-warmup-4

VersionAvg timevs preact-mastervs preact-local
preact-master95.69ms - 101.56ms-unsure 🔍
-7% - +0%
-7.68ms - +0.48ms
preact-local99.39ms - 105.07msunsure 🔍
-1% - +8%
-0.48ms - +7.68ms
-

run-final

VersionAvg timevs preact-mastervs preact-local
preact-master53.92ms - 55.17ms-unsure 🔍
-0% - +3%
-0.08ms - +1.64ms
preact-local53.18ms - 54.36msunsure 🔍
-3% - +0%
-1.64ms - +0.08ms
-
03_update10th1k_x16
  • Browser: chrome-headless 87.0.4280.88
  • Sample size: 70
  • Built by: CI #587
  • Commit: 5379194

duration

VersionAvg timevs preact-mastervs preact-local
preact-master28.82ms - 30.72ms-unsure 🔍
-4% - +4%
-1.33ms - +1.32ms
preact-local28.85ms - 30.70msunsure 🔍
-4% - +4%
-1.32ms - +1.33ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master3.52ms - 3.53ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
preact-local3.52ms - 3.53msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-
07_create10k
  • Browser: chrome-headless 87.0.4280.88
  • Sample size: 70
  • Built by: CI #587
  • Commit: 5379194

duration

VersionAvg timevs preact-mastervs preact-local
preact-master2018.31ms - 2218.65ms-unsure 🔍
-6% - +7%
-123.14ms - +140.85ms
preact-local2023.67ms - 2195.59msunsure 🔍
-7% - +6%
-140.85ms - +123.14ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master25.99ms - 25.99ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local25.99ms - 25.99msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
filter_list
  • Browser: chrome-headless 87.0.4280.88
  • Sample size: 50
  • Built by: CI #587
  • Commit: 5379194

duration

VersionAvg timevs preact-mastervs preact-local
preact-master27.47ms - 28.34ms-unsure 🔍
-2% - +3%
-0.59ms - +0.71ms
preact-local27.36ms - 28.33msunsure 🔍
-3% - +2%
-0.71ms - +0.59ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master1.60ms - 1.60ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local1.60ms - 1.60msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
hydrate1k
  • Browser: chrome-headless 87.0.4280.88
  • Sample size: 50
  • Built by: CI #587
  • Commit: 5379194

duration

VersionAvg timevs preact-mastervs preact-local
preact-master130.55ms - 135.78ms-unsure 🔍
-2% - +3%
-3.06ms - +3.44ms
preact-local131.05ms - 134.90msunsure 🔍
-3% - +2%
-3.44ms - +3.06ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master6.19ms - 6.21ms-unsure 🔍
-0% - +0%
-0.00ms - +0.02ms
preact-local6.19ms - 6.19msunsure 🔍
-0% - +0%
-0.02ms - +0.00ms
-
many_updates
  • Browser: chrome-headless 87.0.4280.88
  • Sample size: 80
  • Built by: CI #587
  • Commit: 5379194

duration

VersionAvg timevs preact-mastervs preact-local
preact-master32.09ms - 35.37ms-unsure 🔍
-14% - -0%
-5.10ms - +0.08ms
preact-local34.24ms - 38.24msunsure 🔍
-0% - +15%
-0.08ms - +5.10ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master4.85ms - 4.85ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local4.85ms - 4.85msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
text_update
  • Browser: chrome-headless 87.0.4280.88
  • Sample size: 50
  • Built by: CI #587
  • Commit: 5379194

duration

VersionAvg timevs preact-mastervs preact-local
preact-master3.58ms - 3.74ms-unsure 🔍
-3% - +5%
-0.12ms - +0.17ms
preact-local3.51ms - 3.76msunsure 🔍
-5% - +3%
-0.17ms - +0.12ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master0.83ms - 0.83ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local0.83ms - 0.83msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-

tachometer-reporter-action v2 for CI

@github-actions
Copy link

github-actions bot commented Dec 16, 2020

Size Change: 0 B

Total Size: 41.5 kB

ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 3.23 kB 0 B
compat/dist/compat.module.js 3.23 kB 0 B
compat/dist/compat.umd.js 3.28 kB 0 B
debug/dist/debug.js 2.99 kB 0 B
debug/dist/debug.module.js 2.98 kB 0 B
debug/dist/debug.umd.js 3.07 kB 0 B
devtools/dist/devtools.js 185 B 0 B
devtools/dist/devtools.module.js 195 B 0 B
devtools/dist/devtools.umd.js 261 B 0 B
dist/preact.js 4.02 kB 0 B
dist/preact.min.js 4.04 kB 0 B
dist/preact.module.js 4.03 kB 0 B
dist/preact.umd.js 4.08 kB 0 B
hooks/dist/hooks.js 1.13 kB 0 B
hooks/dist/hooks.module.js 1.15 kB 0 B
hooks/dist/hooks.umd.js 1.2 kB 0 B
jsx-runtime/dist/jsxRuntime.js 327 B 0 B
jsx-runtime/dist/jsxRuntime.module.js 335 B 0 B
jsx-runtime/dist/jsxRuntime.umd.js 405 B 0 B
test-utils/dist/testUtils.js 437 B 0 B
test-utils/dist/testUtils.module.js 439 B 0 B
test-utils/dist/testUtils.umd.js 515 B 0 B

compressed-size-action

@natemoo-re
Copy link

natemoo-re commented Dec 17, 2020

@developit Wildcard custom properties will be possible when generalized index signatures lands in typescript@4.2.0.

type CSSCustomProperties = {
  [key in `--${string}`]?: string | null | undefined;
}

Here is a TypeScript Playground Link with a working implementation.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 0244869 on ts-use-dom-cssom into 0de465a on master.

Copy link
Member

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

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

Sweet 🙌

@developit developit merged commit e8a4c46 into master Dec 21, 2020
@developit developit deleted the ts-use-dom-cssom branch December 21, 2020 16:59
@octogonz
Copy link

octogonz commented Feb 20, 2022

@developit The csstype dependency probably should have been removed with this PR:

"csstype": "^3.0.5",

It seems to be not used anywhere in this project.

marvinhagemeister added a commit that referenced this pull request Feb 20, 2022
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.

Breaking changes in v10.5.6 - custom css attributes are per type definition not longer allowed
6 participants