Early Signature API design:
type Positional<T> = [name: T];
type Return<T> = EmberComponent<{
Element: T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element;
Blocks: { default: [] };
}>;
export interface ElementSignature {
Early Signature API design:
type Positional<T> = [name: T];
type Return<T> = EmberComponent<{
Element: T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element;
Blocks: { default: [] };
}>;
export interface ElementSignature {
With ember addons v2, dummy and addon code are separated. Which allow us to have a package for each and additionally one more packge for documentation, etc.
Simon Ihmig wrote how to migrate a repo for a single addon to a monorepo.
But how organize your projects if this is already a monorepo and many addons are in there? Where to put the test-apps for each such addon?
import Component from '@glimmer/component'; | |
import { action } from '@ember/object'; | |
export default class extends Component { | |
@action | |
doSomething() { | |
console.log(this.args.context); | |
} | |
} |
Given the WAI ARIA authoring practices tell you quite good how a particular widget shall behave. What - in case you are developing such a widget as a glimmer component - if you want to write tests for them? What if there is an already ready library of tests to use for them? If you as a developer did a good job and have all the markup done properly, the tests can entirely work on the accessibility tree on top of your markup. If not, the tests will fail anyway.
What about having an ember addon, that provides this a11y test library? In case you are developing a new component, you take that library and throw their tests at your code, without ever writing them yourself and be assured your component is a11y compliant. That library would do a service to the whole ember community.
Here is an example, I've just finished writing. It is the first iteration, I found it quite well and useful and lead me to writing this. Basically, I was
Text w/ Date: <input type="text" inputmode="date"> | |
Text w/ Numeric: <input type="text" inputmode="numeric"> | |
Date: <input type="date"> |
import Controller from '@ember/controller'; | |
import { action } from '@ember/object'; | |
export default class ApplicationController extends Controller { | |
appName = 'Ember Twiddle'; | |
@action | |
sayHello() { | |
console.log('hellooooooo'); | |
} |