Skip to content

Volume folder nav improvements (Craft 3) - #12558

Merged
brandonkelly merged 44 commits into
3.8from
feature/volume-folder-nav-v3
Feb 1, 2023
Merged

brandonkelly merged 44 commits into
3.8from
feature/volume-folder-nav-v3

Conversation

@brandonkelly

@brandonkelly brandonkelly commented Jan 21, 2023 •

Copy link
Copy Markdown
Member

Description

Revamps how volume subfolder navigation works within asset indexes, to improve performance and usability.

Instead of trying to display every recursive subfolder within the sidebar as nested sources (which had a tendency to crash the browser on sites with 1K+ subfolders), we now show subfolders inline within the element listing pane:

An Assets index page, showing four folders and two assets side-by-side in the element listing pane.

Subfolders are always displayed first, generally in ascending alphabetical order, or descending order if assets are being sorted by Title or Filename in descending order.

As you navigate into subfolders, the current path is shown in the new “source path” component, above the element listing.

An Assets index page, navigated to the “art → van-gogh” subfolder.

Clicking on a parent folder within the source path will navigate to it. (Command-clicking to open the folder in a new tab is also supported.)

The currently active subfolder in the source path has a disclosure menu, with “New subfolder”, “Rename folder”, “Move folder”, and “Delete folder” options.

Additionally, a new “Move…” bulk element action has been added for asset indexes, which supports moving subfolders alongside other assets. Selecting it will open a new folder selector modal where a new destination can be chosen.

The new volume folder selector modal.

Related issues

# Conflicts:
#	src/web/assets/cp/dist/cp.js
#	src/web/assets/cp/dist/cp.js.map
#	src/web/assets/cp/src/js/AssetIndex.js
@brandonkelly
brandonkelly requested a review from a team as a code owner January 21, 2023 04:04
@brandonkelly
brandonkelly changed the base branch from v3 to 3.8 January 21, 2023 04:26
@michaelrog

Copy link
Copy Markdown

This is so nice. Chef kiss. 😙🤌

@brandonkelly
brandonkelly merged commit af2c864 into 3.8 Feb 1, 2023
@brandonkelly
brandonkelly deleted the feature/volume-folder-nav-v3 branch February 1, 2023 22:41
@sebastian-lenz

Copy link
Copy Markdown
Contributor

Hey, I really like the new folder navigation style, in most cases this is a lot easier than having to poke around in a long list of folders in the sidebar.

Currently I see one big regression though, when I select assets through an element select input (like within a reference field), the modal does not remember the last subfolder I was in and instead always starts at the top folder. Therefore the user has to constantly navigate to the subfolder he was just working in.

Previously the element select input used the the modealStorageKey setting to remember the last active subfolder, this behavior seems to be gone right now. I think it would be great if we could have that functionality back as it improves the editing experience. Maybe we could also offer to quickly navigate to the last used folders, as editors tend to work on a certain area of a site the usually corresponds to some asset folders (e.g. a certain article or news)?

@brandonkelly

Copy link
Copy Markdown
Member Author

@sebastian-lenz Can you post a new issue with steps to reproduce?

@alexkuzmin

alexkuzmin commented Jul 14, 2023 •

Copy link
Copy Markdown

The subfolders right now are shown as-is in the paths of assets, e.g. https://craft-site.com/assets/Träger/my-example-image.png. Would it be possible, to make aliases for subfolders - so that editors, in case of previous example, would see Träger, but in path one can set traeger for that subfolder? Thanks.

@brandonkelly

Copy link
Copy Markdown
Member Author

No, as Träger and traeger could both co-exist as unique folder names.

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

Successfully merging this pull request may close these issues.

4 participants