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 viewport units options for modals #10388
Add viewport units options for modals #10388
Conversation
I have tested this item ✅ successfully on 545a9a3 Tested the new menu item type select modal with different window sizes and worked very good. A very nice improvement! This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10388. |
BTW also tested in Chrome and IE10 |
@andrepereiradasilva Thanks for testing and feedback! 👍 Note: for old browsers with no viewport unit support, it will just displayed the modal as before ;-) |
@brianteeman please add the 3.6.0 milestone here as we have it on the old PR. |
@zero-24 no need to remind me on each one. I will review them all a few
|
Thanks! @brianteeman |
I have tested this item ✅ successfully on 545a9a3 Should I run a test via browserstack, too? This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10388. |
I have tested this item ✅ successfully on 545a9a3 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10388. |
RTC based on tests This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10388. |
@RoterNagel i didn't know what browserstack is, but now i know! ;-) Thanks for testing! |
Great work @JoomliC Thank you! |
Thanks @RoterNagel @andrepereiradasilva and @MATsxm for testing! Thanks @dgt41 ! ;-) |
Pull Request for Issue #10070 .
Based on idea by @RoterNagel about using viewport units for modals, and the proposal of @andrepereiradasilva to create special classes for viewport units.
This PR is full B/C as this one is not changing current behavior. It adds new optional options
modalWidth
andbodyHeight
to be able to set viewport units in the modal constructor.Note: for old browsers with no viewport unit support, it will just displayed the modal as before.
The Options for modals are then these ones:
title
(string) : The modal titlebackdrop
(mixed) : A boolean select if a modal-backdrop element should be included (default = true)The string 'static' includes a backdrop which doesn't close the modal on click.
keyboard
(boolean) : Closes the modal when escape key is pressed (default = true)closeButton
(boolean) : Display modal close button (default = true)animation
(boolean) : Fade in from the top of the page (default = true)footer
(string) : Optional markup for the modal footerurl
(string) : URL of a resource to be inserted as aniframe
inside the modal bodyheight
(string) : height of theiframe
containing the remote resourcewidth
(string) : width of theiframe
containing the remote resourcebodyHeight
(int) : Optional height of the modal body in viewport units (vh)modalWidth
(int) : Optional width of the modal in viewport units (vh)Summary of Changes
modalWidth
andbodyHeight
jviewport
classes tomodals.joomla.less
responsive-767px-max.joomla.less
menuTypeModal
for test and demonstrate B/CNote: i added viewport options here only for Menu Item Type select for testing purpose. If this PR is accepted, i will then be able to add this to other modals (already updated and merged, and the ones i'm working on and not yet improved). My goal is all modals reviewed for 3.6.0 ;-)
Testing Instructions
staging
bodyHeight
70vh) as expected in PR Changes Styles from Modals for higher "Shadowbox"-Modals #10070modalWidth
to 80vw as the default modal width was already 80% (and in this modalmenu-type
, seems to be a good width)Before Patch
After Patch