I’ve been trying to keep an eye out for simpler, lower-priority enhancements to Ember that would be well-suited to someone trying to start contributing or level up, and I think I’ve got a decently straightforward one in mind:
The {{linkTo}}
helper presently can only be used in block form, e.g.
{{#linkTo 'about'}}The About page{{/linkTo}}
I’d like for it to be possible to rewrite the above in non-block form, e.g.
{{linkTo 'The About page' 'about'}}
The logic is simple: if a block is NOT provided (i.e. the helper is just invoked as {{linkTo ...}}
and not {{#linkTo ...}}block content{{/linkTo}}
), the first arg should be treated as the link text.
Also, if the first arg is not a quoted string, it should be treated as a bound path, e.g.
{{#each articles}}
{{linkTo title 'articles.show' this}}
{{/each}}
In this case, the generic links would use the article title as the link text, and if those article titles changed for any reason, the link text should update.
This seems like an ideal fit for a new contributor; just the right amount of challenge, but more or less localized, and should level up your knowledge of how bindings and helpers etc work in Ember.
Who wants it?