Skip to content

Commit

Permalink
update content
Browse files Browse the repository at this point in the history
  • Loading branch information
locks committed Feb 25, 2021
1 parent a38fe99 commit 6cd8f49
Showing 1 changed file with 71 additions and 32 deletions.
103 changes: 71 additions & 32 deletions content/ember-3-25-released.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Ember 3.25 Released
authors:
- the-crowd # replace with real authors from the author folder (add yourself if you're not there)
date: 2021-02-18T00:00:00.000Z
- ricardo-mendes # replace with real authors from the author folder (add yourself if you're not there)
date: 2021-02-25T00:00:00.000Z
tags:
- releases
- '2021'
Expand Down Expand Up @@ -32,46 +32,95 @@ Ember.js 3.25 is an incremental, backwards compatible release of Ember with bug

#### Bug Fixes

Ember.js 3.25 introduced 0 bug fixes.
Ember.js 3.25 contains several bug fixes, including:

- Empty `hmtmlSafe` strings are now considered false. ([#18148](https://github.com/emberjs/ember.js/pull/18148))
- Template locals no longer clobber component invocations of the same name. ([#19351](https://github.com/emberjs/ember.js/pull/19351))
- Improved error message when invoking nested components, e.g. `<Foo:Bar />`. ([#19336](https://github.com/emberjs/ember.js/pull/19336))
- Improved error messages and stack traces for `<LinkTo />`. ([#19342](https://github.com/emberjs/ember.js/pull/19342))

#### Features

Ember.js 3.25 introduced 2 features.

1. Feature description
2. Feature description
1. Template strict mode ([#19302](https://github.com/emberjs/ember.js/pull/19302), [#19306](https://github.com/emberjs/ember.js/pull/19306), [#19319](https://github.com/emberjs/ember.js/pull/19319))

#### Deprecations
While this feature won't have an impact for Ember developers quite yet, it is an important step towards allowing more experimental work in templates, like template imports and single-file components.

Ember.js 3.25 introduced 0 deprecations.
If these topics interest you, keep an eye on our [RFCs](https://github.com/emberjs/rfcs) repository for activity and a chance to participate!

<!-- Block start: If there were no deprecations, remove this block -->
Deprecations are added to Ember.js when an API will be removed at a later date. Each deprecation has an entry in the deprecation guide describing the migration path to a more stable API. Deprecated public APIs are not removed until a major release of the framework.
1. Named blocks ([#19318](https://github.com/emberjs/ember.js/pull/19318))

Consider using the [ember-cli-deprecation-workflow](https://github.com/mixonic/ember-cli-deprecation-workflow) addon if you would like to upgrade your application without immediately addressing deprecations.
<!-- Block end -->
This feature enables developers to yield distinct blocks from a component, unlocking powerful composition patterns for components.

For more details on changes in Ember.js 3.25, please review the [Ember.js 3.25.0 release page](https://github.com/emberjs/ember.js/releases/tag/v3.25.0).
This feature is useful when you want to render different things depending on passed-in data.
Let us implement a shopping cart that lists the items in it, or shows a message says that it is empty.
We will be using `{{gt}}` from [`ember-truth-helpers`](https://emberobserver.com/addons/ember-truth-helpers) to help implement this.

---
First we write the component template:

## Ember Data
```handlebars
// app/components/cart.hbs
{{#if (gt @list.length 0)}}
<ul>
{{#each @list as |item|}}
<li>{{yield item}}</li>
{{/each}}
</ul>
{{else}}
{{yield to="empty"}}
{{/if}}
```

Ember Data is the official data persistence library for Ember.js applications.
Which can be used like so:

```handlebars
<Cart @list={{this.shoppingList}}>
<:default as |listItem|>
<p>You have a {{listItem}}.</p>
</:default>
<:empty>
<p>Your cart is empty.</p>
</:empty>
</Cart>
```

### Changes in Ember Data 3.25
Then when `shoppingList` contains multiple elements, like `[ "apple", "pear", "banana" ]`, it renders the following:

#### Bug Fixes
```handlebars
<ul>
<li><p>apple</p</li>
<li><p>pear</p</li>
<li><p>banana</p</li>
</ul>
```

Ember Data 3.25 introduced 0 bug fixes.
But if `shoppingList` is empty, it renders the following instead:

#### Features
```handlebars
<p>Your cart is empty.</p>
```

Ember Data 3.25 introduced 0 features.
Named blocks are also useful if you want to ensure a certain structure to your HTML, but want to enable customization of the content.
An example of this would be an `<Article>` component, as shown in the yieldable named blocks RFC ([#460](https://emberjs.github.io/rfcs/0460-yieldable-named-blocks.html#detailed-design)).

You can find more information in the [Component API documentation](https://api.emberjs.com/ember/3.25/modules/@glimmer%2Fcomponent). More thorough documentation in the guides and tutorial will be released with the next version of Ember.

#### Deprecations

Ember Data 3.25 introduced 0 deprecations.
Ember.js 3.25 introduced 0 deprecations.

For more details on changes in Ember.js 3.25, please review the [Ember.js 3.25.0 release page](https://github.com/emberjs/ember.js/releases/tag/v3.25.0).

---

## Ember Data

Ember Data is the official data persistence library for Ember.js applications.

### Changes in Ember Data 3.25

Apart from documentation fixes and internal cleanup of feature flags, there were no changes.

For more details on changes in Ember Data 3.25, please review the
[Ember Data 3.25.0 release page](https://github.com/emberjs/data/releases/tag/v3.25.0).
Expand All @@ -96,17 +145,7 @@ While it is recommended to keep Ember CLI versions in sync with Ember and Ember

### Changes in Ember CLI 3.25

#### Bug Fixes

Ember CLI 3.25 introduced 0 bug fixes.

#### Features

Ember CLI 3.25 introduced 0 features.

#### Deprecations

Ember CLI 3.25 introduced 0 deprecations.
Apart from updated dependencies in the app and addon blueprints, there were no changes.

For more details on the changes in Ember CLI 3.25 and detailed upgrade
instructions, please review the [Ember CLI 3.25.0 release page](https://github.com/ember-cli/ember-cli/releases/tag/v3.25.0).
Expand Down

0 comments on commit 6cd8f49

Please sign in to comment.