feat: implement custom template description functionality for clubhouse #1718
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🌟 What does this PR do?
This PR allows for users to customize the toggl story description format for the Clubhouse integration. My team is using this branch currently as we have this requirement, so thought it might be worthwhile to share it.
This PR adds a new 'Clubhouse' tab to the Settings page, where the user can enable custom description templates.
If it is not enabled: the story description uses the same function (though renamed) as before.
If it is enabled: the user can use any of the currently available selector functions (specifically for Clubhouse in this case) to generate their own custom formatted story description. This is done by using curly braces to denote selector functions.
For example our team uses the format: "[epicName] [storyId] - [storyDescription]". With this PR this could be accomplished by using "{{ epicName }} {{ storyId }} - {{ storyDescription }}" . And the values populate dynamically when the toggl-button is clicked in clubhouse.
We also will be using a similar functionality for JIRA, and maybe BitBucket, so it is built in a way that (hopefully) it will be easy to implement for those integrations, and others as well.
Thanks!
🐛 Recommendations for testing
All changes should be tested across Chrome and Firefox.
Alot of the design on the 'settings' end is more or less copied from the Pomodoro implementation, as I assume that this is an acceptable convention to follow.
The previous function was called getDescription, this has been changed to getStoryTitle, the functionality there was not changed.
📝 Links to relevant issues or information