Add action button support for external package activities #828
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
Add action button support for external package activities.
Why
The activities package does not have a nice interface for using it as
action buttons. The activities are structs so are not supposed to be
inserted manually by the user. So the mapping function from activity
name to activity struct has to be used. The functions does also not
output an acknowledgment as a string to the minibuffer which is nice.
So these functions try to remediate that while keeping the same
naming convention and arguments as the functions from activities.
Note
This does on purpose just add the functions for feedback. MANIFEST
item, and possibly tests, will be added if this is the way we want to
go. See ideas below for a maybe more Hyperbolish way...
Ideas 1
The action function could be overloaded with more functionality like
this:
set the default state.
Then only one function could cover the cases for create, resume,
revert and define default state. Not bad!
Ideas 2
Since we are redefining this to be different than what activities
provide we could define an implicit button for this. Something like