Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[BUGFIX beta] {{get}} helper subscribes to values and can be updated#11691

Merged
mmun merged 1 commit intoemberjs:masterfrom
jmurphyau:new-get-helper-as-keyword
Jul 16, 2015
Merged

[BUGFIX beta] {{get}} helper subscribes to values and can be updated#11691
mmun merged 1 commit intoemberjs:masterfrom
jmurphyau:new-get-helper-as-keyword

Conversation

Copy link
Contributor

jmurphyau commented Jul 8, 2015

This PR fixes two issues:

1: When using the {{get}} helper it sometimes wouldn't update correctly.

Because a helper and a keyword are being used, Ember is invoking the helper logic and wrapping the stream the get keyword creates in a BuiltInHelperStream - it also would not subscribe the morph to the stream. This subscription is where the error lies.

To fix this the helper has been removed and only keyword logic is implemented.

2: It was previously not possible to use the {{input}} helper with the {{get}} helper

This functionality has now been added using the mut keyword, e.g:

{{input value=(mut (get source path)) type='text'}}

This should help with making progress on #4619.

mmun reviewed Jul 8, 2015
Copy link
Member

mmun Jul 8, 2015

Choose a reason for hiding this comment

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

Can you use back ticks instead of single quotes?

`{{input id='get-input' ...}}`

Copy link
Contributor Author

jmurphyau Jul 8, 2015

Choose a reason for hiding this comment

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

yep will do

jmurphyau force-pushed the new-get-helper-as-keyword branch 6 times, most recently from ff1ca3e to 37a39a4 Compare July 9, 2015 00:08
Copy link
Member

rwjblue commented Jul 16, 2015

Any updates here?

Copy link
Contributor Author

jmurphyau commented Jul 16, 2015

This should be good to go.. @mmun?

Just need to document it..

Copy link
Member

mmun commented Jul 16, 2015

I will merge this but I'm a little sad how complicated it has to be right now. Needs a rebase.

mmun self-assigned this Jul 16, 2015
This commit fixes two issues:

1. When using the {{get}} helper it sometimes wouldn't update correctly.

Because a helper and a keyword are being used, ember is invoking the helper logic and wrapping the stream the get keyword creates in a BuiltInHelperStream - it also would not subscribe the morph to the stream. This subscription is where the error lies.

To fix this the helper has been removed and only keyword logic is implemented.

2. It was previously not possible to use the {{input}} helper with the {{get}} helper - this functionality has now been added using the mut keyword, e.g:

{{input value=(mut (get source path)) type='text'}}
jmurphyau force-pushed the new-get-helper-as-keyword branch from 37a39a4 to de5446f Compare July 16, 2015 22:12
Copy link
Contributor Author

jmurphyau commented Jul 16, 2015

Rebase done. @mmun is there anything I should do to make it less complicated?

Copy link
Member

mmun commented Jul 16, 2015

It would require an HTMLBars refactor. Sauce failed, I'll restart it.

mmun added a commit that referenced this pull request Jul 16, 2015
[BUGFIX beta] {{get}} helper subscribes to values and can be updated
mmun merged commit 5226849 into emberjs:master Jul 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

mmun

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants