[go: up one dir, main page]

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

Allow wrap attribute in textarea #4237

Merged
merged 1 commit into from
Jul 13, 2015
Merged

Allow wrap attribute in textarea #4237

merged 1 commit into from
Jul 13, 2015

Conversation

jas14
Copy link
Contributor
@jas14 jas14 commented Jun 27, 2015

See #4226

@jimfb
Copy link
Contributor
jimfb commented Jun 27, 2015

lgtm, cc @spicyj

@zpao
Copy link
Member
zpao commented Jun 28, 2015

This should be added to htmlpropertyconfig, not here. @jimfb can you follow up with the details and confirm the testing is done right (look at other PRs for my comments about testing property vs attribute)

@sophiebits
Copy link
Collaborator

Thanks @zpao, I hadn't gotten a chance to look.

@jas14
Copy link
Contributor Author
jas14 commented Jun 28, 2015

It seems like this new attribute should be covered by existing generic tests i.e. renderers/dom/shared/__tests__/ReactDOMComponent-test.

But since this attribute only has two legal values (hard and soft) and is specific to textareas, would it make sense to instead add this as a sort of pass-through property that has to meet the aforementioned invariants before it is set as a DOM attribute?

@sophiebits
Copy link
Collaborator

No, it's fine to just add it to the list of supported properties and not add a unit test, but you should test manually:

Are you able to make a local build and test that this property works correctly? It's important that both the initial render and updating the property work as those exercise different codepaths.

@jas14
Copy link
Contributor Author
jas14 commented Jun 28, 2015

Yep, just built successfully and used it to both initially render and update the attribute. I can post the snippet if you want.

@jimfb
Copy link
Contributor
jimfb commented Jul 2, 2015

It looks like this field can be either a property or an attribute (eg. https://msdn.microsoft.com/en-us/library/ms535152(v=vs.85).aspx), so should we be using MUST_USE_ATTRIBUTE or null here or does it not matter @spicyj ?

@sophiebits
Copy link
Collaborator

If both work for updates, null is best.

@jimfb
Copy link
Contributor
jimfb commented Jul 6, 2015

@jas14 Let's use null unless there is a browser that requires it to be an attribute. Also, we need to rebase due to merge conflict. Otherwise, looks good to go.

@zpao
Copy link
Member
zpao commented Jul 13, 2015

Cool. Can you squash these to a single commit? Then we can merge.

@zpao
Copy link
Member
zpao commented Jul 13, 2015

Thanks!

zpao added a commit that referenced this pull request Jul 13, 2015
Allow wrap attribute in textarea
@zpao zpao merged commit 64dafb1 into facebook:master Jul 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants