material icon indicating copy to clipboard operation
material copied to clipboard

adding fullscreen option for mobile to $mdDialog

Open dohomi opened this issue 11 years ago • 21 comments

Hello, I would like to know if you plan to include a fullscreen option to $mdDialog with some more responsive functionalities? Would be very great for using dialogs on mobile devices:

screen shot 2015-04-03 at 8 37 49 am

http://www.google.com/design/spec/components/dialogs.html#dialogs-full-screen-dialogs

Thanks for your great work!

dohomi avatar Apr 03 '15 07:04 dohomi

+1

anderson-arlen avatar Jun 16 '15 17:06 anderson-arlen

+1

TBxy avatar Jun 25 '15 11:06 TBxy

+1

stunaz avatar Jun 25 '15 13:06 stunaz

+1

kevindstanley1988 avatar Jun 26 '15 12:06 kevindstanley1988

I am wondering if this is more of a request for a router-like functionality that happens to animate like a full-screen dialog... ie. thinking in-terms of ui-router-like states I see that dialog as being something like:

$stateProvider.state('calendar.new-event', function() {
  return {
    templateUrl: '/my-full-screen-dialog/template.html',
    controller: 'MyFullScreenCtrl',
    animate: 'full-screen-dialog'
  }
});

My point being, is this something that we really want to shoe-horn into the $mdDialog service, or is it really more of a feature to be handled by some sort of router

rschmukler avatar Jun 28 '15 19:06 rschmukler

Very helpful would be a variable to inject into the controller on which media breakpoint the dialog should be displayed fullscreen:

$mdDialog.show({
  controller:'MyController',
  controllerAs:'vm',
  mdIsFullscreen: 'sm,md' 
});

// or maybe even better inside of html directive:

<md-dialog md-is-fullscreen="$mdMedia('max-width:800px')">

This would cover almost every use case and I'd rather like to see this feature inside of the $mdDialog than outside of the component. For a hybrid app most of the dialogs working well with the default handling, but lets say for 'sm' and 'md' on a more complex dialog I'd like to show it fullscreen. It would be great to support similar handling like the md-is-locked-open="$mdMedia('min-width: 333px')" of the mdSidenavcomponent.

dohomi avatar Jun 29 '15 02:06 dohomi

+1 @dohomi fantastic thoughts. I would love to see that implemented exactly as you have described!

kevindstanley1988 avatar Jun 30 '15 13:06 kevindstanley1988

Modifying a dialog to be full screen just takes a couple lines of CSS: see CodePen. While a standardized class for this would be nice, I think we should instead focus our energy on opening multiple dialogs as that is the core functionality we are missing here. See #698.

anderson-arlen avatar Jul 26 '15 18:07 anderson-arlen

+1

ianchenguo avatar Aug 04 '15 06:08 ianchenguo

+1

adamwmeek avatar Aug 10 '15 20:08 adamwmeek

+1

guiporto avatar Aug 14 '15 14:08 guiporto

+1

subins avatar Aug 20 '15 07:08 subins

Since @anderson-arlen codepen isn't available.

Use the following css class on md-dialog and it should be full screen and working fine. You might want to wrap this in a media query depending on your needs like so.

/* $mdDialog - fullscreen dialog styling */
@media screen and (max-width: 760px){

       .fullscreen-dialog {
       height:100%;
       width:100%;
       max-height:100%;
       max-width: 100%;
       position: absolute;
       top: 0;
       left: 0;
       border-radius: 0;
   }
}

This is working fine for my mobile app without any issues.

bradmartin avatar Aug 21 '15 19:08 bradmartin

+1

rafaelgondim avatar Aug 29 '15 20:08 rafaelgondim

+1

galenbrazell avatar Sep 02 '15 06:09 galenbrazell

+1 and Thanks to @bradmartin for the css here.

ultamatt avatar Sep 08 '15 22:09 ultamatt

@bradmartin your solution also worked for me. Thanks!

alicona avatar Sep 24 '15 13:09 alicona

+1

jamalx31 avatar Oct 15 '15 09:10 jamalx31

+1

@bradmartin Very nice. :)

lukmadev avatar Oct 15 '15 09:10 lukmadev

+1, It's a must for mobile devices !

plaramee1 avatar Oct 19 '15 01:10 plaramee1