decaporg / decap-cms

A Git-based CMS for Static Site Generators
https://decapcms.org
MIT License
17.84k stars 3.04k forks source link

Directory navigation in the media library #3240

Open erquhart opened 4 years ago

erquhart commented 4 years ago

Is your feature request related to a problem? Please describe.

This feature would be extremely useful in general, but is a requirement for the following common use case:

Describe the solution you'd like

For sites of any complexity, Eg., large existing open source docs sites, which Open Authoring was created for, navigating directories in the media library is a necessity.

From https://github.com/netlify/netlify-cms/issues/1046#issuecomment-395206762:

Requirements

Proposed approach

Describe alternatives you've considered

No support.

Additional context

Replaces #1046.

andy-mcdonald commented 4 years ago

We're building a content portal for a client, where different publishing partners would add articles to their own collections. Each publisher should only be able to see their own content, but our client should be able to see everything. To accomplish this, we're going the route of creating multiple CMS instances, each configured to access only a subset of the content files - seems to work like a charm... except when it comes to the media library.

If I set the media_library to /static/assets/<publisher-name> then each publisher can only see the images they upload - good. For the client, I'd want to set the media folder to /static/assets and have all the sub-folders in that directory appear.

@erquhart - Sounds like this would be totally possible based on your description above. Is this likely to drop anytime soon? I could potentially get one of my developers to help out if you have a clear solution in mind?

erezrokah commented 4 years ago

Hi @andy-mcdonald, we try to work our way through the most up voted issues first, but of course open to any contribution.

Currently we list media files based on the media folder up to a depth of 1, but that can be changed (example for GitHub) here: https://github.com/netlify/netlify-cms/blob/2409323dba1abe8a670d18453369fd75c6e240fb/packages/netlify-cms-backend-github/src/implementation.tsx#L377

Media library components can be found here: https://github.com/netlify/netlify-cms/tree/2409323dba1abe8a670d18453369fd75c6e240fb/packages/netlify-cms-core/src/components/MediaLibrary

Another option it to incorporate it into the general UX overall here

andy-mcdonald commented 4 years ago

@erezrokah - Thanks for the update, we'll look into this alongside some of the other contributions we'd like to make.

erezrokah commented 4 years ago

@andy-mcdonald, if you do start actively working on something, please let us know so we can assign it to you so people know it is taken :)

erquhart commented 4 years ago

@andy-mcdonald woot!! πŸŽ‰

bugii commented 4 years ago

Such a cool feature :) Any update on this?

neilmorton commented 4 years ago

This feature seems like a very important addition.

Is anyone actively working on this? Any view on timescale?

Thanks.

erezrokah commented 4 years ago

Hi @neilmorton, Netlify CMS is a community driven project, this is not on the radar at the moment but we would love a contribution for it.

neilmorton commented 4 years ago

Hi @erezrokah, thanks for the heads up. I'd be interested if @andy-mcdonald did anything with this.

surjithctly commented 4 years ago

I think this is a must have feature for netlify cms, since in most big projects, images are organized in subfolders.

I know this can take some time to implement. But is it possible to prioritize this?

franva commented 4 years ago

hit the same need. Hopefully we can see this feature soon~!

neilmorton commented 4 years ago

@franva and @surjithctly if you haven’t already, make sure to up vote the original post, as they tend to work on the most up voted issues first. πŸ‘

franva commented 4 years ago

sure @neilmorton what's the original post? so do you mean that we already have this feature implemented? I'd love to see it~!

surjithctly commented 4 years ago

@franva I guess he meant the first comment of this issue where people did thumbs up πŸ‘

neilmorton commented 4 years ago

@franva, as @surjithctly has mentioned, add a thumbs up πŸ‘ to the first comment on this issue here if you haven't already done so.

The feature hasn't been implemented, but issues with more thumbs up πŸ‘ tend to get chosen for action.

Thanks @surjithctly

franva commented 4 years ago

thanks @surjithctly and @neilmorton I have thumb-upped this issue πŸ‘

andrew-paterson commented 3 years ago

@erquhart having had a cursory look at the code, I would like to make an attempt at this, unless someone else is currently working on it?

erezrokah commented 3 years ago

Hi @andrew-paterson, we would love a contribution for this. Please know that this will require a fair amount of work. Regardless I recommend looking at https://github.com/netlify/netlify-cms/issues/2557 as I think it would be best to include this issue as a part of that effort.

andrew-paterson commented 3 years ago

I have created https://github.com/netlify/netlify-cms/pull/4670 as a very small first step. I'd like to clarify a few things, which I have listed in the PR before continuing.

5310 commented 2 years ago

It's been a while since there's been any activity on this. Are you guys still planning to add filesystem navigation in the media library? It'd really help nested collections reuse assets for subpages :blush:

Schotsl commented 1 year ago

I would love this!

ktully commented 3 months ago

It wouldn't address the arbitrary or nested subfolders use case, but has anyone considered changing the main media tab to bring up the same collections menu as Contents, when multiple media folders are configured against the content collections?

The media lightbox could then popup with the relevant directory view only after a content type was selected from the left menu. It feels like most of the code to achieve this should already exist, given the content editors do this under the hood today.

(A virtual content type would probably have to be added to the top of the menu representing the default global media location.)

ktully commented 3 months ago

Alternatively, a global config option to optionally have the Media tab lightbox use the media folder for the currently selected content type.

pktiuk commented 1 month ago

Issue linked with: https://github.com/decaporg/decap-cms/issues/2113
(In that one a broken link to netifycms is posted as an answer)