tl;dr Trix is unmaintained; ActionText is tightly coupled to ActiveStorage
I’m not sure if “A May Of WTFs” is still a thing in July, but here goes:
Rails is great. It’s incredible how stable it is, especially the ease of upgrades with the last couple of major versions. There’s ton of great functionality and ton more being added! I love it! Thank you all!
Coming from that state of mind, I was happy to see the new additions to Rails: ActiveStorage, ActionText, and its underlying editor Trix.
Here’s a little story of my new Rails project (started in 2020):
I just started a new Rails project and connected ActiveStorage to S3. The files being uploaded were all to be public domain, but for some reason ActiveStorage encrypts the name using secure global ID and that’s:
- Killing the performance of my Rails app, as now all file requests have to go through my Rails app
- There’s no way to turn this off (none that I found)
So I decided to abandon ActiveStorage and switched to something else for file uploads. This sucks. This is not the “Rails is omakase” I heard DHH talking about.
This brings me to ActionText. With ActiveStorage disabled, ActionText doesn’t work. ActiveStorage is a hard dependency of ActionText. This is very not-omakase. So what I ended up doing was:
- Add ActiveStorage migrations / tables to the database (although I have no plans on using them)
- Use CSS (!!!) to hide the paperclip icon to prevent file uploads within the rich text editor (Trix)
I regretted I chose to use ActionText as well…it just seems that this is very tightly coupled, without the possibility for developer to choose to swap any part of this system: activestorage-actiontext-trix
But ok, I started a new project in 2020 and already ended up with a solution that’s using ActionText, hiding paperclip icon, because Trix has no config options. Basically a legacy from the beginning.
Today I went to Trix repo in search of adding my own file uploading functionality. What I saw was issues more than 3 months old, that no one replied to. Even worse. PRs unanswered. PRs to documentation. That’s the entry-level helping. The easiest and great to boost motivation for new open source contributors! Instead, there are people asking each other “did you solve this eventually?” and stale bot closing down “stale” issues no one replied to.
How can we fix this?
Thanks for reading till the end!