Skip to content

Un-mixin ReactBrowserComponentMixin from ReactTextComponent #1598

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

Merged
merged 1 commit into from
Sep 27, 2014
Merged

Un-mixin ReactBrowserComponentMixin from ReactTextComponent #1598

merged 1 commit into from
Sep 27, 2014

Conversation

syranide
Copy link
Contributor

ReactTextComponent having getDOMNode is an implementation detail, it's also very likely that it won't support it in the future (and since it's technically not always a span, it's even wrong in some sense today).

PS. Can you even access it today without cheating your way in and using private members? I don't think so...

@zpao
Copy link
Member

zpao commented May 27, 2014

@jwalke @sebmarkbage

@sebmarkbage
Copy link
Collaborator

Yea that seems right. No rush since you can't get a handle on this anyway, right?

@syranide
Copy link
Contributor Author

@sebmarkbage Not legitimately anyway.

@zpao
Copy link
Member

zpao commented Aug 13, 2014

Anything more need to be done here besides rebase? We apparently took that "no rush" to heart…

@syranide
Copy link
Contributor Author

Doubt it, but I'll run some tests and verify that nothing breaks.

@syranide
Copy link
Contributor Author

Rebased.
Test plan: grunt test and manually interacting with our application

EDIT: Might be worth sticking this in the changelog too, if someone for some reason was calling getDOMNode() on text instances in their tests. I don't see why they would and it would break in the future regardless (when the text node span is gone / spicyj's PR to change it from wrapping to prepending).

.toBeTextComponent()
.instance();

var textNode = d.getDOMNode().childNodes[i].firstChild;
Copy link
Member

Choose a reason for hiding this comment

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

Lint complains that textNode is already defined, want to fix that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No... but I fixed it anyway ;)

zpao added a commit that referenced this pull request Sep 27, 2014
Un-mixin ReactBrowserComponentMixin from ReactTextComponent
@zpao zpao merged commit 778ca2f into facebook:master Sep 27, 2014
@syranide syranide deleted the nogettext branch September 27, 2014 08:18
zpao added a commit to zpao/react that referenced this pull request Oct 8, 2014
It's no longer used as of facebook#1598, which just missed the require.

Test Plan: build, jest
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