md-dialog sizes
It would be very useful to have sizes for the md-dialog directive so that it can be approximately sized or maybe something like sizing="80% 100%" for width, height or height, width.
@ilanbiala Use flex="percentage" ie flex="50"
Also iirc flex only has the styles for increments of 5 if you need more precision I think there is a mixin for it.
I'll try that when I get back to my computer. Why is it limited to increments of 5 by the way? Is that all the CSS angular-material comes with by default to avoid bloat?
@ilanbiala to reduce the size of the css because each size requires a separate rule. They also have rules for 33 and 66 though.
Here are the relevant docs https://material.angularjs.org/#/layout/grid under the second card is what you want.
@ilanbiala Also if your going to use flex with md-dialog you will probably also want to use different values for a few breakpoints.
@ilanbiala did this end up working for you?
I haven't tried it, I've been really busy.
Ok no worries, let me know if you get it working.
Looks like flex fixes the width of the dialog, but is there any way setting the height as well?
@xeor it should be autonative for the height but if you want you could add a class with min-height. However you might have problems on smaller devices. Also padding or margin may work better.
@epelc the flex percentage works, but it isn't as intuitive and there is no clear mention in the docs. @ThomasBurleson more docs changes need to happen to make this clear, too.
@epelc I tried min-height, but it ended up breaking my md-actions which I wanted to stay on the bottom. I ended up setting margin-top on the md-dialog instead, since my goal was to use md-tabs inside the dialog, but without it jumping up and down based on the content.
@marcysutton - doc updates are needed for mdDialog to discuss how dialog widths can be defined with flex. e.g.
flex="percentage" ie `flex="50"
Please add some info about height as well. Typical scenario will be dialogs containing tabs with different content. Currently, they will jump around making it impossible to choose the next tab with the mouse without adjusting the height of the mouse-pointer to the next "random" position first..
+1
Currently taking a look at this, and adding to the documentation for dialogs.
Side-note: I'd have to see your specific design @xeor, but tabs sound like way too complex of a pattern to go inside of a dialog. From the design spec:
Dialogs present a focused and limited set of actions, which are generally affirmative or dismissive.
Any reason why the tabs with content can't go on an actual page? There are focus management and accessibility implications in addition to visual ones.
@marcysutton, I gave up on using tabs after releasing the same. I initially wanted to use them for an item that had 3 views, overview, details and outline.
The height issue is something I think people will be annoyed with on simple content as well. If your tabs content doesn't end up having the same height, it feels very wrong having to move the mouse to unpredictable places when going from tabs (often you just want to click around fast to see the tabs content). Example A (you see tab B and C), clicks tab B (now if B have a different height, you will need to relocate and find tab C).
The height issue you're talking about sounds like it should be addressed in tabs, not in dialogs (#1008). Again, dialogs are meant for simple, streamlined actions. Tabs are too complex to put in a dialog from a UX point of view.
Looking into support for widths in flex percentage.
Actually the height is dynamic regarding the content, it would be nice if the width could be dynamic for case such as image insertion.
It would be nice to have the option not to center a dialog vertically but use a fixed offset from the top. That should fix the tab height issue too.. Is this possible already somehow?
Having a tough time trying to resize the mdDialog with respect to height. Anyone got lucky in being able to set its height manually?