-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(Table): Conditional actions #165
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/espressive/cascara/J8tefv3usYuK76HZ41SmxZ5cqxsZ |
I think I do like the concept of this function... I think however that we still will need to make the breaking change of moving What probably makes the most sense is creating the new We can go over each of these in our meeting on Tuesday when you are back. Thank you for putting this together. It looks like this gets us part of the way there. 💪🏽 |
a040e3a
to
7427878
Compare
@lordpixel this looks good to me... however, this is not a breaking change yet, right? Tables will still work with the old API. The only difference is that we added the new API and a deprecation notice for the old API so devs know it is going away. We only want to define something as a breaking change once existing implementation goes away... and we hopefully only have to do that after giving a few releases for developers to get their implementations migrated, which is what we are doing here. <3 |
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.
Please change the tagging of this PR to feat since we are not breaking anything yet. The old API should still work for a couple releases with a warning message.
You are right @brianespinosa, this is not a breaking change as we are still supporting the old way of defining actions. It somehow got stuck in my mind. Fixed, thanks! |
Hi team,
This is a PoC on how we could handle
conditional actions
for Table.This would add to Table:
opt-in
propresolveRecordActions
. A function that receives 1) the current record and 2) the list of actions defined for the table; and returns the set of actions for that specific record.How to test
yarn cosmos
Conditional actions
fixture