haml / haml-rails

let your Gemfile do the talking
MIT License
1.04k stars 169 forks source link

[Feature] Support for annotate_template_file_names #172

Closed tom-lord closed 3 years ago

tom-lord commented 4 years ago

There is a new (unreleased) feature in the rails master branch: config.action_view.annotate_template_file_names.

However, this only adds support for erb templates.

It would be nice to prepare support for this feature, which will likely be shipped with rails 6.1.0, in the haml-rails library too. The HAML template engine generates the output here, but presumably it should be this library's responsibility to read the rails-specific configuration parameter (so generated HTML appends/prepends the rendered partial name).

ConfusedVorlon commented 3 years ago

just to add

I'd love to see support added in haml.

thank you

HamptonMakes commented 3 years ago

I think we can definitely prioritize this!

vpereira commented 3 years ago

any update on that?

dmarcoux commented 3 years ago

There's an open PR for this: https://github.com/haml/haml/pull/1050.

Since this issue's creation, the configuration was renamed to annotate_rendered_view_with_filenames in Rails a673ce6.

dmarcoux commented 3 years ago

The PR I linked in my previous comment is now merged, so I believe this is now supported.

ConfusedVorlon commented 3 years ago

Awesomeness. Thank you :)

HamptonMakes commented 3 years ago

https://github.com/haml/haml/releases/tag/v5.2.2