Prefix Ionic directives with 'ion-'
We are debating whether to add prefixes to Ionic directives. So, instead of doing
<side-menus> it would be <ionic-side-menus> or <ion-side-menus>. Nav router would be <div ionic-nav-router> or <div ion-nav-router> instead of <div nav-router>.
The arguments for making the change is it makes it more clear which directives are ionic-powered, and which ones aren't. Also it reduces the possibility of clashes with other directives from other libraries.
The arguments against are that it adds extra clutter, makes the code less pretty IMO, and might not be necessary if Ionic has most of the features we need.
We'd love to hear thoughts and opinions on this change.
Not really necessary in my opinion - less typing and it's unlikely that you'll run into collisions - when will you ever have two side menus?
Yep I am thinking the same thing. Ionic is gonna be the main framework used in an app, I didn't see any possible collisions so far with other components.
Thanks for the input! I'm on the same page as well
On Dec 16, 2013, at 6:50 PM, Didier Baquier [email protected] wrote:
Yep I am thinking the same thing. Ionic is gonna be the main framework used in an app, I didn't see any possible collisions so far with other components.
— Reply to this email directly or view it on GitHub.
Please reconsider this decision:
- It's inconsistent with the decision in #380
- Conflicts with many ui widgets and libraries out there. Maybe not right now, or for the ones you looked at, or whatever, but it will conflict.
- It is very easy to tell where a directive came from when its prefixed (think of apps 6 months down the line with new dev team). "Is that our custom side menu, or ion's side menu, or the foobaz side menu?"
I see a lot of big UI frameworks failing to prefix and its really bothersome because you can't mix and match them. It's just too confusing/dangerous.
@ewinslow sorry for the confusion, we already decided to prefix with $ionic. Or were you referring to something else?
Services are prefixed. Directives are not, according to this ticket
@ewinslow as mentioned before though, would anyone really be using another main framework besides Ionic?
Good point #3 though about new dev team.
They might not use a "main one" but any framework that provides similar directives will conflict. On Feb 7, 2014 3:46 PM, "adhsu" [email protected] wrote:
@ewinslow https://github.com/ewinslow as mentioned before though, would anyone really be using another main framework besides Ionic?
Good point #3 https://github.com/driftyco/ionic/issues/3 though about new dev team.
Reply to this email directly or view it on GitHubhttps://github.com/driftyco/ionic/issues/333#issuecomment-34519696 .
+1 for prefixing. Even Angular core directives have the ng-.
I'm down for it. One benefit is it makes it clear which directives do something. Maybe ion-tabs or ionic-tabs or something else. Thoughts @adamdbradley @ajoslin ?
:+1: for ion- directive prefix.
On Sat, Feb 8, 2014 at 2:43 PM, Max Lynch [email protected] wrote:
I'm down for it. One benefit is it makes it clear which directives _do_something. Maybe ion-tabs or ionic-tabs or something else. Thoughts @adamdbradleyhttps://github.com/adamdbradley @ajoslin https://github.com/ajoslin ?
Reply to this email directly or view it on GitHubhttps://github.com/driftyco/ionic/issues/333#issuecomment-34553698 .
It would also be cool to link people to a script which they could run to migrate their projects (the same one we'd write to search/replace the source).
On Sat, Feb 8, 2014 at 2:44 PM, Andy Joslin [email protected] wrote:
:+1: for
ion-directive prefix.On Sat, Feb 8, 2014 at 2:43 PM, Max Lynch [email protected]:
I'm down for it. One benefit is it makes it clear which directives _do_something. Maybe ion-tabs or ionic-tabs or something else. Thoughts @adamdbradleyhttps://github.com/adamdbradley @ajoslin https://github.com/ajoslin ?
Reply to this email directly or view it on GitHubhttps://github.com/driftyco/ionic/issues/333#issuecomment-34553698 .
You guys are great for reconsidering this. Maybe it would make sense to reopen this issue?
I think we should do this and vote for ion-
:+1: Great decision. I vote for ion-
I vote for ion as well. It's kind of fun, like little ions all over the page!
Oh and @ewinslow, I like to think we are somewhat reasonable people ;)
:). Now if I can get you to prefix the classes too, that would really seal the deal!
@ewinslow I said somewhat reasonable, that's just ludicrous! ;)
Guess I better go make my case then...