The Ember.js Times - Issue #41
ជំរាបសួរ Emberistas!

This week we have some neat RFCs about deprecations and visible components for you, as well as ember-cli-updates and sweet news 🍬from the learning team as well. This is what happened these days:
Peek-a-boo, where are you? 🐹🕵️‍♀️
Hiding components from view in Ember is super simple. There are several options to control a component’s visibility:
  • template conditionals (if, unless)
  • classNames and classNameBindings
  • toggling the hidden attribute of the wrapping element
Did you know you could also hide a component by using the component property isVisible? If you answered no, you’re not alone. Actually, that’s one of the main motivations behind the newly drafted RFC (Request for Comments) to deprecate its usage. Furthermore, the property is not used by Ember internally, it’s undefined unless it’s set, and it overrides any inline styles you might have set on your component earlier. So, ask yourself, do we really need it? Are the other approaches sufficient? Head over to the original proposal and give your feedback!

Au revoir, Copy and Copyable. You are being deprecated. @lupestro has written up an RFC to deprecate the Ember.Copy and the Ember.Copyable mixin. The reason for this is that while a deep-copy mechanism is useful; it isn’t an Ember problem and more of a standalone JavaScript one. Ember Data currently uses these mechanisms itself but the team finds the current implementation can cause hard to diagnose bugs, especially in testing. 
As a heads up if you’re currently using Copy or Copyable in your projects: the plan is to move their functionality to a separate add-on. Expect to see this coming soon as a deprecation in your app and if you want to learn more about the motivation behind that change, check out the original proposal here.

Edit:
 
Last week’s newsletter stated that the htmlSafe function and RFC#319 (add an html-safe helper) made Strings safe (as in: it dealt with security concerns for you).  This is incorrect. In fact, the function does nothing in regards to security and using it will only mark a String as safe to not be escaped by Glimmer.  The “safe” part of htmlSafe is so misleading that most of the conversation in RFC#319 is centered around renaming the function and the helper entirely.
Have you Googled “Ember API docs” recently? Now we’re on the first page! Many thanks to Todd Jordan and friends for their work (1, 2, 3) on improving Tomster’s SEO. 🔎
It’s official! The command line tool ember-cli-update is now the way to upgrade your Ember apps to newer versions. Moreover, the addon gained a couple of new and exciting features recently: 

Thanks to added support for the ember-qunit-codemod not only upgrading your Ember app, but also bringing it on par with the new Ember QUnit Testing API as described in the original RFC#232  is only a few commands away.

First, upgrade your Ember app from your current version to your anticipated version using the specified —from and —to flags.
After resolving all merge conflicts that might arise, run ember-cli-update with the dedicated —run-codemods flag subsequently; you will now get all the new shiny things of the new Ember QUnit Testing API in your existing test suite automagically. ✨

If you’re about to start your next updating adventure, now’s the best time to try out ember-cli-update yourself.

Already fond of ember-cli-update and looking for ways to show support? Your help is wanted in bringing several parts of the documentation in the Ember ecosystem up-to-date to spread the word about ember-cli-update
You can check out the related quest issue and claim any of the sub tasks here.

Finally, this week several contributions to Ember CLI itself focused on paving the way for a module unificated future of Ember (1, 2, 3). And last but not least, thanks to an alphabetically obsessive contribution 🤓you can now enjoy your default ESLint configuration file .eslintrc.js with a well-ordered list of target files.
Is there this one question about Ember, Ember Data, Glimmer, Ember CLI or a specific Ember addon that you have been pondering about for a while and that you can’t find an answer to? You already tried your luck asking your colleagues in the office, other Emberistas at local meetups; maybe you even posted your question on a social media platform or a Slack channel but you never received a satisfying reply to your query?

If that’s the case, then Readers’ Questions is just for you. In the form of a Q & A members of the Ember Team will answer your questions - and we will post their answer in one of the future editions of the Ember.js Times!

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!  🤞
✨ That's another wrap!  ✨ 

Be kind,
Alon Bukai, Robert Wagner, Amy Lam, Ryan Mark, Jen Weber, Ricardo Mendes, Jessica Jordan and the Learning Team
Until the next issue, happy Embering :)
The Ember.js Learning Team · 812 SW Washington St, Ste 1000 · Portland OR 97205 · USA
Unsubscribe | View in browser