-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
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
Adds Sidebar Drawer Option On Modal #21540
Conversation
Whoa, this sounds awesome. |
Great work but I think it's bit strange to not create a new component. Why build this feature on Modal component instead of creating a new one ? |
To me, it's either the modal, the navbar, or the collapse. I'd also take an independent plugin that simply toggles a class somewhere though 😆 (like a more basic "collapse"). |
Honestly, I tacked it onto Modal because it didn't add any new JS to the code and it provided the modal-backdrop, which helps draw the focus to the drawer. (andd because my JS isn't the strongest 🤐 ) |
IMHO this should its own component and not tied to other components (modal, navbar and so on). These drawers have become really commonplace and it's probably the biggest bootstrap omission right now. While the effect shown in this page it's cool it's also very different from how drawers usually behave in apps and websites (pushing the content while opening of just covering it without light effects) |
Great idea! |
/x-ref for #17496 just in case |
3cfc3f5
to
b404750
Compare
The same question remain I don't think we should tweak our Modal to do a Drawer, we should build a new component which will be called Drawer |
Well, if you can refactor the code to be shared, sure. Otherwise there will be a lot of duplication. |
But anyway I feel like #27035 is a little better. |
Closing since this will be a new component. |
Can you reference this new component here @XhmikosR ? |
There's nothing to reference yet. |
Per this comment #21390 (comment) regarding adding a drawer to the framework, I thought I'd offer up the solution that we have been using in prod on V4 for a while.
This attaches the Drawer to the
.modal
rather than the.collapse
to take advantage of the modal backdrop. It can be used as an alternative look to the regular modal dialog and as an option for those looking for an off-canvas nav.