-
-
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
[FullScreenDialog] Support for full screen dialogs #3553
Comments
Actually, changing the source locally is absolutely the best way to address this, since then you can submit it back as a PR so everyone can benefit! 👍 https://github.com/callemall/material-ui/blob/master/CONTRIBUTING.md |
I also have a need for this in two projects I'm working on. I'm considering implementing it since it's missing from material-ui. Before I take a stab at producing a PR, are there any thoughts on how this could be implemented, in a way that's inline with the other prevailing design philosophies which have been incorporated into material-ui? Another way of saying that: Anyone have any ideas on how they might implement full screen dialogs? My current thoughts are to start off with the code for the existing Dialog component as suggested in #1748 but also add the ability to slide the dialog in from the left or right edge of the screen, implementing behaviour you might see in one of Google's mobile app such as gmail or hangout. |
I did wrote a simple implementation of fullscreen dialog, that I called Window. The dialog implementation is already very complicated, not sure we should add some more complication there, or some refactoring are needed to split concerns. My 2 cents. my code is not submitable, but I can try a new implementation with react-overlays. |
I'll check that if I work on it :) On Sat, 9 Apr 2016, 02:26 Nathan, [email protected] wrote:
|
I need this feature as well, now I did the tricky thing that sets the top style to a minus value, the thing is that it's not going to work well on all devices. |
In the interim you can use Bootstrap Modal. I know it's dirty to mix-n-match, but react-bootstrap's modal API is so similar to MUI's that it's a 30m swap; then full-screening via CSS is a breeze. Here's my own diff for such. |
+1 Im trying to have my dialog turn full screen for mobile users but I'm running into issues using media queries and changing the length of the dialog. |
@IrvingAxelB I ran into very similar issues on a recent project. My take is that the dialog should be mobile-first, but it's not, and is therefore difficult to use responsively. It also behaves strangely when flexbox is turned on. |
I am also trying to achieve a fullscreen modal. I was a bit disappointed to see the lack of |
+1 not having fullscreen dialogs is massive issue on mobile. Is this on the roadmap? |
@zuhair-naqvi I think I could roll this in to work I'm doing to address #156 for |
I agree, having a look at the material specification, I don't think that we should be using the actual |
Any update on this? Adding this would be of amazing value. |
Why shouldn't we reuse |
I've managed to get modal full size via these styles, but this came at a cost of slide-out animation: <Dialog repositionOnUpdate={false}
autoDetectWindowHeight={false}
modal={false}
open={true}
contentStyle={{width: '100%', transform: 'translate(0, 0)'}}
bodyStyle={{padding: 0}}
style={{paddingTop: 0, height: '100vh'}}
> |
@m19 I'm quite opposed to this approach. The Full-screen dialogs is a high level component. We haven't invested much in high level component. |
@oliviertassinari that makes sense. Thanks! Nobody in the community is working on this. Correct? |
Not I have heard of. |
@oliviertassinari can you elaborate on "you will not display the same information on mobile and desktop"? For example, on the current project we're working on, we're displaying a contact us dialog. It has the same information on mobile and desktop but I would like the dialog full screen on mobile. |
@joshunger What I'm saying is your business case might require you to need more than a responsive |
I think that |
I know I'm late to the party, but I recently started implementing a Once I have a little more spare time, I'll see if I can port it to |
@leMaik Thank you! |
its already done in |
@stunaz unfortunately not available now. and I'm launching asap |
Is it not available right now? |
I had use case when I needed all modals to be full screen only on xs screens.
and then I defined those classes globally like this: @media (max-width: 600px) {
.global--modal-content {
width: 100% !important;
transform: translate(0, 0) !important;
position: absolute !important;
top: 0 !important;
height: 100vh !important;
}
.global--modal-body {
padding: 0 !important;
max-height: none !important;
}
.global--modal-paper {
overflow: auto !important;
height: 100vh !important;
}
} worked perfectly for me. |
This sounds wonderful. However, and it could just be that I have the "itis" from lunch, I am not entirely sure what you mean by "tree tags" or "Dialog definition". I am imagining you mean that you added:
to the actual implementation inside the node package? My understanding of monkey patching tells me that probably isn't what you meant, because that only solves the issue until you want to update material-ui. |
@kjr247 If you look at http://www.material-ui.com/#/components/dialog you can see that those are props exposed by material-ui itself. So if you set those props to those classNames and inject rules for those classes in CSS somehow, you can accomplish the above! |
Can material-ui support the following part of the spec?
https://www.google.com/design/spec/components/dialogs.html#dialogs-full-screen-dialogs
It could be baked in to the existing Dialog component, or added as a new component.
There is some discussion in issue #1748 about this, which ultimately concluded with the "solution" of either manually setting the height of the content or setting negative margins, both of which seem less than ideal. Currently my only alternative is to change the source locally, which obviously isn't great since I can't (easily) receive future upgrades.
Having an easy way of making the dialog go full-screen without the rounded corners would be much appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: