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

Implement Side Navigation v2 Component(s) #4476

Closed
4 tasks done
traviskaufman opened this issue Jun 29, 2016 · 5 comments
Closed
4 tasks done

Implement Side Navigation v2 Component(s) #4476

traviskaufman opened this issue Jun 29, 2016 · 5 comments

Comments

@traviskaufman
Copy link
Contributor

traviskaufman commented Jun 29, 2016

Spec reference: https://www.google.com/design/spec/patterns/navigation-drawer.html#

  • Navigation Drawer
  • Navigation "trigger" (an element that when interacted with should trigger the nav to open, maybe this is just a data-mdl-nav-open attribute on the body or something).
  • navigation overlay element (possibly)
  • Capable of being displayed on either side of the page.
@Download
Copy link

Please make sure this element will be easily externally controllable. In the v1 implementation, it is hard for some systems that don't work like jQuery to have only an external trigger element. We need some other mechanism (javascript function we can call, or even better, css class that we can set) in addition to the trigger element.

Also see
tleunen/react-mdl#295
tleunen/react-mdl#333

The problem is that at least in v1, the layout and drawer components are 'intertwined' and components are linked based on component id (on the trigger element) and some 'background scripting'. Especially this background scripting is a bit annoying. It's easy to use in jQuery like environments where we load a page and then run the scripts to make the components come alive. But if we make single page apps, or sites where pages are very interactive and long-lived, it because a real pain having to register and unregister and performing all manipulation in such a way that it does not conflict with the background behavior. It would be much better if we would have a little library of scripts for e.g. ripple that we could apply ourselves.

In my ideal world, MDL would come with only a CSS file and a supporting website that explained all the markup and class names you can use and the effects they have on the user interface. I understand that some effects can only be achieved with scripting, so that's where that little library comes in, but we should strive to minimize it in my opinion.

@Garbee
Copy link
Collaborator

Garbee commented Jul 14, 2016

Yes, it will be 100% controlled by developers. This is an explicit goal with the whole of V2 components and their JavaScript.


Edit: I also just added to the list of needs to be capable to be used on either side of the screen. The ability to have a right-aligned drawer is defined in the specs somewhere (can't remember off the top) so we should have a modifier for that.

@Download
Copy link

I also just added to the list of needs to be capable to be used on either side of the screen. The ability to have a right-aligned drawer is defined in the specs somewhere (can't remember off the top) so we should have a modifier for that.

W00t W00t! That's great news! Can't wait for v2!!

@traviskaufman
Copy link
Contributor Author

FYI first PR will omit "Persistent" navs (ones that push content around); await design guidance on how content should be pushed (reflow, simple translation, etc...)

@ansarisufiyan777
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants