[Bug]: Cards broken
juliangums opened this issue · 11 comments
What happened?
I followed the installation steps, but there is an issue with the space between cards and the outline doesn't change on hover and the cards are not clickable. is this package working with the latest Filament? Or is there something I'm doing wrong?
How to reproduce the bug
Install it with latest versions
Package Version
latest
PHP Version
latest
Laravel Version
latest
Which operating systems does with happen with?
Linux
Notes
No response
Correction: I can select them. It just doesn't change the border colour when selected. With no visual input, I just assumed it wasn't selected. So there seems to be a CSS issue.
Hi @juliangums , can you give a simple repo for me to check? Or if ever did you create a custom theme and add the vendor file in that theme? In case you miss it, you need to install a custom theme: https://filamentphp.com/plugins/jaocero-radio-deck#installation and add the content in your tailwind.config.js
content: [
...
'./vendor/jaocero/radio-deck/resources/views/**/*.blade.php',
]
Hi @199ocero I added the line to tailwind.config.js
and also ran php artisan make:filament-theme
.
What exactly do you mean by add the vendor file in that theme
? Is there another file I need to reference somewhere?
Or is there any command I need to run to compile assets?
@juliangums can you provide me a simple repo so I can check? It's hard to fix your issue when I don't know the issue myself. It's so vague to assume that there is issue here it might something how you install or configure this.
Sure @199ocero
I've done this for you here https://github.com/juliangums/radio-deck-test
Just create a database, run migrations with --seed flag and you should be able to log in under /admin with admin@admin.com and pw: admin
Now I know @juliangums , you are missing some configuration for custom theme:
Please add this line to your admin panel provider:
->viteTheme('resources/css/filament/admin/theme.css')
and then in your vite.config.js
you will need this css in your input:
'resources/css/filament/theme.css'
You maybe don't see this in the installation of custom theme:
https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme
⇂ First, add a new item to the `input` array of `vite.config.js`: `resources/css/filament/admin/theme.css`
⇂ Next, register the theme in the admin panel provider using `->viteTheme('resources/css/filament/admin/theme.css')`
⇂ Finally, run `npm run build` to compile the theme
Thanks @199ocero
This indeed fixed some issues. But there still seems to be an issue with picking up theme colours. I've updated the code.
I'm also seeing these warnings when running npm run build:
warn - The `content` option in your Tailwind CSS configuration is missing or empty.
warn - Configure your content sources or your generated CSS will be missing styles.
Could this be related to it?
Found the issue. I had to explicitly do ->color('primary')
Glad you fixed it @juliangums . Oh yeahhh I think you found a bug. It should be default to primary when no colors method indicated. I'll fix it in the next release. For now you can just ->color('primary')
or whatever color you need.