From 2bec6f9650bd1eea3b8bc9b91b8b79452677e4bd Mon Sep 17 00:00:00 2001 From: Markus Sanin Date: Fri, 4 Aug 2023 08:22:34 +0200 Subject: [PATCH] fix code examples in docs --- docs/app/templates/cookbook.hbs | 6 +++--- docs/app/templates/helpers-documentation/index.hbs | 6 +++--- .../helpers-documentation/liquid-bind-block/page.hbs | 4 ++-- docs/app/templates/helpers-documentation/liquid-bind.hbs | 8 ++++---- docs/app/templates/helpers-documentation/liquid-if.hbs | 2 +- .../app/templates/helpers-documentation/liquid-outlet.hbs | 4 ++-- .../app/templates/helpers-documentation/liquid-spacer.hbs | 4 ++-- docs/app/templates/index.hbs | 2 +- docs/app/templates/transition-map/outlet-constraints.hbs | 6 +++--- docs/app/templates/transition-map/route-constraints.hbs | 8 ++++---- docs/app/templates/transition-map/value-constraints.hbs | 4 ++-- docs/app/templates/transitions/defining.hbs | 2 +- 12 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/app/templates/cookbook.hbs b/docs/app/templates/cookbook.hbs index 0280dfde..15e03106 100644 --- a/docs/app/templates/cookbook.hbs +++ b/docs/app/templates/cookbook.hbs @@ -21,7 +21,7 @@ route to the posts route. The reverse call indicates what should happen

2. Replace outlets in your templates

