lunar icon indicating copy to clipboard operation
lunar copied to clipboard

Feature - New config on StandardMediaConversions

Open lguichard opened this issue 1 year ago • 6 comments

This PR remove hard coded value and create a new config

lguichard avatar Feb 16 '24 09:02 lguichard

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lunar-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2024 8:50am

vercel[bot] avatar Feb 16 '24 09:02 vercel[bot]

Run shivammathur/setup-php@v2
/usr/bin/bash /home/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/run.sh

==> Setup PHP
✗ PHP Could not setup PHP [8](https://github.com/lunarphp/lunar/actions/runs/7928914847/job/21648120617?pr=1565#step:3:9).2
Error: The process '/usr/bin/bash' failed with exit code 1`

@glennjacobs The CI don't like me xD

lguichard avatar Feb 16 '24 10:02 lguichard

Why do we need this? Lunar uses it for images, hence the collection name is called images.

glennjacobs avatar Feb 16 '24 10:02 glennjacobs

I discover this hard coded value during the demostore conversion. The products seeder used media collection name "products".

If they devs add Lunar package on existing project and that already use 'images' name, they need to change the default value. In big e-commerce website, we need to dispatch medias on multi storage buckets to optimize CDN etc... I think it might be necessary to split collection name to organize assets by Model.

lguichard avatar Feb 16 '24 10:02 lguichard

@alecritson can I have your opinion, please?

Things to consider...

  • Will this not break the admin panel, unless we introduce the config there also?
  • I don't think we want to change the default 'images' collection name on other models. Sure, allow a dev to change it, but I don't believe we need to change them in our config.

glennjacobs avatar Feb 16 '24 10:02 glennjacobs

@glennjacobs, to ensure backward compatibility probably better if we keep only 'media_collection' => 'images' allow a dev change it.

lguichard avatar Feb 16 '24 10:02 lguichard

@glennjacobs Doesn't look like we've hit every instance of SpatieMediaLibraryImageColumn when updating the collection method to config.

alecritson avatar May 22 '24 08:05 alecritson

@glennjacobs Doesn't look like we've hit every instance of SpatieMediaLibraryImageColumn when updating the collection method to config.

Should be sorted.

glennjacobs avatar May 22 '24 08:05 glennjacobs