Friday, May 10, 2024
HomeJavaScriptThe Ember Occasions - Challenge No. 142

The Ember Occasions – Challenge No. 142


👋 Emberistas! 🐹

Group assist for the Ember API Docs 📓❤️,
launch of ember-arg-types 🍎🍊,
Ember CLI enchancment ideas 🚀,
betas of Glimmer.js 2 🎉, and final, however not least,
watch 3 digital talks from EmberATX 📽️!


The Ember API Docs have been one of many cornerstones of Ember’s official studying assets for the reason that early days of the challenge.

However did you already know that proper now there are many efforts underway to modernise the app? On this regard, we would prefer to thank Gaurav Munjal (@Gaurav0) particularly for bringing in a number of new upgrades, superior refactors and enhancements to the API Docs ❤️!

If you’re serious about serving to with modernising the Ember API Docs – be it contributing code, triaging points, or reviewing adjustments – make sure that to talk with the Ember Studying group. You are able to do so both on a difficulty dialogue on Github or on the #dev-ember-learning channel by means of the Ember Discord!


Jon Kilroy (@jkusa) launched the ember-arg-types library which offers a decorator (@arg) that maps glimmer arguments to native part properties. This permits default values and kind checking to be declared and documented in your part JS file.

On this instance, sortBy will return the string argument handed or will default to the string ’id’:

@arg(string)
sortBy = 'id';

As a substitute of writing one thing like this:

get sortBy() {
  const { sortBy='id' } = this.args;
  assert('`sortBy` have to be a string', typeof sortBy === 'string');
  return sortBy;
}

Moreover ember-arg-types leverages the fb/prop-types library by importing kind validators for runtime kind checking. For instance, the identify argument beneath is required to be a string.

import Element from '@glimmer/part';
import { arg } from 'ember-arg-types';
import { string } from 'prop-types';

export default class CharacterComponent extends Element {
  // `identify` string arg that's required
  @arg(string.isRequired)
  identify;
}

Attempt it out at this time by ember putting in ember-arg-types!


Vasanth (@vasind) collated a listing of all Ember CLI enhancements for Ember functions as a GitHub gist. He showcased enhancements to the ember-cli-build.js that velocity up construct instances for growth and take a look at environments, whereas retaining the appropriate configurations in manufacturing. He additionally added recommendations on optimizing functions utilizing Mirage. Head out to his gist to test them out!


A set of new betas for Glimmer.js 2.0.0 (beta.1 && beta.3) have been launched! 🔥🔥🔥

The releases incorporate some thrilling new developments together with a brand new minimal renderComponent API, a template import primarily based design, a standardized construct primarily based on plain JavaScript modules, a brand new Glimmer.js app blueprint, and assist for customized helpers and modifiers. The standardized construct emulates the targets of Embroider in Ember.js and unlocks the flexibility to make use of no matter customized construct pipeline you may want (WebPack, Parcel, Rollup, and so forth.)!

The Glimmer.js betas may pave the way in which for what we’d wish to do in Ember.js, and even what we’d not wish to do in Ember.js. Please be aware that these new Glimmer.js betas are undoubtedly experimental. 🔬🧪 Have enjoyable exploring them 🤠, however hold this in thoughts when contemplating them to be used in your utility.


Hope everyone seems to be properly and caring for themselves! 💞 In case you have ~quarter-hour to spare, you may watch a current discuss from EmberATX:

Specifically, please take a look at the brand new addon, ember-printable-pages! You possibly can write declarative templates and reuse parts to create printable pages for finish customers. It additionally helps progressive rendering to supply a clean person expertise when the top person must print a whole bunch of pages. 💯


This week we would prefer to thank @locks, @Gaurav0, @rwwagner90, @Robdel12, @skaterdav85, @somasuna, @rwjblue, @pzuraq, @brendenpalmer, @sharpshark28, @sivakumar-kailasam, @chancancode and @SYU15 for his or her contributions to Ember and associated repositories! 💖


Office Hours Tomster Mascot

Questioning about one thing associated to Ember, Ember Knowledge, Glimmer, or addons within the Ember ecosystem, however do not know the place to ask? Readers’ Questions are only for you!

Submit your personal quick and candy query below bit.ly/ask-ember-core. And don’t fear, there aren’t any foolish questions, we recognize all of them – promise! 🤞


Wish to write for the Ember Occasions? Have a suggestion for subsequent week’s problem? Be a part of us at #support-ember-times on the Ember Group Discord or ping us @embertimes on Twitter.

Carry on prime of what is been occurring in Emberland this week by subscribing to our e-mail e-newsletter! It’s also possible to discover our posts on the Ember weblog.


That is one other wrap! ✨

Be sort,

Chris Ng, Abhilash, Jessica Jordan, Jared Galanis, Isaac Lee, Amy Lam and the Studying Group



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments