3 ms·
I share some of the same issues, I have found that ERB templates work better than HAML for lots of data attributes. Basecamp seems to use liberal newlines / sp
by swanson 6y ago
I share some of the same issues, I have found that ERB templates work better than HAML for lots of data attributes.
Basecamp seems to use liberal newlines / spacing when creating html tags (like one line per attribute) so that might help.
Server-side "component partials" still don't have a great story, but view_component is one emerging option.
- nthj 6y agoAs another option, HAML lets you extract the attributes into a ruby helper method: https://haml.info/docs/yardoc/file.REFERENCE.html#attribute-methods https://haml.info/docs/yardoc/file.REFERENCE.html#attribute-...
- aaronbrethorst 6y agoSame. I’ve been a happy user of Haml for about ten years, but I think that Tailwind and Stimulus will permanently force me back to ERB :(