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

Add #_setAttributes and clean up #setElement. #20

Merged
merged 1 commit into from
Mar 15, 2014
Merged

Add #_setAttributes and clean up #setElement. #20

merged 1 commit into from
Mar 15, 2014

Conversation

braddunbar
Copy link

Setting attributes and setting the element are distinct operations. It's telling that we had to pass the argument through two methods before using it. Further, it will complicate future additions to the #setElement API.

I realize it's another method that needs to the overwritten but it's a distinct operation and I think we'll regret conflating the two.

@akre54
Copy link
Owner

akre54 commented Mar 14, 2014

Further, it will complicate future additions to the #setElement API.

What extras could setElement have? Keeping 3003 simple and tiny is a huge win here.

@braddunbar
Copy link
Author

Keeping 3003 simple and tiny is a huge win here.

This is great to hear as I agree completely! 😃 That said, I think that passing attributes through an unrelated function just so that we can then pass it to another unrelated function is the more complex option.

What extras could setElement have?

This seems like an odd thing to say when submitting a pull request that itself adds extras to setElement. I imagine we thought the same thing when we added delegate as a boolean argument. We just dodged that bullet, let's do it the first time this go 'round.

@akre54
Copy link
Owner

akre54 commented Mar 15, 2014

Fair nuff

akre54 added a commit that referenced this pull request Mar 15, 2014
Add #_setAttributes and clean up #setElement.
@akre54 akre54 merged commit 1d6eb7a into akre54:view-native-hooks Mar 15, 2014
@braddunbar braddunbar deleted the view-hooks branch March 15, 2014 13:03
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