From 798e83bc1dc6cd812e14b56ddae75ae7e07f8653 Mon Sep 17 00:00:00 2001 From: Marten Schilstra Date: Sat, 16 Jul 2016 13:29:30 +0200 Subject: [PATCH 1/2] Introduce basic logic HBS helpers --- text/0000-logic-helpers.md | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 text/0000-logic-helpers.md diff --git a/text/0000-logic-helpers.md b/text/0000-logic-helpers.md new file mode 100644 index 0000000000..a3b41abaa8 --- /dev/null +++ b/text/0000-logic-helpers.md @@ -0,0 +1,45 @@ +- Start Date: 2016-07-16 +- RFC PR: (leave this empty) +- Ember Issue: (leave this empty) + +# Summary + +Introduce the following HandleBars helpers to Ember.js: + + - `{{eq}}` + - `{{not-eq}}` + - `{{not}}` + - `{{and}}` + - `{{or}}` + +# Motivation + +The proposed helpers are some simple helpers that help adding basic logic to +templates. They are currently already available in an addon called +`[ember-truth-helpers](https://github.com/jmurphyau/ember-truth-helpers)`, but I +believe these helpers are essential, because the `ember-truth-helpers` addon is +one of the most downloaded non Ember CLI default addons. + +# Detailed design + +See `[ember-truth-helpers](https://github.com/jmurphyau/ember-truth-helpers)` +repo for the detailed design of the helpers. + +# How We Teach This + +The mandatory documentation should be sufficient to teach this to new users. +Optionally a section in the templates guides could be dedicated to the new logic +helpers. + +# Drawbacks + +The only drawback I see is that it expands the surface of the API. + +# Alternatives + +An alternative could be making `ember-truth-helpers` one of the default addons +included when generating a new app/addon. + +# Unresolved questions + +There are no unresolved questions at this time. From 564d39cc0d251319d6414cea6739a8e2743660bb Mon Sep 17 00:00:00 2001 From: Marten Date: Sat, 16 Jul 2016 13:31:15 +0200 Subject: [PATCH 2/2] Update 0000-logic-helpers.md --- text/0000-logic-helpers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/text/0000-logic-helpers.md b/text/0000-logic-helpers.md index a3b41abaa8..38867062b4 100644 --- a/text/0000-logic-helpers.md +++ b/text/0000-logic-helpers.md @@ -16,13 +16,13 @@ Introduce the following HandleBars helpers to Ember.js: The proposed helpers are some simple helpers that help adding basic logic to templates. They are currently already available in an addon called -`[ember-truth-helpers](https://github.com/jmurphyau/ember-truth-helpers)`, but I +[ember-truth-helpers](https://github.com/jmurphyau/ember-truth-helpers), but I believe these helpers are essential, because the `ember-truth-helpers` addon is one of the most downloaded non Ember CLI default addons. # Detailed design -See `[ember-truth-helpers](https://github.com/jmurphyau/ember-truth-helpers)` +See [ember-truth-helpers](https://github.com/jmurphyau/ember-truth-helpers) repo for the detailed design of the helpers. # How We Teach This