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

No groups in Images From Library Selector #3256

Open
denis-gorin opened this issue Jun 23, 2022 · 3 comments
Open

No groups in Images From Library Selector #3256

denis-gorin opened this issue Jun 23, 2022 · 3 comments

Comments

@denis-gorin
Copy link
Contributor

Field type of Image.
Trying to get image From Library - can't view files grouped by directories. I see only one group named files

Details

Question Answer
Relevant Bolt Version 5.1.10
Install type Composer install

Take a look to response of async/list_files?location=files&type=images on Bolt 5.0.6 for ex.

image

we can see the 'root group' and the 'business group' (corresponding business directory)

and the same response on Bolt 5.1.10

image

the 'files group' in all entries

As I see, the reason is in vendor\bolt\core\src\Utils\FilesIndex.php where we set group for each file

'group' => basename($basePath)

I Can't understand yet why we pass the same value ($basePath) for all files entries...

@bobdenotter
Copy link
Member

I'm not sure why/how this snuck in, but I've noticed this too. For Bolt 5.2 this is getting reworked, and it'll be easier to pick out images: #3227

@jodou92
Copy link

jodou92 commented Mar 15, 2023

I am also interested in an improvement of the library files selector in 5.2.
My app is in 5.1 for the moment and I needed to override the FileIndex to set the group property this way :
group' => dirname($file->getRelativePathname())
The selector is still less user friendly than it was in the previous version of my app (Bolt v3) but it can make the job temporarly.

@macintoshplus
Copy link
Contributor

Bolt 5.2 has been released 🎉

Can you try in Bolt 5.2?

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

No branches or pull requests

4 participants