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

Add directories to structure content #117

Open
pascalwengerter opened this issue Jan 27, 2023 · 13 comments
Open

Add directories to structure content #117

pascalwengerter opened this issue Jan 27, 2023 · 13 comments

Comments

@pascalwengerter
Copy link

While I understand that tags and a filter get you very far, I can already see my editors asking for directories to do basic structuring of their media assets (say: "blogpost images", "landingpage images", "icons", ...)

@AMarlonG
Copy link

I second this ...
I've worked in arts for years, and there the amount of image content and turn over is huge. Therefore folders is a must to keep track of e.g. artists, seasons, years, genres ...

@patronstudio
Copy link

+1

2 similar comments
@lundn
Copy link

lundn commented Sep 29, 2023

+1

@didrikeilertsen
Copy link

+1

@michaelmannucci
Copy link

I think this is sort of 101 for a media browser! No reply since May 2023 makes me sad lol

@pascalwengerter
Copy link
Author

I think this is sort of 101 for a media browser! No reply since May 2023 makes me sad lol

I've since moved on from the employer where I introduced Sanity as CMS, but my impression throughout the last year was that Sanity has gone all-in on the AI hypetrain (being VC-funded, they probably figured that they don't have much choice). It's their product and their choice after all, but I had hoped that they'd more heavily invest into basic features because there are some great ideas at the foundation of the original product

@Jamiewarb
Copy link

Jamiewarb commented Apr 9, 2024

I need this at work, so am going to spend a couple weeks building it into this plugin. I can submit a PR if @SimeonGriggs or @robinpyon would want functionality like this incorporated?

We could turn it on/off via a plugin setting, so that we maintain backwards compatibility, and so user's can disable the functionality if not needed.

I was thinking the following for functionality:

  • Add a collapsible side-pane on the left of the media browser. This side-pane displays a hierarchical tree view of folders.
  • Each folder can contain media or other folders.
  • Each folder displays the number of media items that are inside of it, or nothing if there are no media items inside of it.
  • Folders can be added via a + button, and will add within whatever folder you currently have open. They can be deleted by selecting them and clicking delete. They can be renamed by clicking them and clicking rename (could do this via a right-click context menu instead as well)
  • Clicking on a folder filters the displayed media by media that are in that folder. It does not show media within children folders of the selected folder.
  • When using the search field, filters or selecting tags, only folders that have media matching these filters are displayed - the rest of the folders are hidden from the tree view temporarily. The media counts next to the folder names are also updated
  • Add a search box within the folder tree for searching by folder names, to filter the list of folder names
  • Create an "unorganised" folder for showing images that have yet to be moved into a folder, so that users can upload imagery that doesn't need categorisation, or bulk upload to be sorted at a later date
  • Allow folders to "collapse", temporarily hiding nested folders in the tree view

Will also need to think about how to display this if a user opens it from an Image field. Whether it can just look the same or would need to be adjusted at all

Future Extensions
Other functionality we could consider later on is:

  • Re-ordering of folders in the tree view, i.e. manual ordering via drag and drop, or automated ordering like alphabetical or last modified
  • Selecting multiple folders at once for bulk actions, such as delete

@SimeonGriggs / @robinpyon let me know if this would be a welcome addition to this plugin. Do let me know your thoughts on the feature set as well so it may better match your vision. The requirements above are just my initial thoughts

Or if you'd rather not integrate it for maintenance concerns, let me know too, and I'll see if I can stand-alone it as an add-on instead

@AMarlonG
Copy link

@Jamiewarb

I applaud this to the max.
I am not much of a programmer for these types of issues, but if you need someone for testing, or any advice just shout out.
I work as a project leader for web dev projects and can think thoughts, analyze and prioritize well.

I'm suprised Sanity isn't more interested in this themselves. Too much AI focus for them too ...? 😏

@Jamiewarb
Copy link

Hey @SimeonGriggs or @robinpyon, just wanted to follow this up to ask if you'd be interested in its addition?

@SimeonGriggs
Copy link
Contributor

Hey @Jamiewarb let me bring it up internally and get someone to get back to you!

@jtpetty
Copy link

jtpetty commented Apr 30, 2024

@Jamiewarb - I am an engineering manager at Sanity. It seems this is a long standing feature request that we have been unable to prioritize. I would welcome your contribution. Let's see what the code looks like in a PR and we can decide then if we feel it is too much of a maintenance burden but start with the intent that we merge it in.

@michaelmannucci
Copy link

@Jamiewarb did you end up building it and are asking if they want it? Or you have not built it yet?

Cuz I need it either way! 😅

@Jamiewarb
Copy link

Hey @jtpetty sounds great :) I'll aim to deliver something in the next 1-2 months, as the project I'm working on needs this for July. Hopefully it's closer to 1 than 2.

I'll aim to open a PR with an initial implementation, without some of the features I mentioned above, so that we can an early review and course correct if need be. Then I can add the rest.

And sorry @michaelmannucci it's going to be a little bit longer from my side

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

9 participants