angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.32k stars 6.73k forks source link

Ideas / Wishes for the SideNav #3717

Open SvenBudak opened 7 years ago

SvenBudak commented 7 years ago

I am a big fan of the Material2 Framework for Angular2. I Design now the Frontend of a couple of pages with this. But one thing is very frustrating for me and some of my friends. (We are just UX / Frontend Designers with very basic knowledge about Angular2)

We all need to ask every time programmers for making us the toggle function available in other components... This costs every time hours of time. isn't it possible, that you guys make a global Service for a important function like the SideNav? I mean nearly 100% of the people will need a global Toggle Function... I really really hope for any solution in future. :)

The other thing is, that we absolutely need a way, to use multiple SidenNvs from same directions. (align="end") In some projects, this is really needed, to improve the usability and user experience.

And the last wish is, a option to make the content area "sticky" when the Sidebar is open. It feels very strange, when i scroll the sidebar and the whole content scrolls to.

Sorry for my bad english. I hope very much, that you think about applying my Ideas / Wishes. :)

Very best regards! BamiGorengo

wiwski commented 7 years ago

Any workaround for the "sticky" sidenav?

willshowell commented 7 years ago

@wiwski what worked for me was to examine the markup and css of material.angular.io/components. It's definitely possible and not too tricky, but requires some digging. It could use some documentation as it's likely the standard way of using sidenavs.

@BamiGorengo I personally disagree that a global toggle service should be Material's responsibility. It's pretty straightforward (not even 15 lines) to add a global service that exposes a toggle subject. Subscribe to that in your component and do mySidenav.toggle() each time the toggle subject emits.

wiwski commented 7 years ago

@willshowell I ended up setting html, body, md-sidenav-container { height: 100% } and it works just fine for me 👍

axtho commented 7 years ago

+1 for some documentation (to save time digging)

mackelito commented 7 years ago

@willshowell perhaps the docs could mention this as a "Pro tip" and show some basic implementation code?

axtho commented 6 years ago

Now that the fixedInViewport="true" feature is there the problem is (almost) solved. I have a request for one more option that is not implemented in the demo app: fixed sidenav that covers the header, but the scrolling content start underneath the header ... i.e. the header ist fixed also.

Now, you can achieve this by setting the toolbar on top of the sidenav-container. Works. But, what if I want the sidenav cover the entire top to bottom, and the main toolbar also fixed, with the scrolling content underneath. There seems to be no way to achieve this. @mmalerba

angular-robot[bot] commented 2 years ago

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

angular-robot[bot] commented 2 years ago

Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.