firecmsco / firecms

Awesome Firebase/Firestore-based CMS. The missing admin panel for your Firebase project!
https://firecms.co
Other
1.14k stars 185 forks source link

Feature request: Custom actions in entities #544

Closed ciriousjoker closed 7 months ago

ciriousjoker commented 1 year ago

It would be very useful if documents could be marked as "draft" before being written to Firestore. Currently, a "isPublished" or "publicationStatus" field is necessary for every collection and the client needs to do the filtering.

Potential solution:

fgatti675 commented 10 months ago

Hi @ciriousjoker I am reformulating this request as allowing developers to add custom actions to documents. that way you could set up your own logic

ciriousjoker commented 10 months ago

I think the validation part isn't included in that. Moving documents is easy via that, but draft documents should have optional validation.

I guess making each validation property conditional might work, but having a single toggle for the whole collection is much more convenient and creates less boilerplate code.

This is probably a separate issue though. The custom actions definitely solves 80% here

fgatti675 commented 7 months ago

Hi @ciriousjoker It is not well documented yet, but you can add custom actions to entities now, and they show up both in the collection view and the form view :)