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

Client transition dom #78

Merged
merged 7 commits into from
Apr 8, 2016
Merged

Conversation

gigabo
Copy link
Contributor

@gigabo gigabo commented Apr 6, 2016

Taking over responsibility for getting @doug-wade's awesome DOM preservation changes shepherded into master, since he's getting pulled in three different directions in his day job.

This is #70 with a few patches to get things working in some cases that didn't come up during the hackathon that spawned it.

@gigabo
Copy link
Contributor Author

gigabo commented Apr 6, 2016

BTW - As mentioned in doug-wade#2: Still need to deal with root container/element attribute differences, but probably should fix #73 first.

@gigabo gigabo closed this Apr 7, 2016
@gigabo gigabo deleted the client-transition-dom branch April 7, 2016 17:29
@gigabo gigabo restored the client-transition-dom branch April 7, 2016 17:29
@gigabo
Copy link
Contributor Author

gigabo commented Apr 7, 2016

Added some commentary to explain the DOM re-use strategy and hopefully help ease review here.

@gigabo gigabo reopened this Apr 7, 2016
@gigabo gigabo mentioned this pull request Apr 8, 2016
`div[${REACT_SERVER_DATA_ATTRIBUTE}="${index}"]`
);
var oldRootContainer = document.querySelector(
`div[${PAGE_CONTAINER_NODE_ID}="${index}"]`
Copy link
Member

Choose a reason for hiding this comment

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

Code style nit: defining these vars inside the if-statement with intent to use them outside. Works in JS, but is not what I would call expected. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pulled the declarations out next to the one for mountNode.

@roblg
Copy link
Member

roblg commented Apr 8, 2016

LGTM 👍 (with the exception of the vars-inside-if-block thing I left a comment on)

@gigabo gigabo merged commit 4f55d2b into redfin:master Apr 8, 2016
@gigabo gigabo deleted the client-transition-dom branch April 8, 2016 20:26
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