-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
[Modal] Allow different modal positions on multi-modals. Added top and bottom aligned modal #532
[Modal] Allow different modal positions on multi-modals. Added top and bottom aligned modal #532
Conversation
…modals are used. Also implemented bottom and top aligned modals variants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I think this is fine and we can get away with changing top
to front
, I don't think its something people change especially since its undocumented.
Before my questions : thx for all your works !!! 👍 👍 👍 With this sample "Alltogether" https://jsfiddle.net/b1sa5863/2/ When you resize the windows, the center modal is display on the top : (I check on firefox and Chrome) And I have a other question why there aren't dimmer on this sample, 3 modals are open but without dimmer on the first two ? |
@dutrieux 🤔 Nice catch...i'll investigate. |
@dutrieux Fixed it 😁 See altogether example here https://jsfiddle.net/fLbzpeun/ |
I still have to investigate into the whole center variant, so i've put this on hold...as said, i'll take care of it this evening 😉 |
…f not fitting bottom modal is used
I check https://jsfiddle.net/fLbzpeun/ and there is a problem on the bottom modal when you resize the window And the modal center is blurred : the position is change by 1 pixel on y-axis too fast (or something like that) : |
Yes, the new bottom modal was the reason. I think I fixed it with the latest commit. I still have to prepare the example fiddles again |
@dutrieux It should be finally fixed now 🙏 @hammy2899 Please review again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I fund something strange with your sample : https://jsfiddle.net/jnw6ho78/ When I open and close all modals the first time, there is no problem, but when I open and close all modals an other time, the scrollbar appears briefly : I have the same problem on Chrome & Firefox & Edge |
…avoid showing large scrollbar when hiding
@dutrieux ok, hopefully the last needed fix 😅 |
Very nice, that work perfectly : juste one question, in your sample https://jsfiddle.net/fpk01L54/ and on modification of Modal.js, there is not this fix #427 too ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Docs for new `top aligned` and `bottom aligned` modal variants as of fomantic/Fomantic-UI#532
Description
When a modal opened another modal, the positioning given by
centered:false
was broken. The first modal did not stay at it's supposed position.Reason for this was, that modal positioning was done by applying
top aligned
to the page dimmer instead of the modal itself.This PR now takes care of the positioning for each opened modal and keeps its position until it's closed.
In addition it also invents
top aligned modal
andbottom aligned modal
But, as i suggest this PR to be part of the next 2.7.x Release we can do one of 2 things:
.top.aligned
CSS settings to simply.aligned
to still fix the belonging issues. I would then prepare another PR after the changes are merged to change back to "front" and ".top.aligned" for the next major releaseTestcase
Click the button inside the modal to open the second one and watch how the modals ...
Broken
... change their position
https://jsfiddle.net/9pnmzgkc/
Fixed
... stay at their supposed position
https://jsfiddle.net/phk50two/
Additional Examples for
top aligned modal
andbottom aligned modal
https://jsfiddle.net/5ahkg7t1/
Alltogether
https://jsfiddle.net/4dxfsctj/
Multimodal with different Position
https://jsfiddle.net/46wLg1nu/
The modals with individual positions called from each other
https://jsfiddle.net/fpk01L54/
Screenshot
Closes
#530
Semantic-Org/Semantic-UI#6677
Semantic-Org/Semantic-UI#5883