-
Notifications
You must be signed in to change notification settings - Fork 59
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
Change event attributes to on[EventName]
instead of data-on[eventname]
#124
Comments
Sure, I see the benefits and this should be doable. |
This is available already at metal-incremental-dom rc.43. Just make sure to update existing I'll update the site and the existing metal components now. |
Hey guys, I don't object to this change, but I don't think we can afford it right now... unless we fork our metal versions right now and this goes into a 2.x.x branch... this is going to make support a nightmare... We've been on a As a library, I don't think we can afford this kind of version system anymore. We already have released products depending on metal, so we need to take care of this and think these kind of changes some more. To top it off, |
The reason is the DOM browser native @jbalsas, we are trying to define all those APIs before final 1.0.0, if we release 1.0.0 with |
Hey @eduardolundgren, this kind of change it's not acceptable from We already shipped to Liferay Portal versions GA1 and GA2 that are now completely backwards incompatible with any future version of |
I totally agree with you that we can't afford this version system anymore :( I spent this week mostly trying to release a 1.0.0 version and the only thing left for that to happen was for the tests to all pass in all browsers. They're actually already passing, but there's a weird bug going on between karma and Chrome Mobile which I'm trying to fix before doing this, so I'm hoping to be able to finish this next week at most. Once that's done we'll be able to do changes like this without breaking everyone's code, which I agree is pretty bad :( As for this causing problems, I was a bit afraid of changing this as well, but with incremental dom the problem we had before doesn't exist anymore, like Eduardo said. I'm really really sorry this causes you problems. If it's too much trouble I can revert and we can try to release 1.0.0 with this instead. |
@jbalsas, Here are the options:
Which one do you prefer? I understand it's a late change, although is important to note that we are in |
Ok, I think we've reached a conclusion that's best for everyone. I'll revert this (sorry guys, I know some of you wanted to use it now, just wait a bit longer) and we'll add it back right before releasing 1.0.0. That way v1.0.0 will already contain this feature, but we won't risk break ing anything (like Liferay Portal). |
Ok, so that wasn't quite as good a conclusion as we first thought, since we need to be backwards compatible for liferay. So what we'll do instead is to support both syntaxes to avoid any problems. |
Yep, we support both syntax and |
Thanks guys, I really appreciate it. |
Done, metal-incremental-dom version rc.44 now supports both formats. |
Sorry guys, I’m missing something here for sure. I see no occurence of Am I wrong? |
Yeah, soy files did not get found by GH. Zorrie. |
It would be really nice if we did not have to prefix event attributes with
data-
. This is would be helpful for a number of reasons. It more closely resembles actual HTML event attributes, and would probably be more intuitive for developers coming from other frameworks.Another benefit, this would help us when naming functions that would be used as the value for these attributes. This is a bit contrived, but let's pretend I wanted to pass an object of attributes to an element:
Currently, when inspecting the result of a render, it looks like these attributes do not make it to the DOM. This would imply that they are being treated in a special way, and would also suggest that it may be possible to just do without the
data-
prefix now.Thanks, and I am very curious what others think.
The text was updated successfully, but these errors were encountered: