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

Interpolates messages with variables #4

Merged
merged 11 commits into from
Mar 17, 2023
Merged

Conversation

hugobarauna
Copy link
Member

@hugobarauna hugobarauna commented Mar 10, 2023

This PR adds the feature of interpolated messages.

  • add a text inside the help message explaining the interpolation syntax

The interpolation syntax is the same one from KinoDB. One can write a slack interpolated message like this

CleanShot 2023-03-10 at 14 27 34

Copy link
Member

@jonatanklosko jonatanklosko left a comment

Choose a reason for hiding this comment

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

Just some tiny nitpicks, looks great :)

@hugobarauna
Copy link
Member Author

@jonatanklosko @josevalim I think I handled all of your suggestions. I learned a lot in the process; thanks!

Can you give it one last check, please?

]
}

args ++ [interpolation_node]
Copy link
Contributor

Choose a reason for hiding this comment

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

You want to avoid appending to the end of the list, because it is expensive. The idea is that you always prepend and at the end you call Enum.reverse. This will also make operations such as append_string faster and easier, because you only need to access the head of the list. :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. ✅

@hugobarauna
Copy link
Member Author

@josevalim applied your last feedback regarding avoiding appending to the end of a List. I think we're good to now.

Want to take a last look?

@hugobarauna hugobarauna merged commit cadccbd into main Mar 17, 2023
@hugobarauna hugobarauna deleted the hb-interpolated-message branch March 17, 2023 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants