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

feat: CSS only modules #1211

Merged
merged 5 commits into from
May 10, 2019
Merged

feat: CSS only modules #1211

merged 5 commits into from
May 10, 2019

Conversation

diervo
Copy link
Contributor

@diervo diervo commented May 7, 2019

Details

This PRs allow to define CSS only modules.

import "foo/bar"

@salesforce-best-lwc-internal
Copy link

Benchmark results

Base commit: 6d2de54 | Target commit: e743648

lwc-engine-benchmark

table-append-1k metric base(6d2de54) target(e743648) trend
benchmark-table/append/1k duration 150.60 (±4.05 ms) 150.70 (±3.00 ms) +0.1ms (0.1%) 👌
table-clear-1k metric base(6d2de54) target(e743648) trend
benchmark-table/clear/1k duration 11.50 (±0.60 ms) 11.40 (±0.95 ms) -0.1ms (0.9%) 👌
table-create-10k metric base(6d2de54) target(e743648) trend
benchmark-table/create/10k duration 909.50 (±6.85 ms) 897.85 (±6.90 ms) -11.7ms (1.3%) 👍
table-create-1k metric base(6d2de54) target(e743648) trend
benchmark-table/create/1k duration 119.95 (±2.45 ms) 119.30 (±3.25 ms) -0.6ms (0.5%) 👌
table-update-10th-1k metric base(6d2de54) target(e743648) trend
benchmark-table/update-10th/1k duration 70.00 (±2.15 ms) 69.55 (±2.00 ms) -0.5ms (0.6%) 👌
tablecmp-append-1k metric base(6d2de54) target(e743648) trend
benchmark-table-component/append/1k duration 225.20 (±12.55 ms) 226.55 (±8.25 ms) +1.4ms (0.6%) 👌
tablecmp-clear-1k metric base(6d2de54) target(e743648) trend
benchmark-table-component/clear/1k duration 7.50 (±1.35 ms) 7.15 (±1.25 ms) -0.3ms (4.7%) 👌
tablecmp-create-10k metric base(6d2de54) target(e743648) trend
benchmark-table-component/create/10k duration 1740.25 (±14.05 ms) 1744.95 (±15.65 ms) +4.7ms (0.3%) 👌
tablecmp-create-1k metric base(6d2de54) target(e743648) trend
benchmark-table-component/create/1k duration 213.85 (±5.25 ms) 211.45 (±4.80 ms) -2.4ms (1.1%) 👌
tablecmp-update-10th-1k metric base(6d2de54) target(e743648) trend
benchmark-table-component/update-10th/1k duration 66.80 (±4.35 ms) 64.40 (±4.10 ms) -2.4ms (3.6%) 👌
wc-append-1k metric base(6d2de54) target(e743648) trend
benchmark-table-wc/append/1k duration 233.05 (±15.20 ms) 226.75 (±19.40 ms) -6.3ms (2.7%) 👌
wc-clear-1k metric base(6d2de54) target(e743648) trend
benchmark-table-wc/clear/1k duration 12.20 (±1.95 ms) 12.80 (±1.70 ms) +0.6ms (4.9%) 👌
wc-create-10k metric base(6d2de54) target(e743648) trend
benchmark-table-wc/create/10k duration 1883.25 (±23.30 ms) 1898.90 (±14.75 ms) +15.7ms (0.8%) 👎
wc-create-1k metric base(6d2de54) target(e743648) trend
benchmark-table-wc/create/1k duration 218.50 (±4.30 ms) 220.20 (±6.00 ms) +1.7ms (0.8%) 👌
wc-update-10th-1k metric base(6d2de54) target(e743648) trend
benchmark-table-wc/update-10th/1k duration 67.75 (±4.75 ms) 66.15 (±4.50 ms) -1.6ms (2.4%) 👌

@salesforce-best-lwc-internal
Copy link

Benchmark results

Base commit: 6d2de54 | Target commit: 88fccd5

lwc-engine-benchmark

