-
Notifications
You must be signed in to change notification settings - Fork 622
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: create Drawer component #4475
Conversation
…into feat/dialog # Conflicts: # yarn.lock
The PR looks lovely, thank you Adrian 🙏 I have a couple of general comments: 1) Scrollable contentThe content inside the drawer is not scrollable. Check out the video: CleanShot.2025-01-22.at.09.09.28.mp4Shall we try to prevent this behaviour by default or leave the developer to handle it when needed? 2) Internal components namingI've noticed that the internal components have the It's debatable, and after we finish developing all the components, we should go through the library and adjust these minor aspects. 3) Use of
|
…into feat/drawer # Conflicts: # packages/admin-ui/scripts/importFromFigma/exports/Alias tokens.json # packages/admin-ui/src/Dialog/components/DialogContent.tsx # packages/admin-ui/src/Dialog/components/DialogFooter.tsx # packages/admin-ui/src/DropdownMenu/DropdownMenu.tsx # packages/ui/package.json # yarn.lock
Resolved scrollable content issue by adding overflow-auto to the drawer body section. So, scrollbars will show if the height of the body is not enough to show all content in it. The main menu is also showing scrollbars now. Re other points... we can discuss them later. |
…into feat/drawer # Conflicts: # packages/admin-ui/src/index.ts # packages/ui/package.json # yarn.lock
Changes
This PR creates the Drawer component. Here is a pair of sshots.
The first is File Manager, where
modal
prop is set tofalse
(default value actually). This basically means the user can also interact with the UI in the background and that the drawer is only closed when pressing Esc or clicking on the X icon. This was done as discussed with Kreso.This is the main menu, where
modal
prop is set totrue
, meaning no background interactions are possible.Another random sshot:
Extra Changes
1. Updated File Manager Drawer Code
Had to accommodate the file details drawer in File Manager a bit.
Did some cleanups along the way too (some styled components are no longer needed).
2. File Manager - Increased Size of Buttons
I made these buttons larger:
3. Updated Query Builder Drawer Code
Had to accommodate the file details drawer in ACO's Query Builder a bit.
Did some cleanups along the way too (some styled components are no longer needed).
Notes
1. Tabs in Dialog
We had a discussion on tabs being rendered in an opened dialog. There were a couple of options here, but, ultimately, I've done it in a way where you pass
bodyPadding: false
prop to theDialog
component. That way, the body has no padding, and tabs can be used within the dialog as imagined in Figma designs (they taking the full width of the dialog).