-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update autocomplete-component.md #58
base: master
Are you sure you want to change the base?
Conversation
|
||
#### Providing Markup to a Component | ||
#### Atualizando as declarações de componente |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preciso pensar em uma tradução melhor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marcações de Component
?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Achei meio estranho esse texto, não me pareceu dizer nada de útil.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
especifica
p/ específica
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aureliosaraiva Acho que dá para remover o inside e só deixar o dentro
@@ -62,16 +62,14 @@ We want the component to simply provide an input field and yield the results lis | |||
{{yield results}} | |||
``` | |||
|
|||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Observer
p/ Observe
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
os teste
p/ os testes
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nós adicionaremos algumas funcionalidades adicionais
p/ Nós incluiremos algumas funcionalidades adicionais
|
||
### Acceptance Tests | ||
Agora, ambos os cenários de teste de integração devem está passando. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devem está passando
p/ devem estar passando
@@ -496,27 +481,22 @@ test('should filter the list of rentals by city.', function (assert) { | |||
}); | |||
``` | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
o número de imóvel é um
p/ o número de imóvel é 1
Issue: #3
autocomplete-component.md