table-append-1k metric base(6d2de54) target(88fccd5) trend
benchmark-table/append/1k duration 150.60 (±4.05 ms) 152.25 (±3.35 ms) +1.7ms (1.1%) 👌
table-clear-1k metric base(6d2de54) target(88fccd5) trend
benchmark-table/clear/1k duration 11.50 (±0.60 ms) 11.70 (±0.80 ms) +0.2ms (1.7%) 👌
table-create-10k metric base(6d2de54) target(88fccd5) trend
benchmark-table/create/10k duration 909.50 (±6.85 ms) 891.20 (±6.25 ms) -18.3ms (2.0%) 👍
table-create-1k metric base(6d2de54) target(88fccd5) trend
benchmark-table/create/1k duration 119.95 (±2.45 ms) 120.70 (±2.70 ms) +0.8ms (0.6%) 👌
table-update-10th-1k metric base(6d2de54) target(88fccd5) trend
benchmark-table/update-10th/1k duration 70.00 (±2.15 ms) 69.65 (±2.05 ms) -0.3ms (0.5%) 👌
tablecmp-append-1k metric base(6d2de54) target(88fccd5) trend
benchmark-table-component/append/1k duration 225.20 (±12.55 ms) 226.60 (±9.90 ms) +1.4ms (0.6%) 👌
tablecmp-clear-1k metric base(6d2de54) target(88fccd5) trend
benchmark-table-component/clear/1k duration 7.50 (±1.35 ms) 6.95 (±1.10 ms) -0.5ms (7.3%) 👍
tablecmp-create-10k metric base(6d2de54) target(88fccd5) trend
benchmark-table-component/create/10k duration 1740.25 (±14.05 ms) 1756.00 (±17.75 ms) +15.8ms (0.9%) 👎
tablecmp-create-1k metric base(6d2de54) target(88fccd5) trend
benchmark-table-component/create/1k duration 213.85 (±5.25 ms) 212.60 (±6.55 ms) -1.3ms (0.6%) 👌
tablecmp-update-10th-1k metric base(6d2de54) target(88fccd5) trend
benchmark-table-component/update-10th/1k duration 66.80 (±4.35 ms) 66.40 (±5.15 ms) -0.4ms (0.6%) 👌
wc-append-1k metric base(6d2de54) target(88fccd5) trend
benchmark-table-wc/append/1k duration 233.05 (±15.20 ms) 226.25 (±15.30 ms) -6.8ms (2.9%) 👌
wc-clear-1k metric base(6d2de54) target(88fccd5) trend
benchmark-table-wc/clear/1k duration 12.20 (±1.95 ms) 12.05 (±1.95 ms) -0.1ms (1.2%) 👌
wc-create-10k metric base(6d2de54) target(88fccd5) trend
benchmark-table-wc/create/10k duration 1883.25 (±23.30 ms) 1850.35 (±19.80 ms) -32.9ms (1.7%) 👍
wc-create-1k metric base(6d2de54) target(88fccd5) trend
benchmark-table-wc/create/1k duration 218.50 (±4.30 ms) 216.80 (±5.55 ms) -1.7ms (0.8%) 👌
wc-update-10th-1k metric base(6d2de54) target(88fccd5) trend
benchmark-table-wc/update-10th/1k duration 67.75 (±4.75 ms) 67.60 (±5.20 ms) -0.2ms (0.2%) 👌

@@ -14,7 +14,7 @@ const EMPTY_IMPLICIT_CSS_CONTENT = '';
const EMPTY_IMPLICIT_HTML_CONTENT = 'export default void 0';
const IMPLICIT_DEFAULT_HTML_PATH = '@lwc/resources/empty_html.js';
const IMPLICIT_DEFAULT_CSS_PATH = '@lwc/resources/empty_css.css';
const VALID_EXTENSIONS = ['.js', '.ts'];
const VALID_EXTENSIONS = ['.js', '.ts', '.html', '.css'];
Copy link
Contributor

Choose a reason for hiding this comment

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

html too?

@@ -106,6 +99,16 @@ export function applyStyleAttributes(vm: VM, hostAttribute: string, shadowAttrib
context.shadowAttribute = shadowAttribute;
}

function collectStylesheets(stylesheets, hostSelector, shadowSelector, isNative, fn) {
Copy link
Contributor

Choose a reason for hiding this comment

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

call fn -> aggregatorFn or something more specific

also add some notes to explain the why

@@ -13,7 +13,7 @@ import nodeModulePaths from './node-modules-paths';

const DEFAULT_IGNORE = ['**/node_modules/**', '**/__tests__/**'];
const PACKAGE_PATTERN = ['*/*/package.json', '*/package.json', 'package.json'];
const MODULE_ENTRY_PATTERN = `**/*.[jt]s`;
const MODULE_ENTRY_PATTERN = `**/*.([jt]s|html|css)`;
Copy link
Contributor

Choose a reason for hiding this comment

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

html?

@diervo
Copy link
Contributor Author

diervo commented May 8, 2019 via email

@caridy
Copy link
Contributor

caridy commented May 8, 2019

The flapper can be ignored:

1) Event target in slot elements should receive event with correct target:
did not receive expected event target in slot element's parent handler
running internet explorer (v11.103) on Windows 10
Check out job at https://saucelabs.com/tests/0e4799da29894bafa66c23d87add445b
Error: did not receive expected event target in slot element's parent handler
    at execute(<Function>) - index.js:312:3

@caridy caridy closed this May 8, 2019
@caridy
Copy link
Contributor

caridy commented May 8, 2019

ops, closed accidentally, diego will reopen it.

@diervo diervo reopened this May 8, 2019
@diervo diervo merged commit a7c563e into master May 10, 2019
@diervo diervo deleted the dval/cssOnlyModules branch May 10, 2019 00:32
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.

2 participants