-
-
Notifications
You must be signed in to change notification settings - Fork 159
Feat: add Sidebar component #460
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
base: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
3b9c23d to
7350847
Compare
|
@DMouayad let me know when you need a review, or if you need help continuing this PR |
|
@nank1ro If u got some time then Yes I do need some help; this's still a draft but the code can be reviewed. I've been busy lately to complete what's remaining but since this's a complex component, it needs a well thought-out design decisions. |
|
Resolved in current version |
4a3b5ba to
076ae57
Compare
- Adds a check for mobile state in _rightBodyPadding to prevent incorrect padding. - Restores the post-frame setState call in _initSidebarController and _initEndSidebarController to ensure the scaffold rebuilds correctly when sidebars are updated. - Removes the unnecessary empty initState method.
close #239
Changes
New Components
Arch Breakdown
Why
ShadSidebarScaffold?Well, this's because in the original Shadcn when a sidebar collapses two things happen:
So this means:
In addition, the original shad sidebar can be used as a child of any component(Widget in case of Flutter). For example, in a dialog or a popover.
As a result, we had to separate the actual sidebar component from the "wrapper". This's how it's also implemented in the original shad.
Theme
ShadSidebarThemeDocs & Playground
I added a new page for the sidebar component in the docs site with the required example apps in the playground.
Since this's a fairly complex component, the docs page goes over each new sub-component(widget) and its props and how to use it.
NOTE: some parts need to be updated with the final sidebar version.
TODO
Pre-launch Checklist
///).0.18.0and you introduced a breaking change or a new feature, bump it to0.19.0, if you just added a fix or a chore bump it to0.18.1.CHANGELOG.mdfile with a summary of changes made following the format already used.