Feasible to move autosize library to 'discourse/lib'?

@eviltrout Would it be feasible to move the useful autosize library you wrote from admin/lib to discourse/lib? I’ve come across it working on Quick Messages and would prefer to use a working existing solution in the project over a 3rd party, or my own, solution. DivResizer doesn’t quite fit the purposes of a smaller chat textarea that does not occupy most of the composer.

The problem is that admin code is not available to clients where the user is not an admin (i.e. if a non-admin user’s client tries to import a module from admin/lib, it is unable to find it; I’m assuming this is by design for security purposes). The desire to autosize a textarea is relatively common, so it’s possible others may find it useful in the future as well.

https://github.com/discourse/discourse/pull/4093

3 Likes

Sure, no objections here. Merged.

2 Likes