The Ember Times - Issue No. 151

👋 Emberistas! 🐹

Ember.js for #BlackLivesMatter 🤝, participate in the ember new --lang RFC 🌐, change the way you load your data with ember-await ⌚, beta release of ember-data-model-fragments 🚢, connect an Ember App to an OAuth2 Python Flask Server 🔐, and last, but not least, integrate Netlify with empress-blog 🚀!


Ember.js for #BlackLivesMatter 🤝

You may have noticed that emberjs.com is currently offline, as a small mark of respect, and expression of solidarity for #BlackLivesMatter. The Ember.js guides, community code of conduct, and legal information remain available.


ember new --lang RFC 🌐

There is an RFC to introduce the --lang flag to Ember CLI and help brand new Ember apps meet a Level A guideline for WCAG. (Level A is the minimum level of conformance.) If the flag is used with a valid language code, the CLI will assign the lang attribute to the root <html> element in app/index.html.

How will the lang attribute help your end users?

"Both assistive technologies and conventional user agents can render text more accurately when the language of the Web page is identified. Screen readers can load the correct pronunciation rules. Visual browsers can display characters and scripts correctly. Media players can show captions correctly. As a result, users with disabilities will be better able to understand the content."

WCAG Success Criterion 3.1.1: Intent

Please note that everyone benefits from having a valid page language specified, not just users with disabilities. To learn more about the importance of lang attribute and provide feedback, we encourage you to check out the RFC.

We extend our thanks to Ava Wroten (@hergaiety), Joseph Sumner (@josephdsumner), Jamie White (@jgwhite), and Melanie Sumner (@MelSumner) for their work!


Change the way you load data with ember-await

In case you may have missed the announcement, Maciej Kwaśniak (@Exelord) released ember-await to provide a data-loading component with declarative promise resolution. The addon, inspired by react-async, uses Octane and ember-concurrency to manage promise state. 🔥

Try out ember-await today!


Beta release of ember-data-model-fragments 🚢

New beta alert! 🚨 Version 5.0.0-beta.0 of ember-data-model-fragments has recently been released!

This beta provides support for Ember Data 3.13+ and includes a pretty serious rewrite to accommodate RecordData. Big shout out to the team behind it, and Igor Terzic (@igorT) for all the help! 😃

If you use model fragments, please try it out in your app and let Rich Glazerman (@richgt) know if things are working.


Connecting an Ember app to an OAuth2 Python Flask server 🔐

Richard Bezemer (@rbezemer) wrote a couple of blog posts on adding Oauth2 support to a basic web project using Flask and Ember.

The blog post goes through adding a custom authenticator (called custom-oauth2 in our example), using the ember g command to tell ember-simple-auth how to connect and authenticate with our authentication server.

ember g authenticator custom-oauth2

It also discusses custom data such as serverTokenEndpoint, clientId, and serverTokenRevocationEndpoint which our custom authenticator can use to implement its authenticate() method.

Now we can use ember-simple-auth as a session management tool to handle querying for the current state of the user through the session Ember Service it provides.

this.session.authenticate(
  'authenticator:custom-oauth2', 'password', this.username, this.password
);

Read more on the full the blog posts on using Oauth2 with Flask-REST-JSONAPI and on connecting your Ember app to that Flask server!


How to integrate Netlify-CMS with Empress-blog 🚀

Robin Philip Thomas wrote a blog on integrating empress-blog and Netlify CMS.

What is empress-blog?

  • A fully-functional, static site implementation of a blog system
  • Built on Ember
  • Fully working out of the box
  • SEO friendly output based on Markdown

Netlify CMS is based on client-side JavaScript, reusable APIs and prebuilt markup.

He explains how to integrate them both in a step-by-step approach. He also details on how to write your blog's content in Netlify CMS with the power of publishing workflows.

Check out the blog post! Happy blogging 😄


Contributors' corner 👏

This week we'd like to thank @nickschot, @flexoid, @jaredgalanis, @locks, @spruce, @lukemelia, @rwjblue, @chriskrycho, @bekzod, @igorT, @scalvert, @Mikek2252, @lyubarskiy, and @amyrlam for their contributions to Ember and related repositories! 💖


Got a question? Ask readers' questions! 🤓

Office Hours Tomster Mascot

Wondering about something related to Ember, Ember Data, Glimmer, or addons in the Ember ecosystem, but don't know where to ask? Readers’ Questions are just for you!

Submit your own short and sweet question under bit.ly/ask-ember-core. And don’t worry, there are no silly questions, we appreciate them all - promise! 🤞


#embertimes 📰

Want to write for the Ember Times? Have a suggestion for next week's issue? Join us at #support-ember-times on the Ember Community Discord or ping us @embertimes on Twitter.

Keep on top of what's been going on in Emberland this week by subscribing to our e-mail newsletter! You can also find our posts on the Ember blog.


That's another wrap! ✨

Be kind,

Chris Ng, Abhilash LR, Isaac Lee, Jared Galanis, Amy Lam and the Learning Team