Skip to content
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

[Glimmer2] Migrating hash helper #13093

Closed
wants to merge 1 commit into from

Conversation

chadhietala
Copy link
Contributor

This migrate the hash helper to glimmer2 and moves tests over as well. As a result I remove a contextual-component flag that was still in the hash tests. This also adds tests for yielding a hash which was not covered at all 😄 /cc @chancancode


this.runTask(() => set(this.context, 'firstName', 'Sergio'));

this.assertText('Sergio Arbeo');
Copy link
Member

Choose a reason for hiding this comment

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

Should test resetting to Marisa after this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@chancancode
Copy link
Member

I think we probably want to leave the htmlbars implementation alone (i.e. duplicating the code, instead of symlinking). The final implementation of the glimmer version will probably be a bit different.

(I think we ultimately want to implement it as an "internal" helper like inline if/unless, where the helper gets the EvaluatedArgs instead of the values, so we can avoid re-ifying the keys that are not actually used.)


this.assertText('Balint');
}
});
Copy link
Member

Choose a reason for hiding this comment

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

New line between L89/90 to balance L6

@chancancode
Copy link
Member

Other than those line comments and the symlink issue, looks great to me! (We don't have to do the internal helper optimization now, unless you want to.)

@@ -7,67 +7,65 @@ import { runAppend, runDestroy } from 'ember-runtime/tests/utils';

var view;

if (isEnabled('ember-contextual-components')) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was introduced in 2.3.0. The rest of changes in this file are just formatting.

@chancancode
Copy link
Member

@chadhietala sorry :/ I was only saying that we should keep the implementation separate, what you did with the tests before was just fine

@@ -32,4 +27,4 @@

export default function hashHelper(params, hash, options) {
return hash;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

@chadhietala
Copy link
Contributor Author

@chancancode Won't we loose the test coverage there for some period time then? Maybe I don't understand.

return hash;
}

export default helper(hash);
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is a line here. Probably a github issue.

@chadhietala chadhietala force-pushed the hash-helper branch 3 times, most recently from f9577bd to 78baff4 Compare March 12, 2016 20:14
}

['@test should yield hash of external properties']() {

Copy link
Member

Choose a reason for hiding this comment

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

✂️

This migrate the hash helper to glimmer2 and moves tests over as well.
As a result I remove a contextual-component flag that was still in the
hash tests. I also added tests for yielding a hash which was not
covered by any tests.
chancancode added a commit that referenced this pull request Mar 12, 2016
[Glimmer2] Migrating hash helper
@homu
Copy link
Contributor

homu commented Mar 12, 2016

☔ The latest upstream changes (presumably #13093) made this pull request unmergeable. Please resolve the merge conflicts.

@chancancode
Copy link
Member

Merged in 0e8e343

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