Now we have defined our transitions, the next step is to replace Embers native \{{outlet}} in your -template files. You should replace it with the outlet component by Liquid Fire: \{{#liquid-outlet}}. It is +template files. You should replace it with the outlet component by Liquid Fire: <LiquidOutlet />. It is most likely that you will find this \{{outlet}} in your application template file. So now your app/templates/application.hbs might look like this.

@@ -56,7 +56,7 @@ place a new liquid outlet component, so the file looks like this.

And click it. You will now see (another build-in) cross-fade transition!

Remember, you will have to include a -\{{liquid-outlet}} in any nested route's master template. Otherwise, there will be no transition visible. +<LiquidOutlet /> in any nested route's master template. Otherwise, there will be no transition visible. This is how Ember works. A nested master template contains \{{outlet}} by default and you should overwrite -it with a \{{liquid-outlet}}. But that is easy, right?

+it with a <LiquidOutlet />. But that is easy, right?

diff --git a/docs/app/templates/helpers-documentation/index.hbs b/docs/app/templates/helpers-documentation/index.hbs index ca6d205d..8053b87a 100644 --- a/docs/app/templates/helpers-documentation/index.hbs +++ b/docs/app/templates/helpers-documentation/index.hbs @@ -8,7 +8,7 @@
{{!-- template-lint-disable no-invalid-link-text --}} - \{{liquid-outlet}} + <LiquidOutlet />
@@ -18,7 +18,7 @@
{{!-- template-lint-disable no-invalid-link-text --}} - \{{#liquid-bind}} + <LiquidBind> </LiquidBind>
@@ -38,7 +38,7 @@
{{!-- template-lint-disable no-invalid-link-text --}} - \{{#liquid-spacer}} + <LiquidSpacer> </LiquidSpacer>
diff --git a/docs/app/templates/helpers-documentation/liquid-bind-block/page.hbs b/docs/app/templates/helpers-documentation/liquid-bind-block/page.hbs index 50fd7731..fe4dc89f 100644 --- a/docs/app/templates/helpers-documentation/liquid-bind-block/page.hbs +++ b/docs/app/templates/helpers-documentation/liquid-bind-block/page.hbs @@ -1,11 +1,11 @@ {{! template-lint-disable no-unbalanced-curlies }}

- \{{#liquid-bind}} with a block + <LiquidBind /> with a block

- If you pass a block to\{{#liquid-bind}}, each new version of your + If you pass a block to <LiquidBind />, each new version of your bound value will cause the block to render

diff --git a/docs/app/templates/helpers-documentation/liquid-bind.hbs b/docs/app/templates/helpers-documentation/liquid-bind.hbs index 84637083..046277ed 100644 --- a/docs/app/templates/helpers-documentation/liquid-bind.hbs +++ b/docs/app/templates/helpers-documentation/liquid-bind.hbs @@ -1,7 +1,7 @@ {{!-- template-lint-disable no-unbalanced-curlies --}}

- \{{liquid-bind}} + <LiquidBind />

@@ -12,12 +12,12 @@ map to decide how to animate when the bound value changes.

Saying - \{{liquid-bind value=someValue}} + <LiquidBind @value=\{{this.someValue}} /> is a drop-in replacement for - \{{someValue}} + \{{this.someValue}} , except this wraps the content in markup so that it can be targeted for animation. See the @@ -31,7 +31,7 @@ Options

There is also a block form of - \{{#liquid-bind}} + <LiquidBind> </LiquidBind> that is diff --git a/docs/app/templates/helpers-documentation/liquid-if.hbs b/docs/app/templates/helpers-documentation/liquid-if.hbs index 8ea5c6c3..d259ddb0 100644 --- a/docs/app/templates/helpers-documentation/liquid-if.hbs +++ b/docs/app/templates/helpers-documentation/liquid-if.hbs @@ -41,7 +41,7 @@ normal

- \{{#liquid-unless}} + <LiquidUnless> </LiquidUnless> is the complement to diff --git a/docs/app/templates/helpers-documentation/liquid-outlet.hbs b/docs/app/templates/helpers-documentation/liquid-outlet.hbs index f0fd9d22..d5d655fc 100644 --- a/docs/app/templates/helpers-documentation/liquid-outlet.hbs +++ b/docs/app/templates/helpers-documentation/liquid-outlet.hbs @@ -1,7 +1,7 @@ {{!-- template-lint-disable no-unbalanced-curlies --}}

- \{{liquid-outlet}} + <LiquidOutlet />

@@ -43,7 +43,7 @@ does, including named outlets (like - \{{liquid-outlet inputOutletName="sidebar"}} + <LiquidOutlet @inputOutletName="sidebar" /> ).

diff --git a/docs/app/templates/helpers-documentation/liquid-spacer.hbs b/docs/app/templates/helpers-documentation/liquid-spacer.hbs index 78c2185f..a6684339 100644 --- a/docs/app/templates/helpers-documentation/liquid-spacer.hbs +++ b/docs/app/templates/helpers-documentation/liquid-spacer.hbs @@ -1,12 +1,12 @@ {{! template-lint-disable no-unbalanced-curlies }}

- \{{#liquid-spacer}} + <LiquidSpacer />

- \{{#liquid-spacer}} + <LiquidSpacer /> is a component that animates its own width and height to match the width and height of its diff --git a/docs/app/templates/index.hbs b/docs/app/templates/index.hbs index d3507ecd..eb94fbdd 100644 --- a/docs/app/templates/index.hbs +++ b/docs/app/templates/index.hbs @@ -22,7 +22,7 @@ template helpers, the transition map, and transitions.

Template Helpers

The library provides helpers -like \{{liquid-outlet}}, \{{liquid-if}}, +like <LiquidOutlet />, <LiquidIf />, etc, that are nearly drop-in replacements for the equivalent normal Ember helpers. The key difference is that they don't update instantly when bound data changes. Instead they consult your application's diff --git a/docs/app/templates/transition-map/outlet-constraints.hbs b/docs/app/templates/transition-map/outlet-constraints.hbs index 3afaf174..f706b587 100644 --- a/docs/app/templates/transition-map/outlet-constraints.hbs +++ b/docs/app/templates/transition-map/outlet-constraints.hbs @@ -8,16 +8,16 @@ The following constraint applies to oulet names. It will only work with - \{{liquid-outlet}} + <LiquidOutlet /> because only - \{{liquid-outlet}} + <LiquidOutlet /> has access to it's own name. (The other helpers like - \{{liquid-if}} + <LiquidIf /> ) don't know anything about outlets.)

diff --git a/docs/app/templates/transition-map/route-constraints.hbs b/docs/app/templates/transition-map/route-constraints.hbs index e93d3a01..3e8b8555 100644 --- a/docs/app/templates/transition-map/route-constraints.hbs +++ b/docs/app/templates/transition-map/route-constraints.hbs @@ -7,15 +7,15 @@

The following three constraints apply to route names. They will only work with - \{{liquid-outlet}} + <LiquidOutlet /> because only - \{{liquid-outlet}} + <LiquidOutlet /> has visibility into routes. (The other helpers like - \{{liquid-if}} + <LiquidIf /> ) don't know anything about routes.)

@@ -55,7 +55,7 @@ those. The next three constraint apply to routes' models. They too only work with - \{{liquid-outlet}} + <LiquidOutlet /> .

diff --git a/docs/app/templates/transition-map/value-constraints.hbs b/docs/app/templates/transition-map/value-constraints.hbs index 486edc3f..058a62b4 100644 --- a/docs/app/templates/transition-map/value-constraints.hbs +++ b/docs/app/templates/transition-map/value-constraints.hbs @@ -11,13 +11,13 @@
  • - \{{liquid-bind}} + <LiquidBind /> match against its own bound contexts.
  • - \{{liquid-if}} + <LiquidIf /> matches against its predicate.
  • diff --git a/docs/app/templates/transitions/defining.hbs b/docs/app/templates/transitions/defining.hbs index 8294b40e..1d99010e 100644 --- a/docs/app/templates/transitions/defining.hbs +++ b/docs/app/templates/transitions/defining.hbs @@ -27,7 +27,7 @@ transition is done.

    The corresponding values that go with your old and new states (this is the valued passed into a helper like - \{{liquid-bind}}).
    + <LiquidBind />).
oldView, newView