Conversation
| * and um arquivo contendo o teste de integração (`tests/integration/components/list-filter-test.js`). | ||
|
|
||
| #### Providing Markup to a Component | ||
| #### Atualizando as declarações de componente |
There was a problem hiding this comment.
Preciso pensar em uma tradução melhor.
| The `value` property of the `input` will be kept in sync with the `value` property in the component. | ||
|
|
||
| Another way to say this is that the `value` property of `input` is [**bound**](../../object-model/bindings/) to the `value` property of the component. | ||
| If the property changes, either by the user typing in the input field, or by assigning a new value to it in our program, |
There was a problem hiding this comment.
Achei meio estranho esse texto, não me pareceu dizer nada de útil.
There was a problem hiding this comment.
Acho que talvez seja útil sim, explica como funciona a sincronia dos valores em um componente. Apesar de simples, dá uma visão do binding
There was a problem hiding this comment.
Sim, o texto original traduzido é ruim, preciso pensar em um forma melhor de explicar isso em português.
There was a problem hiding this comment.
Entendi. Podemos traduzir e inserir algumas melhorias que façam mais sentido. Não sei, talvez algo como: Para manter o valor de uma propriedade atualizada, o Ember realiza o binding (link). Então, se uma propriedade trocar de valor, seja por uma ação do usuário ou seja por uma reatribuição via código, através do binding o Ember manterá o valor sincronizado com o que é apresentado para o usuário no component.. Não sei se são as melhores palavras, mas serve como um start
|
18 words might be misspelled, please check them: compenent, conveção, coresponde, disponiveis, disponivel, ESLint, fillIn, filterByCity, handleFilterEntry, hbs, ímoveis, init, keyEvent, keyup, keyUp, QUnit, testámos, toc |
|
17 words might be misspelled, please check them: compenent, conveção, coresponde, disponiveis, disponivel, ESLint, fillIn, filterByCity, handleFilterEntry, ímoveis, init, keyEvent, keyup, keyUp, QUnit, testámos, toc |
|
Teste |
|
18 words might be misspelled, please check them: compenent, compoente, conveção, coresponde, disponiveis, disponivel, ESLint, exeutando, fillIn, filterByCity, handleFilterEntry, ímoveis, init, keyEvent, keyup, keyUp, QUnit, testámos |
|
19 words might be misspelled, please check them: compenent, compoente, conveção, coresponde, disponiveis, disponivel, ESLint, exeutando, fillIn, filterByCity, handleFilterEntry, ímoveis, init, keyEvent, keyup, keyUp, prenche, QUnit, testámos |
|
19 words might be misspelled, please check them: compenent, compoente, conveção, coresponde, disponiveis, disponivel, ESLint, exeutando, fillIn, filterByCity, handleFilterEntry, ímoveis, init, keyEvent, keyup, keyUp, prenche, QUnit, testámos |
|
No spelling errors, congratulations! |
|
1 words might be misspelled, please check them: metodo |
|
No spelling errors, congratulations! |
|
@aureliosaraiva Estou revisando :) |
danilovaz
left a comment
There was a problem hiding this comment.
Achei algumas coisinhas para arrumar e algumas sugestões
| @@ -1,28 +1,28 @@ | |||
| As they search for a rental, users might also want to narrow their search to a specific city. | |||
| While our [initial](../simple-component/) rental listing component only displayed rental information, this new filter component will also allow the user to provide input in the form of filter criteria. | |||
| Quando nossos usuários estão procurando um imóvel, eles precisam filtrar a pesquisa por uma cidade especifica, por exemplo. | |||
| To begin, let's generate our new component. | ||
| We'll call this component `list-filter`, since all we want our component to do is filter the list of rentals based on input. | ||
| Para começar, vamos gerar o novo component. | ||
| Chamaremos esse component de `list-filter`, já que tudo o que precisamos é que ele filtre os imóveis disponível. |
There was a problem hiding this comment.
os imóveis disponível p/ os imóveis disponíveis
| * a JavaScript file (`app/components/list-filter.js`), | ||
| * and a component integration test (`tests/integration/components/list-filter-test.js`). | ||
| * um arquivo de template (`app/templates/components/list-filter.hbs`), | ||
| * um arquivo JavaScript (`app/templates/components/list-filter.hbs`), |
There was a problem hiding this comment.
(app/templates/components/list-filter.hbs) p/ (app/templates/components/list-filter.js)
| This is an example of the [**block form**](../../components/wrapping-content-in-a-component) of a component, | ||
| which allows a Handlebars template to be rendered _inside_ the component's template wherever the `{{yield}}` expression appears. | ||
| Observe que vamos envolver nossa listagem de imóveis dentro do component `list-filter`, nas linhas **12** e **20**. | ||
| Esse é um exemplo de [**block form**](../../components/wrapping-content-in-a-component), que permite que o template Handlebars seja renderizado _inside_, dentro do component `list-filter` na expressão `{{yield}}`. |
There was a problem hiding this comment.
@aureliosaraiva Acho que dá para remover o inside e só deixar o dentro
|
|
||
| The template contains an [`{{input}}`](../../templates/input-helpers) helper that renders as a text field, in which the user can type a pattern to filter the list of cities used in a search. | ||
| The `value` property of the `input` will be kept in sync with the `value` property in the component. | ||
| Observer que nosso template agora possui um novo tipo de helper [`{{input}}`](../../templates/input-helpers), ele funciona como um campo de texto, no qual nosso usuário poderá digitar uma cidade e filtrar o resultado de imóveis. |
| Para criar um comportamento de autocomplete eficaz e robusto para suas aplicações, recomendamos considerar utilizar o addon [`ember-concurrency`](http://ember-concurrency.com/#/docs/introduction). | ||
|
|
||
| You can now proceed on to implement the [next feature](../service/), or continue on to test our newly created filter component. | ||
| Agora você pode avançar para [próxima página](../service/) ou continuar nesta página e fazer os teste de integração e aceitação. |
|
|
||
| We'll add some additional functionality to our `filterByCity` action to additionally return a single rental, | ||
| represented by the variable `FILTERED_ITEMS` when any value is set. | ||
| Nós adicionaremos algumas funcionalidades adicionais à nossa action `filterByCity` para retornar um único imóvel, representado pela variável `FILTERED_ITEMS` quando qualquer valor estiver definido. |
There was a problem hiding this comment.
Nós adicionaremos algumas funcionalidades adicionais p/ Nós incluiremos algumas funcionalidades adicionais
| You can verify this by starting up our test suite by typing `ember t -s` at the command line. | ||
|
|
||
| ### Acceptance Tests | ||
| Agora, ambos os cenários de teste de integração devem está passando. |
There was a problem hiding this comment.
devem está passando p/ devem estar passando
| ``` | ||
|
|
||
| We introduce two new helpers into this test, `fillIn` and `keyEvent`. | ||
| Apresentamos dois novos helper neste teste, `fillIn` e` keyEvent`. |
There was a problem hiding this comment.
Tem um espaço a mais nokeyEvent aqui: e keyEvent.
|
|
||
| Since our data is hard-coded in Mirage, we know that there is only one rental with a city name of "Seattle", | ||
| so we assert that the number of listings is one and that the location it displays is named, "Seattle". | ||
| Uma vez que nossos dados estão codificados em Mirage, sabemos que existe apenas um imóvel na cidade de "Seattle", por isso afirmamos que o número de imóvel é um e que a localização exibida é chamada "Seattle". |
There was a problem hiding this comment.
o número de imóvel é um p/ o número de imóvel é 1
Issue: #3
autocomplete-component.md