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

Volume folder nav improvements (Craft 3) #12558

Merged
merged 44 commits into from
Feb 1, 2023
Merged

Conversation

brandonkelly
Copy link
Member

@brandonkelly brandonkelly commented Jan 21, 2023

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

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
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
Member Author

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

@alexkuzmin
Copy link

alexkuzmin commented Jul 14, 2023

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