-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: folder enabled collections #10030
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
Conversation
Excited for the folders! Thank you so much, everyone. You all are rocking it! |
@@ -115,6 +115,14 @@ export const renderDocumentSlots: (args: { | |||
} | |||
} | |||
|
|||
if (collectionConfig.upload && collectionConfig?.admin?.components?.edit?.Upload) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
collectionConfig.upload
throws a type error for globals. It needs to be collectionConfig?.upload
.
I discovered this while testing #9925.
Hey @JarrodMFlesch, |
hey, is there an ETA for "non-enterprise" users? |
🚀 This is included in version v3.39.0 |
@JarrodMFlesch I have a config with
on
It feels like |
Another question: Is it by design that the folder structure is common between Collections? |
Hi Payload team, exciting release! Have just started testing this out on a fresh install of the website template, something seems to be triggering:
Reprod:
Hope this helps! Loving the feature otherwise, only other comment would be something already discussed prior - it is pretty confusing returning to the default List view on the link trail from the edit page. Could a partial solution be to allow forcing the folder view in the collection config, then only ever show the folder trail for documents in that collection? |
Can someone tell me why /**
* Enables folders for this collection
* @deprecated this property will move out of `admin` in the next patch
*/
folders?: CollectionFoldersConfiguration; What is the correct way of enabling it for a collection, then? |
Works like a charm. Thanks to everyone who made this possible. |
In the next release it will not be under |
Thanks for reporting, will have a fix for this in the next release - its Postgres specific since ids are numbers by default. |
I totally agree. It is such a typical case that you want to have logically completely different groupings between collections. |
We are talking through how to support this internally, we agree! |
In the next release this will be fixed, thanks for reporting! |
Another counterintuitive behaviour of the Folders is that when you browse a collection By Folder, create a new folder, navigate into it, and then click Bulk Upload, one would expect that all these bulk-uploaded images would land in the currently selected folder, but the fact is that they don't. If you click Create Document within a folder, then the newly uploaded image gets the folder assigned correctly, but not for the bulk upload. |
It would also be great if the list view of a folder-enabled upload collection looked like it is in the All Media mode, i.e. with image previews, selectable columns, and filters. |
Can this view be compatible in drawers? It sucks being restricted to the table view when selecting from a related, upload enabled, collection with folders enabled. |
#10030 adjusted the default `Pill` component size but forgot to set the column selector pill sizes to small ## Before  ## After 
I needed a way to automatically upload new media files to the nested current month folder (YYY/MM), if no folder is set. This is the default behaviour in WordPress, and I wanted to replicated it. This is what worked for me, if anyone needs it or has a better way.
|
…g to support I18nClient too (#12576) In one of the versions we've changed the type of the argument from `I18n<any, any>` to `I18n<unknown, unknown>` and this has caused some issues with TS resolving the type compatibility in the `formatDate` utility so it no longer supports `I18nClient`. This type change happened in #10030
Heads up: There is a RFC Discussion opened around the Global/Collection scoping of folders at #12729 |
### What? Fixes inconsistent `pill` sizes across the Admin Panel. ### How? Pills without a specified size default to **medium**. In the folders [PR](#10030), additional padding was to the medium size. As a result, any pills without an explicit size now appear larger than intended. This PR fixes that by updating any pills that should be small to explicitly set `size="small"`. Fixes #12752
You can enable folders under the
folders
key in the root config, here is the type:To enable a collection, in the collection config you will need to add: