From 2ffd38383d73eb861f3cfa7e85cd11e06c804b51 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 25 Feb 2018 20:45:11 -0800 Subject: [PATCH] improve perf of compose box --- package-lock.json | 5 - package.json | 4 +- .../_components/compose/LiteComposeBox.html | 35 +++- routes/_utils/autosize.js | 166 ++++++++++++++++++ scss/global.scss | 6 + templates/2xx.html | 2 +- 6 files changed, 201 insertions(+), 17 deletions(-) create mode 100644 routes/_utils/autosize.js diff --git a/package-lock.json b/package-lock.json index c41d3a62..ac4904e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -357,11 +357,6 @@ "postcss-value-parser": "3.3.0" } }, - "autosize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/autosize/-/autosize-4.0.0.tgz", - "integrity": "sha1-egWZsbqE1zvXWJsNnaOHAVLGkjc=" - }, "aws-sign2": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", diff --git a/package.json b/package.json index 72d0f63d..af42229d 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "dependencies": { "@gamestdio/websocket": "^0.2.2", "a11y-dialog": "^4.0.1", - "autosize": "^4.0.0", "cheerio": "^1.0.0-rc.2", "child-process-promise": "^2.2.1", "chokidar": "^2.0.0", @@ -95,7 +94,8 @@ "__shell__", "__assets__", "test", - "fixture" + "fixture", + "Element" ], "ignore": [ "dist", diff --git a/routes/_components/compose/LiteComposeBox.html b/routes/_components/compose/LiteComposeBox.html index 0c6d6bd5..c6e93396 100644 --- a/routes/_components/compose/LiteComposeBox.html +++ b/routes/_components/compose/LiteComposeBox.html @@ -1,4 +1,4 @@ -
+
@@ -13,13 +13,13 @@ ref:textarea bind:value=inputText > - - - {{inputLengthToDisplay}} + {{inputLengthToDisplayAfterRaf || '0'}}