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

Replace +prop and +flow with a property in the db field for the trigger #4

Open
FranciscoG opened this issue Jan 7, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@FranciscoG
Copy link
Owner

FranciscoG commented Jan 7, 2020

Right now you can add +prop or +flow and their optional emoji +prop=fire to the trigger string to make a trigger prop/flow.

I'm not happy with this solution because there is a lot of string parsing and replace needing to be done and feel like there's just too much margin for error there so I want to replace it with a command function that will update a property of the trigger in the db.

proposal:

!propify <trigger_name> [optional emoji]
!flowify <trigger_name> [optional emoji]

This will update a property in the trigger object:

{
 // ...
    givesProp: Boolean,
    propEmoji: String,
    givesFlow: Boolean,
    flowEmoji: String,
// ...
}

propEmoji and flowEmoji are optional. If the property doesn't exist or the value is null|undefined then a default emoji will be used which are: ✊ and 🏄

This means a refactor of a few areas and the addition of 2 new commands. Off the top of my head:

  • replace the check for +prop|flow here with a new check of the property
  • update triggerPoint util
  • will have to write a one time script that will go through the entire database and remove all of the existing +prop|flow and create the new fields in the database
@FranciscoG FranciscoG added the enhancement New feature or request label Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant