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

Add Full-Screen size to Modal and Responsive variations for breakpoints #28683

Merged
merged 4 commits into from
Apr 1, 2020

Conversation

GeoSot
Copy link
Member

@GeoSot GeoSot commented Apr 23, 2019

Add Full-Screen size to Modal and Responsive variations for breakpoints
Works from breakpoint and down

( @MartijnCuppens , please ignore my previous pull request)

Preview: https://deploy-preview-28683--twbs-bootstrap.netlify.com/docs/4.3/components/modal/#fullscreen-modal
Previous PR: #28682

@GeoSot GeoSot requested a review from a team as a code owner April 23, 2019 14:09
@MartijnCuppens
Copy link
Member

Yu @GeoSot,

Nice to see you getting involved in Bootstrap! I've readded the netlify preview in your (you can get the link in the PR tests). Try not to reopen too many PR's for the same feature, we can miss some essential information sometimes.

I noticed there's a spacing at the right side of the screen, could you fix that?

@GeoSot
Copy link
Member Author

GeoSot commented Apr 25, 2019

@MartijnCuppens you are right about the two PR's. (I 've messed up the commits and wanted a clear solution)

As for the padding on the right, I saw that it is done from js.
As a solution I can change max-width to min-width, in order to have a nice optical result, but is it acceptable?

@MartijnCuppens
Copy link
Member

Hmmm, I can't think of another better solution right now. Maybe @ysds knows a better way of handling this?

@ysds
Copy link
Contributor

ysds commented Apr 25, 2019

I’ll take a look later :)

@ysds
Copy link
Contributor

ysds commented Apr 25, 2019

As far as looked through that, I felt three things:

  • The class name is a bit confusing. e.g. I misunderstood the .modal-md-full makes the modal to be full screen when the screen is wide.

  • There is a display problem when the full screen modal has a lot of content.

  • The modal's right padding is for centering the modal to the page content not the window (Modal layer is centered based on window, not based on content #14892). But the full screen modal will not require the padding. To remove the padding, should change the JS because it is added by JS.

@GeoSot
Copy link
Member Author

GeoSot commented Apr 30, 2019

@MartijnCuppens I have made some changes and fixes according to the previous suggestions.

As for the className, i am open to suggestions

@MartijnCuppens
Copy link
Member

As for the className, i am open to suggestions

fullscreen would make more sense I guess.

There's something else. We use a mobile-first approach in Bootstrap, which uses min-width media queries instead of max-width. We also need extra documentation and examples to show the responsive effect.

@GeoSot
Copy link
Member Author

GeoSot commented Jun 25, 2019

There's something else. We use a mobile-first approach in Bootstrap, which uses min-width media queries instead of max-width. We also need extra documentation and examples to show the responsive effect.

I have changed the class name.

As for the mobile first approach thing, the purpose is to have a Full Screen modal on mobile , till the chosen breakpoint. So I am not sure if it needs any change

@GeoSot GeoSot requested review from XhmikosR and removed request for a team October 1, 2019 08:11
@XhmikosR XhmikosR requested a review from a team October 1, 2019 08:12
@XhmikosR
Copy link
Member

XhmikosR commented Jan 7, 2020

@GeoSot something seems broken. Also please squash your patches into one after rebasing against upstream.

@GeoSot GeoSot force-pushed the Modal-fullscreen branch 2 times, most recently from 26c3a0a to 1ec980b Compare January 12, 2020 20:09
@GeoSot
Copy link
Member Author

GeoSot commented Feb 3, 2020

@XhmikosR can I do something more in order to help this pull-request to proceed?

@mdo
Copy link
Member

mdo commented Feb 3, 2020

Trying this out myself, I don't think the fullscreen modal should "drop in" like the other modals—gives it a weird looking animation. Thoughts on revisiting that part?

@GeoSot
Copy link
Member Author

GeoSot commented Feb 4, 2020

Maybe if we omit the 'fade' class. Or try another transition???

@MartijnCuppens
Copy link
Member

I would keep the fade effect. Maybe we split the fade effect and the slide-in effect into 2 classes? Better cover this in another PR then because all modal classes.

@GeoSot
Copy link
Member Author

GeoSot commented Feb 4, 2020

So, what you propose me to do?

@MartijnCuppens
Copy link
Member

So, what you propose me to do?

Interesting question. I know @ysds is working on splitting the transition classes from the components in #29081.

@mdo, maybe we should postpone the drop in change until #29081 is finished?

@mdo
Copy link
Member

mdo commented Feb 7, 2020

Sounds fine by me!

@ysds
Copy link
Contributor

ysds commented Feb 27, 2020

Since there are still some issues, I will add the commit directly.

Adding overflow-y: auto to the global .modal-body will increase encountering #28513 (See demo). Maybe should handle with JavaScript, but for workaround here, moving it to the each .modal-body.

@ysds
Copy link
Contributor

ysds commented Feb 27, 2020

I added changes:

  • Fix header and footer shrink issue
  • Move overflow-y: auto from the global .modal-body to each fullscreens
  • Use height: 100% instead of 100vh because 100vh doesn't care the browser UI (e.g. address bar)
  • Fix wrong breakpoint postfixs and remove modalFullscreen() mixin
  • Improve documentation

Copy link
Contributor

@ysds ysds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but need another approval from @twbs/css-review

Copy link
Member

@MartijnCuppens MartijnCuppens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added border radii resets to the footer and header, just in case a background color is added. Thanks all for contributing to feature! ❤️

@MartijnCuppens
Copy link
Member

@XhmikosR, how are we gonna merge this? Squash it into one commit?

@XhmikosR
Copy link
Member

This should probably me manually rebased and squash the patches per author.

@XhmikosR
Copy link
Member

Unless you guys don't mind squashing everything into one when merging (with a clean commit message, though)

@MartijnCuppens
Copy link
Member

I personally don't care. We could maybe add Co-authors in the commit message:

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Shohei Yoshida <fellows3@gmail.com>
Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>

@ysds ysds added the js label Mar 4, 2020
@XhmikosR XhmikosR force-pushed the Modal-fullscreen branch 2 times, most recently from 0573950 to 44b760f Compare April 1, 2020 06:45
@XhmikosR
Copy link
Member

XhmikosR commented Apr 1, 2020

@ysds can you have another look after the rebase?

@GeoSot please make sure you don't overwrite my rebase 🙂

@twbs twbs deleted a comment from yadoudou Apr 1, 2020
Copy link
Contributor

@ysds ysds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me 👍

@XhmikosR XhmikosR merged commit dfa017a into twbs:master Apr 1, 2020
@GeoSot GeoSot deleted the Modal-fullscreen branch April 1, 2020 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants