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

[DO NOT MERGE] Glimmer 2 Final Countdown #13316

Closed
wants to merge 1 commit into from

Conversation

chadhietala
Copy link
Contributor

@chadhietala chadhietala commented Apr 12, 2016

Update

Markdown file did not pan out. There was much confusion on what tasks were taken. So what is the plan? I have migrated all of the tasks and relevant information to a Trello board 😱 . No worries you do not need to signup for Trello or any of that nonsense. Please continue 🔒 ing things by just commenting on this PR along with the link to the trello board. Example:

Hey everyone I'm going to take https://trello.com/c/pR3KtDCH/20-ensure-falsy-values-do-not-become-class-names 🔒 .

I will then personally go move the card to "In Progress". Hopefully this is not too much burden and will actually result in clear direction of "what needs to be done".

Thanks everyone!

Board
https://trello.com/b/6C6i3eGV/glimmer-2


This is the 🔥 🔥 🔥 burn down 🔥 🔥 🔥 issue to ship Glimmer 2. While there are still in flight PRs, this is known state of the world at SHA b418b95.

Awesome 80s hair band

We are experimenting on using a temporary Markdown instead of a regular checklist so that we can add line comments for each item. Do not merge this pull request.

@chancancode chancancode changed the title WIP Final Countdown [DO NOT MERGE] Glimmer 2 Final Countdown Apr 12, 2016
![Awesome 80s hair band](http://vignette2.wikia.nocookie.net/degrassi/images/d/d4/Final-Countdown.gif)

# Macro Tasks
- [ ] Complete all test migration described in #13127
Copy link
Member

Choose a reason for hiding this comment

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


### Class Helper
- [ ] Should compute when params change: [Failing test](https://github.com/emberjs/ember.js/blob/b418b95ea3d31e3a3656906e6ad784422f648c31/packages/ember-glimmer/tests/integration/helpers/custom-helper-test.js#L147)
- [ ] Not usable in a block: [Failing test](https://github.com/emberjs/ember.js/blob/b418b95ea3d31e3a3656906e6ad784422f648c31/packages/ember-glimmer/tests/integration/helpers/custom-helper-test.js#L295)
Copy link
Member

Choose a reason for hiding this comment

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

- [ ] Implement `{{mut}}`
- [ ] Implement `{{textarea}}`: [Failing test 1](https://github.com/emberjs/ember.js/blob/b418b95ea3d31e3a3656906e6ad784422f648c31/packages/ember-glimmer/tests/integration/helpers/text-area-test.js#L15) [Failing test 2](https://github.com/emberjs/ember.js/blob/b418b95ea3d31e3a3656906e6ad784422f648c31/packages/ember-glimmer/tests/integration/helpers/text-area-test.js#L23) [Failing test 3](https://github.com/emberjs/ember.js/blob/b418b95ea3d31e3a3656906e6ad784422f648c31/packages/ember-glimmer/tests/integration/helpers/text-area-test.js#L36)
- [ ] Implement `{{each-in}}` [Failing tests](packages/ember-glimmer/tests/integration/syntax/each-in-test.js#L23)
- [ ] Implement `{{action}}`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • Implement {{action}}

@kiwiupover
Copy link
Contributor

There are a few {{yield}} test missing. {{yield foo}} at least. I will work on those tonight in #13213

@chadhietala chadhietala force-pushed the final-countdown branch 2 times, most recently from 57262af to d7682b6 Compare April 13, 2016 01:30
@mmun
Copy link
Member

mmun commented Apr 13, 2016

I will implement {{partial}}.

@chadhietala chadhietala force-pushed the final-countdown branch 4 times, most recently from c0564c9 to a6bc888 Compare April 14, 2016 00:22
- [ ] Implement remaining life-cycle hooks
- [ ] Implement custom Ids for curly component invocations: [Failing test](https://github.com/emberjs/ember.js/blob/b418b95ea3d31e3a3656906e6ad784422f648c31/packages/ember-glimmer/tests/integration/components/curly-components-test.js#L26)
- [x] Implement triple curiles #13329
- [x] Implement `htmlSafe` #13329
Copy link
Contributor

Choose a reason for hiding this comment

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

htmlSafe is not actually supported in double-curlies from what I can tell. The PR mentioned here only fixes the tests to make it possible to compare HTMLBars and Glimmer2 behavior side-by-side. The feature is still missing (and I'm trying to implement it).

Copy link
Member

Choose a reason for hiding this comment

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

You should look here: https://github.com/tildeio/glimmer/blob/master/packages/glimmer-runtime/lib/compiled/opcodes/content.ts

  1. The AppendOpcode is responsible for inserting the content during "initial render" (but this also applies to things like an {{#if}} changing from true to false, thus tearing down the block and rendering a different one). It needs to be updated to handle both safe and non-safe strings.
  2. The AppendOpcode emits an UpdateAppendOpcode that is responsible for keeping the curlies up-to-date when the content changes. It needs to remember which "mode" it was in previously and do the right thing. (Handling safe <-> non-safe strings, etc).
  3. You can look at how the "Trusting" versions of opcodes, which are for triple-curlies. You can probably refactor things to share more code.
  4. Keep in mind the "const reference optimization" as you do this: Implement ConstReference optimization glimmerjs/glimmer-vm#109
  5. Future work: we also need to support appending DOM nodes into the curlies (helpers etc can return DOM nodes to be inserted). But we can tackle that separately.
  6. Ideally, we would like to minimize the "mode switching" stuff by emitting specialized opcodes, but I couldn't think of any cases where we can know these information ahead of time (other than the const case, which simply does not emit updating opcodes).

@zackthehuman
Copy link
Contributor

I'm investigating htmlSafe.

### Curly Component

- [x] Ensure `elementId` cannot change: [Failing test](https://github.com/emberjs/ember.js/blob/b418b95ea3d31e3a3656906e6ad784422f648c31/packages/ember-glimmer/tests/integration/components/curly-components-test.js#L48)
- [ ] Ensure `classBinding` without a condition applies correctly: [Failing Test](https://github.com/emberjs/ember.js/blob/b418b95ea3d31e3a3656906e6ad784422f648c31/packages/ember-glimmer/tests/integration/components/curly-components-test.js#L176)
Copy link
Contributor

@asakusuma asakusuma Apr 14, 2016

Choose a reason for hiding this comment

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

I'm going to take a stab at this

EDIT: #13337

@chadhietala
Copy link
Contributor Author

Bump. Just want to notify everyone in this thread on the way we are going to track things going forward. Please read the initial comment for an update.

@zackthehuman
Copy link
Contributor

@locks locks added the Glimmer2 label Apr 19, 2016
@chadhietala
Copy link
Contributor Author

Closing in favor of #13644

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants