From my (fairly limited) experience, Hotwire may be easier to get started with but StimulusReflex is, at least at this point, more powerful and flexible, and perhaps more ambitious. Depending on what you plan on building, either could be sufficient/appropriate but you could combine them as well.
This allows you to have different functionality based on the device type a user access your app from. For example, you could use Hotwire/Turbo to show both a list of records and a detail on the same screen when the app is accessed/viewed from a desktop browser, and do more conventional list > detail individual page views on a mobile phone due to screen size limitations and, for example, inability to hover over links, etc.
The responsive CSS would still be in play for styling and what is shown and how, but you would also be able to use different style sheets altogether based on the device type any single user uses to access the app.
Here are examples that may help you get the form working:
This one is for Rails 4 (uses simple_form gem) but the code will work in Rails 6 with minimal changes:
You can also share your code, if you feel comfortable, for additional help.
Based on the pre-126.96.36.199 version of Rails, I found Carrierwave to be more suitable for apps where I need to generate multiple-size versions of an image on upload that I may want to use outside the app itself (the ActiveStorage has not worked quite as well in a couple of apps of this type I built). Other than that, I find ActiveStorage to be rather nice, and it’s likely to get better in the future.
Have not had to do a migration from Carrierwave to ActiveStorage but, based on the available documentation, it looks doable but would require a lot of work so it may be better if one stuck to Carrierwave if that’s what they already do.
Knowing what kind of app you are building (in the most general terms) would help recommend one or the other.
Not yet. The CSS approach would not have worked in this specific case so I treid mucking about in the source code but gave up as I didn’t feel like having to reivist the issue each time a Rails update rolls around.
I eventually settled on using Redactor as it gave me the control I needed for this project. Not as straightforward as ActionText though.
I do have some ideas on how to address the Trix editor configuration but have not had time to explore them. Will post here when I have something working.
I looked at both the ActionText and Trix documentation and could not find anything on how to disable/remove formatting tools and disable file uploads for ActionText.
For the project I am working on, I need only text formatting (bold, italic, lists, etc.) but not file uploads and hyperlinks. I considered dealing with hyperlinks via Rails content formatting options (rendering them as text) but was hoping for a bit more elegant approach before going down that route. As for blocking uploads, no idea whether that is possible while also using ActionText.
Has anybody deal with this alredy or does anybody know where I could look up more information?
Thanks in advance.
Is there a way to limit the formatting options in the Trix editor? For example, if I don’t want users to enter links or upload images, is there a way I can configure the editor so that those options are disabled and not just not shown (I can do the latter via CSS).
How difficult, assuming it’s possible, would it be to adjust this for receiving replies via SMS (to use the episode’s example)?