Issue with UI of Curator
Sorry to tag you @awcodes but since you wrote this plugin you may know what's going on. I installed the CSS and Cropperjs, but my CuratorPicker, looks weird:
theme.css
app.css
vite.config.js
postcss.config.js
tailwind.config.js
76 Replies
You should post this in the dedicated #curator channel
Did you register your custom theme?
also make sure to include the plugin's views in your tailwind.config.js
yes I did. I used
php artisan make:filament-theme admin
if thats whats what you meanThat’s the command to create a theme. Did you register it in your context provider?
sorry im late
I get this:
Oh wait, this is for v1?
How do I register the theme?
There's a whole section on the docs for this: https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme
I get this warning but it works anyways. Thank you
Whether I have constrained true/false the image always takes up the whole preview, and it looks cut off as well. Am I mssing anything?
Also the delete modal appears to be having some issues rendering
I have updated the config files
Also, when I click ctrl + left mouse click I cant select multiple files 😅
@awcodes? 🙃 🙏
@thethunderturner did you recently update Filament?
Yes I did. Or at least, it was updated automatically when I entered composer update
Iirc when I downloaded your package it downgraded filament to .41
and you have
php artisan filament:upgrade
as part of your composer update?
my plugin. doesn't have any restriction on the Filament versionUhhm, I think so. I will check in 10m and get back to you
if you don't, add it. and also run it, then run
npm run build
to also recompile your theme.I do
When I run
npm run build
I get the following warnings:definitely somthing wrong with your setup.
I followed exactly what the guide said :/
do you mind showing the main contents of your config?
or at least if I can have a look at the curator demo repo I might find whats wrong. Unless, you have it private?
Found it: https://github.com/awcodes/curator-demo
GitHub
GitHub - awcodes/curator-demo
Contribute to awcodes/curator-demo development by creating an account on GitHub.
make sure you're looking at the 3.x branch
Yes of course
And you were right, there was a misconfiguration
now i have this
I still cant select multiple file though :(
Did you set the picker to have ->multiple()
It’s working for me.
Yes I did
Maybe there is an issue with the way I set up Section and its messing everything up
Maybe view cache then. Not sure.
Section shouldn’t matter.
I cleared the veiws multiple times
and built again
Any console errors? Maybe the livewire request is failing.
oeee
yes
huh
Weird, explains your issue though. The js is breaking for some reason which means that after that it will no longer work. Unfortunately that isn’t specific to the plugin, so I’m not sure of the fix for you.
Everything is working correctly in the demo.
ok. Should I remove and reinstall the package? Maybe that fixes it
All the configurations are away from vendor so a reinstall and
npm run build
could do the trickPossibly. File upload is a Filament component. And I’m not sure why livewire can’t find it.
Maybe remove the vendor folder and reinstall everything.
me neither. Indeed very weird
After a clean reinstall, I get the same error
wth
i have an alias that runs:
sometimes everything just gets out of sync
Still the same issue xD 😅
Could it a livewire messup?
hmm. i'm seeing that error too, but my multi select is working. 🤣
working for me in both firefox and chrome
Just tried on firefox, and its not working there either 😅
So what do we do from now?
are you on windows?
Linux
Im looking through the files
Where do you define when cmd is pressed?
Maybe linux php isnt recognizing cmd and needs ctrl
I found this from your curation.js in the dist file
Im not sure if they have anything to do with each other
not sure what you're looking at there. it's the metakey (
event.metaKey
), which is 'cmd' on mac for example
i should probably update the verbiage thoughIndeed now it works
I digged through the files and that was indeed the cause
🤦♂️
I will push a PR ok? 🙂
that's on me
push a PR for what?
Fixing the issue
I can make so that it places a special key based on the OS
it's already doing that
that's what metaKey does and it's already part of the code
Hmm
yes yeah I saw it. I thought metaKey was exclusive to mac
no, it's not specific to MAC, it just says to use whatever the metaKey is on the OS
this is what needs to be updated 'Cmd + Click to select multiple files.'
just the text
it shouldn't say Cmd
But that is just text. For me it doesnt work with metaKey
I changed metaKey to ctrlKey
and then it worked
is it not the 'windows' key on your keyboard
sounds more like an issue with the OS, or in livewire.
control click won't work on mac, since that opens a contextual menu.
ctrl + click also doesnt work for me (with metaKey), or alt + click, even if I have the fn on, no key works.
weird, metaKey is the appropriate binding for multi select.
it's that way even in most OSs and other software
Well then it certaintly wont work on most linux or windows systems. When you press meta you open up the windows/linux task bar
When you press and click, you move the window around
well i'll give it some thought
but it's not going to be as easy as just changing it to control
Alright. Thank you:). It was a fun little exploration haha
Maybe make a trait where it allows you to change the key used? Idk if that degrades the UI though
maybe a named parameter in the ->multiple() method.
i'll think about it. can't worry about it right now though.
OK, thank you
On another note, do you know why when uploading multiple images they appear half cropped? Could it be because you arent exactly using FileUpload?
I am using filepond.
That’s the native filament FileUpload field.
There’s some styling on the drop area, maybe that’s affecting something.
Quick question, is it possible to have an action that will display images in something like a popup in the red area, and not in a new tab? Can that be done with filament?
i'm sure it's possible, but not currently part of the package. Also please use the #curator channel for questions specific to the plugin.
Okk