Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

handlebar helpers for is*Error checks #322

Open
cythrawll opened this issue Nov 16, 2017 · 1 comment
Open

handlebar helpers for is*Error checks #322

cythrawll opened this issue Nov 16, 2017 · 1 comment
Labels
enhancement Good for New Contributors Issue is scoped such that it can be handled by a new contributor, with the help of maintainers

Comments

@cythrawll
Copy link

cythrawll commented Nov 16, 2017

I have made one or two handlebars helpers that check for specific error codes to show custom views by checking the reason property in ProxyMixins. Thought such helpers would be handy to have in this library.

{{#if (is-forbidden data.reason)}}
   <p>You don't have access to this</p>
{{/if}}
@alexlafroscia
Copy link
Collaborator

That's an interesting idea. I was going to push back and say that I wouldn't want to incur the payload cost on everyone for a feature only some would need, but we could go the ember-composable-helpers route and have uses opt into (or out of) which helpers they want to include. That way we could exclude them all by default and avoid the payload cost, but allow users to add them as needed.

@alexlafroscia alexlafroscia added enhancement Good for New Contributors Issue is scoped such that it can be handled by a new contributor, with the help of maintainers labels Mar 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Good for New Contributors Issue is scoped such that it can be handled by a new contributor, with the help of maintainers
Projects
None yet
Development

No branches or pull requests

2 participants