Skip to content

A platform for community discussion. Free, open, simple.

DEV: Drop `autosize` package (#40297)

David Taylord4aca7ac3797
diff --git a/frontend/discourse/app/controllers/tags/index.js b/frontend/discourse/app/controllers/tags/index.js
index f5025de1dd5..530064e8e7c 100644
--- a/frontend/discourse/app/controllers/tags/index.js
+++ b/frontend/discourse/app/controllers/tags/index.js
@@ -1,10 +1,8 @@
import { tracked } from "@glimmer/tracking";
import Controller from "@ember/controller";
import { action, computed, set } from "@ember/object";
-import { schedule } from "@ember/runloop";
import { service } from "@ember/service";
import { isEmpty } from "@ember/utils";
-import autosize from "autosize";
import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error";
import { optionalRequire } from "discourse/lib/utilities";
@@ -16,8 +14,6 @@ export default class TagsIndexController extends Controller {
@tracked isCreatingTags = false;
@tracked bulkCreateResults = null;
- bulkTagTextarea = null;
-
sortedByCount = true;
sortedByName = false;
@@ -105,11 +101,6 @@ export default class TagsIndexController extends Controller {
});
}
- @action
- registerTextarea(element) {
- this.bulkTagTextarea = element;
- }
-
@action
async bulkCreateTags(event) {
event?.preventDefault();
@@ -138,11 +129,6 @@ export default class TagsIndexController extends Controller {
this.bulkTagInput = "";
this.bulkCreateResults = response;
- schedule("afterRender", () => {
- if (this.bulkTagTextarea) {
- autosize.update(this.bulkTagTextarea);
- }
- });
this.router.refresh();
} catch (error) {
popupAjaxError(error);
diff --git a/frontend/discourse/app/templates/tags/index.gjs b/frontend/discourse/app/templates/tags/index.gjs
index 104630c60b2..b82fc6c2448 100644
--- a/frontend/discourse/app/templates/tags/index.gjs
+++ b/frontend/discourse/app/templates/tags/index.gjs
@@ -1,6 +1,5 @@
import { fn } from "@ember/helper";
import { on } from "@ember/modifier";
-import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import DiscourseBanner from "discourse/components/discourse-banner";
import PluginOutlet from "discourse/components/plugin-outlet";
import TagList from "discourse/components/tag-list";
@@ -76,7 +75,6 @@ export default <template>
{{i18n "tagging.bulk_create_inline_placeholder"}}
</label>
<DExpandingTextArea
- {{didInsert @controller.registerTextarea}}
{{on "input" (withEventValue (fn (mut @controller.bulkTagInput)))}}
value={{@controller.bulkTagInput}}
placeholder={{i18n "tagging.bulk_create_inline_placeholder"}}
diff --git a/frontend/discourse/package.json b/frontend/discourse/package.json
index 91a8d9be88b..895db01ab22 100644
--- a/frontend/discourse/package.json
+++ b/frontend/discourse/package.json
@@ -110,7 +110,6 @@
"@uppy/utils": "^7.2.0",
"@uppy/xhr-upload": "^5.2.0",
"a11y-dialog": "8.1.5",
- "autosize": "^6.0.1",
"babel-import-util": "^3.0.1",
"babel-plugin-ember-template-compilation": "^4.0.0",
"broccoli-asset-rev": "^3.0.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index dbaf53ac7a7..34534b32ccb 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -459,9 +459,6 @@ importers:
a11y-dialog:
specifier: 8.1.5
version: 8.1.5
- autosize:
- specifier: ^6.0.1
- version: 6.0.1
babel-import-util:
specifier: ^3.0.1
version: 3.0.1
@@ -3643,9 +3640,6 @@ packages:
peerDependencies:
postcss: ^8.1.0
- resolution: {integrity: sha512-f86EjiUKE6Xvczc4ioP1JBlWG7FKrE13qe/DxBCpe8GCipCq2nFw73aO8QEBKHfSbYGDN5eB9jXWKen7tspDqQ==}
-
resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==}
engines: {node: '>= 0.4'}
@@ -12328,8 +12322,6 @@ snapshots:
postcss: 8.5.14
postcss-value-parser: 4.2.0
-
dependencies:
possible-typed-array-names: 1.1.0