-
-
Notifications
You must be signed in to change notification settings - Fork 835
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
feat(modals): support stacking modals, remove bootstrap modals dependency #3456
Conversation
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.
Just some comments so far. Haven't had time to properly review yet.
Thanks for the feedback, will work on it later this week |
Processed feedback :) |
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.
I've addressed some things with commits on this PR, but would like a sanity check for my changes from another core dev before looking to merge this.
Thank you for your work on this! This is a big improvement for Flarum's modals system! :)
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.
Code looks good! a few comments and a bug I noticed. Thanks a lot for the PR!
There's an issue with the scrolling behavior, I think a video will better explain it:
https://user-images.githubusercontent.com/20267363/178266180-69aaa829-b528-4808-999f-4693bd15b3a5.mp4
oops... that was the wrong git command... have asked jasper for write access to his fork so i can resurrect this. have a backup of the code at https://github.com/flarum/framework/tree/jv/stackable-modals |
RE the scrolling bug: isn't this how the modals currently work in core? uoKyaMOF.mp4 |
yea but that isn't how they work in this branch 🙈 |
OH I didn't watch for long enough! Right, I'll get on that. |
@SychO9 Fixed, I hope. |
🙈 now you can't scroll inside a modal |
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.
Using one backdrop seems great! I think only small tweaks are left.
The patience in this PR is admirable. |
Require explicit values for `attrs` and `stackModal` from Flarum 2.0, beginning deprecation from now.
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
Rebased on |
phew that was a big one 😄 |
Fixes #3516
Changes proposed in this pull request:
In this PR I've worked on making it possible to have multiple dialogs opened at the same time and make them stackable. I have partly used code of #3246 and altered it. It also removed the bootstrap modal dependency.
However, I did not proceed using the native HTML Dialog element for this PR due to lack of animations (for example, the backdrop is not animatable) and responsiveness with the interface.
A third parameter has been added to the
app.modal.show
function which is a boolean and defaults tofalse
. This means that all already existing modals will keep their intended behaviour.I also copied the new 'dismissable' options from the other PR, such as an option to hide the dialog on escape key, clicking on the backdrop or using the close button and managing them seperately per modal. This means there is a deprecation too which was mentioned in the code.
Reviewers should focus on:
Necessity
Confirmed
composer test
).