-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[LeftNav] rename to SideNav #2697
Comments
I agree with this. 👍 This also goes along with our general strategy to better rename our components to match the spec, as the spec would call this a Side nav. We may even want to consider deprecating |
Noticed that with react-native it's called |
It's Stateless Functional Components all over again 😞 |
Haha, It's also worth mentioning that the spec also calls this a Navigation drawer. Or rather, a type of Side nav is the Navigation drawer. I'm open to any of those names, but still agree with @mbrookes originally sentiment regarding the term "Left" is confusing because it can open from both sides. @alitaheri How about |
I agree with @mbrookes. The name is not very intuitive. How about NavigationDrawer with @newoga If we decide on that name I will set React on fire 😆 😆 |
@mbrookes Well in case of RTL language the <TARGET_NAME> will have to open from the right side. It's usually like that. everything flips! but some may want their <TARGET_NAME> component to open from the opposite side (it being rtl or ltr). So I think the component should be made a bit smarter to react to language direction. yet allow interception with |
@alitaheri - sorry for the confusion, I was referring to your Stateless Functional Components comment, but by the time I submitted my comment, the conversation had moved on, so I deleted it. Understand re RTL - @newoga had suggested openSecondary, which matches the language in the spec. Regarding the overall component naming, Drawer to me says it opens and closes, where as it can be fixed (but yes, the spec also describes a fixed drawer!). SideNav seems to describe the general case better I think (although it has a slight air of fixedness about it that doesn't totally capture the default sliding behavior). So, I dunno - either works better than LeftNav! |
@mbrookes Yeah either one is good, I'm ok with both. and if openSecondary is the convention then sure 😁 |
I agree. But I'm confused:
Should we vote 🎫? |
I vote The material spec isn't exactly clear or perfect when distinguishing betweens patterns and components. But for this, they use the term Side nav in their layout documentation, and Navigation drawer in their patterns documentation (I take it that Navigation drawer is one possible implementation of the Side nav). Since the way a typical material-ui user would implement a navigation drawer is using a combination of the SideNav and maybe nested menu components, I vote for This is a similar issue between |
MDL confuses me a lot because it seems at times to invent new terms for things in the spec. Mmm... |
There are quite a few ambiguities and even straight up contradictions in the spec, not just naming / terminology, (It's a shame it isn't open source, or at least had an 'issues' tracker somewhere), but the more I read these particular sections the more confused I become. "Side nav bars may be pinned for permanent display, or they can float temporarily as overlays. Temporary nav drawers overlay the content canvas; whereas pinned nav panels" ref So generically it's a "Side nav bar", if it's temporary it's a "Nav drawer", and if it's pinned it's a "nav panel"? No, if it's permanent it's a "navigation drawer": "Permanent navigation drawers are always visible and pinned to the left edge, at the same elevation as the content or background. " ref Except: "Persistent navigation drawers can toggle open or closed." ref WTF?! So when is a drawer not a drawer, and is this component an example of one? What if in the future we want to support the mini version, and maybe transitioning from mini to full size, or one of the other variants? If this is the definitive "drawer" component, will one component have to support that? All this just to rename a component? I wish I hadn't asked! 😆 PS. @newoga Funny you should mention Toolbar vs AppBar - I noticed the same thing as I was going back and forth over the spec. I think there's an open issue around that topic. |
@mbrookes Haha! That gave me a good laugh. 😆 I feel your pain.
I feel the same way. As a general rule, I think we should do our best to "honor" the spec but we shouldn't kill ourselves in an attempt to conform to it perfectly. Based on my personal experience reading the spec, I'm thoroughly convinced that a 1-1 mapping is going to be impossible 😆 (and I really think that it's okay if we don't). That all being said, I do think material design (and its spec) is much more than the framework or the components. It's also about how you use them appropriately (something that material-ui can't enforce). The best example I can think of is the floating action button. Just because that material-ui framework makes making floating action buttons easy, it doesn't mean that you should put a dozen floating action buttons on the same page. I think it is worthwhile to encourage developers that use material-ui to become knowledgable of the spec and using close/similar naming conventions will help them transfer knowledge between the spec and this project more easily. For example, I think both |
I'm against sticking exactly to the specs. After all they are only guidelines in my opinion, it's good to follow conventions but we shouldn't limit ourselves to them. I like |
I agree. I vote for
In the same spirit. I think that our existing |
To throw more stones into the water, it's Android that uses I'm beginning to believe you can name a component whatever you like as long as it is stated that it implements a certain Material design pattern. |
So how about just |
Drawer seems a lot nicer than all the other dialects of Drawer :D :D But I for one would be confused. English is not my native language and simpler words such as SideBar SideNav or LeftNav make more sense to me. I think it would also apply to every other nationality as well. I find SideNav very precise in describing the behavior of this component. But if we decide that the name should contain Drawer, then Drawer itself is perfect 👍 👍 |
Of those choice SideBar seems most descriptive and least prescriptive.
Did someone suggest a taking vote? 😆 |
@mbrookes That quote xD voting seems good. any good pooling service you know of we go and easily vote? or just plain ol' 👍 |
Hope I captured the main options: |
Haha, I suppose the worst thing that could happen (that won't happen) is we get into a fiery angry debate and we all create our own forks with different names for this component 😅. Thanks for making the survey @mbrookes, I'll be sure to vote soon. But first out of curiosity: @oliviertassinari, if you were to make this component for react-native, would it re-use/wrap react native's |
😀 I hope not! If there's a clear preference, we go for it, if not, we can have another go around. You can revisit and change your order of preference if you change your mind, or are undecided / ambivalent about any of the options. |
I think that we can simply use the |
@shaurya947 @hai-cea @Zadielerick - your input would be welcomed! |
Last call for votes. I'll close the survey and publish the results tomorrow. |
So, the results are in, and the winner is... (Drumroll please)... 🎈 🎉 SideNav! 🎉 🎈 So after all that, we're back to the original proposal! 😲 SideNav:
There were 6 responses. The choices were randomised (with only LeftNav being shown last). While I could see the results, I voted first and didn't change my vote afterwards. (And FWIW, after taking all the feedback into account, I didn't vote SideNav first in the end - if I had, it would have come out even higher!) So, there you have it. Let the fights commence! ( ) |
😆 😆 😆 I like SideNav 😁 👍 |
I don't know what the current verdict is, but I definitely prefer One of the primary reasons is that the I understand that it can be fixed, but remember that is desktop only and material design is device agnostic at it's core, not a desktop layout system. Also, I strongly agree with @oliviertassinari's assertions RE the |
@newoga has WIP on that. |
Guys can we move this to the 0.15.0 release? @callemall/material-ui I wanna compose another alpha. |
@alitaheri makes sense if the directory and file re-org is being done for |
Ok then 😁 |
@oliviertassinari Raised a very good point against using @mbrookes I vote +1 for |
|
@alitaheri haha, too long! Oli's main concern was that the |
Hmmmmm Yeah! I agree with you 👍 👍 You've whipped my vote 😆 So |
@alitaheri I think that is better than |
@alitaheri Also, For eg, with |
I really don't know 😆 Let's call it |
@alitaheri Not |
I'm ok with both, but I like less typing 😆 |
Guys, I'm happy with Either way, I also good getting this in for this upcoming release 👍 |
@newoga Let's do it then! Who's doing the rename? Remember to tend to docs, examples, etc. |
Rename `LeftNav` component to `Drawer` to better reflect the MD Spec and broader use cases than navigation. Also rename `openRight` propery to `openSecondary` to make RTL use less confusing. Update docs site examples to use the new component, and update wording. Rename docs site `AppLeftNav` to `AppNavDrawer`, and rename all internal functions. Closes mui#2697.
Rename `LeftNav` component to `Drawer` to better reflect the MD Spec and broader use cases than navigation. Also rename `openRight` propery to `openSecondary` to make RTL use less confusing. Update docs site examples to use the new component, and update wording. Rename docs site `AppLeftNav` to `AppNavDrawer`, and rename all internal functions. Closes mui#2697.
Thanks for renaming this to Drawer, makes a lot of sense to me! |
Good choice |
Just a thought - given that this component can be opened on the left or right, LeftNav is a bit of a misnomer.
Since component files are being renamed to
PascalCase
, it would seem like a good opportunity to also rename the component itself.There will still only be one deprecation warning, and users will be free to import as LeftNav from
material-ui/lib/SideNav
(or from deprecatedmaterial-ui/lib/left-nav
) if doing so makes migration easier than renaming instances of LeftNav in use.If this seems reasonable, I'll make a PR.
The text was updated successfully, but these errors were encountered: