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

[5.x] Ability to customize columns in the Asset Browser #10806

Open
wants to merge 12 commits into
base: 5.x
Choose a base branch
from

Conversation

duncanmcclean
Copy link
Member

@duncanmcclean duncanmcclean commented Sep 16, 2024

This pull request makes it possible to customise the columns in the Asset Browser.

Closes statamic/ideas#202.
Partially addresses statamic/ideas#1002.

To Do

  • UX: Figure out the best way to handle folders when the first column isn't the filename
  • UX: When switching between Grid & List view, the customize column button disappears/reappears. What's the best way to handle this? (maybe it's fine 🤷‍♂️)
  • Fix issue with actions column on folders
  • The setColumns logic is duplicated in BrowserController/SearchedAssetsCollection/Fieldtypes\Assets. Figure out a way to DRY this up.
    • In an ideal world, we'd be using a resource for the "all assets" listing request. However, due to the fact we're returning multiple types of "things" (folders & assets), we're not doing that here, hence the duplication. Need to think about the best place to put this. 🤔
  • Ensure it works fine with the Assets fieldtype
  • Fix failing tests

@duncanmcclean duncanmcclean changed the title [5.x] Add the ability to customize columns in the Asset Browser [5.x] Ability to customize columns in the Asset Browser Sep 16, 2024
@ebeauchamps
Copy link
Contributor

FR: I would also like to have a way to define a default sort order for the assets in the CP (just like for entries). Anything in the works about this? thanks!

@duncanmcclean
Copy link
Member Author

duncanmcclean commented Oct 2, 2024

@ebeauchamps You can actually do that already, see the "Assets" page on the docs: https://statamic.dev/assets#default-sort-order-in-listings

@duncanmcclean duncanmcclean marked this pull request as ready for review December 3, 2024 19:31
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.

Customize columns for asset browser
2 participants