Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip the partial expansion for listitems when using the handlebars engine #550

Closed
wants to merge 1 commit into from

Conversation

bleathem
Copy link

@bleathem bleathem commented Nov 2, 2016

Summary of changes:
The list_item_hunter.js implementation assumes one is using the mustache engine, and fails when nesting handlebars patterns in the list tag. This PR skips the partial expansions when the handlebars rendering engine is used, since handlebars is able to render nested partials itself.

@bleathem
Copy link
Author

bleathem commented Nov 8, 2016

A possibly more robust approach to solving this problem can be seen with this handlebars helper (implemented as a patternfly-node plugin):
https://github.com/bleathem/patternlab-plugin-handlebars-helper-listitems

It requires a syntax change, but delegates the list item iteration and rendering to the handlebars engine, rather than trying to hack the mustache approach as attempted in this PR.

@tburny
Copy link

tburny commented Nov 13, 2016

Maybe it would be good to have a unit test here, too? :)

@bmuenzenmeyer
Copy link
Member

@bleathem with the plugin in mind - can this PR be closed?

@bleathem
Copy link
Author

Yes, the handlebars helper approach is both less of a hack and a more complete solution than this PR. Once #555 is merged and released, the plugin will be generally consumable.

Closing this PR.

@bleathem bleathem closed this Nov 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants