decaporg / decaporg/decap-cms

Directory navigation in the media library

Open
#3,240 26 comments 95 reactions 0 assignees View on GitHub
area: media-library area: ui kind: discussion kind: feature pinned status: needs design
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**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:

- A markdown collection has existing entries
- Images in the bodies of those files come from multiple directories
- The best the CMS can do currently is show one configured directory in the media library for the entire collection
- Images that are not sourced from the configured directory aren't visible
- Even if we made it so they were visible, the directories they point to are still inaccessible from the media library

**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**
- Allow multiple folders to be used
- Allow nested folders
- Allow users to create folders

**Proposed approach**
- Keep accepting a single media folder in the config, as we do currently
- Show a list of folders found within the media folder on the left side of the media library
- Use breadcrumbs to track position in the hierarchy
- Allow new folders to be created via an input after the last folder in the list with placeholder "new folder"
- Allow folders to be deleted via a button that shows on hover of each folder
- Folders must be empty to delete

**Describe alternatives you've considered**

No support.

**Additional context**

Replaces #1046.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.