Skip to content

Conversation

@JarrodMFlesch
Copy link
Contributor

@JarrodMFlesch JarrodMFlesch commented Jun 6, 2025

Moves folder rendering for collection-folders view, browse-by-folders view and the move-to-folder drawer. This is how the rest of payload behaves, following this same paradigm allows the feature to integrate well with other things such as the multi-tenant plugin.

Copy link
Contributor

@DanRibbens DanRibbens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't get all the way through this.

* This will ensure that prefs are only updated when explicitly set by the user
* This could potentially be done by injecting a `sessionID` into the params and comparing it against a session cookie
*/
const browseByFolderPreferences = await upsertPreferences<{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the right way to do this, new ServerFunction perhaps?

})
} catch (error) {
// eslint-disable-next-line no-console
console.error('Error moving items:', error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have toast the error instead of swallowing it?

Copy link
Contributor

@DanRibbens DanRibbens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider the couple places you had console.error adding toast. Otherwise it looks good to me.

@JarrodMFlesch JarrodMFlesch merged commit a43d1a6 into main Jun 10, 2025
77 checks passed
@JarrodMFlesch JarrodMFlesch deleted the feat/ssr-folder-views branch June 10, 2025 15:56
@github-actions
Copy link
Contributor

🚀 This is included in version v3.43.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment