Skip to content

Conversation

@matsl
Copy link
Collaborator

@matsl matsl commented Dec 7, 2025

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:

  • If no activity with that name exists, then create the activity
  • If the activity is not active, switch to its latest state
  • If the activity is active, revert it to its default state
  • If the activity is active and action is called with a prefix then
    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

"Activity:Name"

@matsl matsl requested a review from rswgnu December 7, 2025 22:53
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.

2 participants