Skip to content

Update docs for the builtin components - #17810

Merged
chancancode merged 3 commits into
masterfrom
update-builtin-component-docs
Mar 29, 2019
Merged

chancancode merged 3 commits into
masterfrom
update-builtin-component-docs

Conversation

@wycats

@wycats wycats commented Mar 27, 2019

Copy link
Copy Markdown
Member

No description provided.

* form

When invoked with `{{input type="checkbox"}}`, you can only customize these attributes. When
invoked with `<Input @type="checkbox" />`, you can just use HTML attributes directly.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is somewhat confusing, because it seems to suggest you can do <Input type="checkbox" />

Search:
{{input value=searchWord}}
```
<Input @value={{this.searchWord}}>`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing backticks

});
```
In most cases, if you want to pass an attribute to the underlying HTML `<input>` element, you
can pass the attribute directly, just like any other Ember component.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A short example would be good here

element. When left unquoted, these values will be bound to a property on the
template's current rendering context (most typically a controller instance).
A very common use of this helper is to bind the `value` of an input to an Object's attribute:
If no `type` argument is specified, a default of type 'text' is used.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to say @type here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You suggested to me to remove the @s 😛


### Extending `TextField`

Internally, `<Input @type="text" />` creates an instance of `TextField`, passing arguments from

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TextField could use a link

classNames: ['my-app-checkbox']
});
```
Internally, `<Input @type="checkbox" />` creates an instance of `Ember.Checkbox`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need the same text as above?


See more about [Ember components](/api/ember/release/classes/Component)
/**
See Ember.Templates.components.Textarea.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this is missing a link

`layoutName` properties will not be applied.
The internal representation used for `Textarea` invocations.

@class TextArea

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did this get associated to @ember/component/text-area correctly? does it need a @for or something

@chancancode chancancode left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this mostly look good to me

@rwjblue

rwjblue commented Mar 28, 2019

Copy link
Copy Markdown
Member

Looks like the CI failure is needing to add these to tests/docs/expected.js

[
  "Input",
  "LinkTo",
  "Textarea"
]

@wycats
wycats force-pushed the update-builtin-component-docs branch from 21776ca to 0cc0047 Compare March 29, 2019 04:11
@chancancode
chancancode merged commit c401594 into master Mar 29, 2019
@chancancode
chancancode deleted the update-builtin-component-docs branch March 29, 2019 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants