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

Expose isSerializationFirstNode and SERIALIZATION_FIRST_NODE_STRING #788

Conversation

rondale-sc
Copy link
Contributor

This exposes a mechanicsm that can be used in all the places in ember.js
/ fastboot and anywhere it might be necessary to determine whether or
not a given node is the first serialization node. Which is useful to
ensure that the actual format can change without affecting the other
libaries who will be able to use this instead of a magic string.

The rationale for this PR can be found in greater detail at the issue
below:
#787

This exposes a mechanicsm that can be used in all the places in ember.js
/ fastboot and anywhere it might be necessary to determine whether or
not a given node is the first serialization node.  Which is useful to
ensure that the actual format can change without affecting the other
libaries who will be able to use this instead of a magic string.

The rationale for this PR can be found in greater detail at the issue
below:
glimmerjs#787
@rondale-sc
Copy link
Contributor Author

I wanted to expose a function that could be used to better insulate future changes rather than only export a constant.

@rondale-sc
Copy link
Contributor Author

This is immediately relevant to the following PRs

ember-fastboot/ember-cli-fastboot#580

and

ember-fastboot/fastboot#185

rondale-sc added a commit to rondale-sc/ember.js that referenced this pull request Feb 27, 2018
This is dependent on this glimmer-vm PR to actually work glimmerjs/glimmer-vm#788. Which means we'll need to wait until it is merged/bumped and Ember itself updates to use the release with it in it before we can land this.

The idea here is to insulate things that depend on the magic string we use to determine whether or not the DOM node we pass was produced by the serialization element builder.

This needs to be exposed on the global to ensure we can use it in the ember-cli-fastboot vendor file so we can determine how to boot the app when it is loaded in the browser.

To see where it'd be used in ember-cli-fastboot please see this PR with the in progress work:

ember-fastboot/ember-cli-fastboot#580
rondale-sc added a commit to rondale-sc/ember-cli-fastboot that referenced this pull request Feb 27, 2018
This is dependent on glimmerjs/glimmer-vm#788

The idea is to use a function exported by ember-glimmer rather than rely
on magic glimmer-vm string.
@rwjblue rwjblue merged commit 61f2046 into glimmerjs:master Mar 1, 2018
rondale-sc added a commit to rondale-sc/ember.js that referenced this pull request Mar 6, 2018
This is dependent on this glimmer-vm PR to actually work glimmerjs/glimmer-vm#788. Which means we'll need to wait until it is merged/bumped and Ember itself updates to use the release with it in it before we can land this.

The idea here is to insulate things that depend on the magic string we use to determine whether or not the DOM node we pass was produced by the serialization element builder.

This needs to be exposed on the global to ensure we can use it in the ember-cli-fastboot vendor file so we can determine how to boot the app when it is loaded in the browser.

To see where it'd be used in ember-cli-fastboot please see this PR with the in progress work:

ember-fastboot/ember-cli-fastboot#580
rondale-sc added a commit to rondale-sc/ember-cli-fastboot that referenced this pull request Mar 7, 2018
This is dependent on glimmerjs/glimmer-vm#788

The idea is to use a function exported by ember-glimmer rather than rely
on magic glimmer-vm string.
rondale-sc added a commit to rondale-sc/ember-cli-fastboot that referenced this pull request Mar 10, 2018
This is dependent on glimmerjs/glimmer-vm#788

The idea is to use a function exported by ember-glimmer rather than rely
on magic glimmer-vm string.
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.

2 participants