Skip to content
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

Sidebar #17

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Sidebar #17

wants to merge 5 commits into from

Conversation

coasterkolja
Copy link

@coasterkolja coasterkolja commented Dec 25, 2024

I added the Sidebar Component from shadcn/ui to luvi-ui

@adiologydev
Copy link

@anotherfrontendguy can you please check this PR? I think it'd be a great addition.

@anotherfrontendguy
Copy link
Contributor

Thanks for your contribution.

We need to provide a guide for users on how to use this component like we do for the others (see Dialog for example).

Could you please provide a "maxed-out" usage example?

@coasterkolja
Copy link
Author

I created an example.blade.php file inside the /components/sidebar folder. I built the sidebar almost exactly like the shadcd sidebar so you could use the documentation as reference.


$this->publishes([
__DIR__.'/../resources/js/plugins/sidebar.js' => resource_path('js/plugins/sidebar.js'),
], 'searchable');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second parameter should be sidebar.

Alpine.bind(el, {
"@click"() {
this.$data.__toggle();
console.log(this.$data.__open);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop the console.log.

Copy link
Contributor

@michaelklopf michaelklopf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR needs to be more rounded and tested. From our point of view the example doesn't work.

To test the sidebar it would be best if you provide a new repository with a fresh Laravel project that makes use of the sidebar. There you can also test and improve it.

A new feature must be realised together with documentation, which is living in this project https://github.com/luvi-ui/website.

When your sidebar is working correctly, you can create the documentation for it, like so

You could've provided the example in a comment here. Please remove it from this PR.

@@ -1,5 +1,5 @@
{
"name": "luvi-ui/laravel-luvi",
"name": "coasterkolja/laravel-luvi",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never change the package name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants