ember-learn / ember-learn/ember-cli-addon-docs

Clean up `name` argument usage in docs-demo component

Open
#183 9 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
172
Forks
142
PR merge metrics
No merged PRs in 30d

Description

Couple of issues I'm having with the `name` argument for the docs-demo:

1. I get `Attempted to register a view with an id already in use: example-undefined` a lot, because I forget to add a name. If a name is required, we should assert that it exists when the component is rendered.

2. It seems very verbose to require a name, and then (generally) require each snippet to set its names as well. Could we use the `name` argument to infer the snippets for the demo? Possibly allowing us to just pass in `type` to each snippet?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.