Re: [w3c/webcomponents] The is="" attribute is confusing? Maybe we should encourage only ES6 class-based extension. (#509)

@matthewrobb I definitely feel composition patterns are useful and a very good option in various cases, but to force management and interaction across an element tree, vs simply leveraging native elements and their existing protos directly, results in suboptimal ergonomics and various other issues I listed. Within the X-Tag community, we have suggested composition from time to time for devs who faced issues in this vein. The reaction from developers using the library consistently sounded like this: "Ok, that's pretty gross and not what I would choose if I could, but I guess we'll have to deal with it."

I believe the approach here should be "Yes, and". Something like `is` clearly provides a logical and ergonomic way to leverage native elements for a significant portion (if not majority) of direct extension cases, without forcing devs to recreate countless API and interaction combinations in their own code. This bears careful consideration: one reason you really want devs to use native elements and do a little roll-your-own native recreation/composition as possible is that the outcome tends to be an Uncanny Valley of sorts, where users are constantly confronted with elements that appear to be native, but act in slightly different ways than expected. That said, other scenarios may benefit from the APIs/specs folks like @rniwa mentioned, or as you noted, a composition-style strategy.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/509#issuecomment-281001645

Received on Monday, 20 February 2017 06:55:09 UTC