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

Introduce mode property on command bar actions #9272

Open
FelixMalfait opened this issue Dec 29, 2024 · 1 comment
Open

Introduce mode property on command bar actions #9272

FelixMalfait opened this issue Dec 29, 2024 · 1 comment
Assignees

Comments

@FelixMalfait
Copy link
Member

FelixMalfait commented Dec 29, 2024

We need to refactor actions to build them as a components instead of as an onclick handler.

And then when declaring an action we should be able to set a mode property.

mode = view (component is displayed in sidebar)
mode = no-view (component is loaded in background)

As a first view example we should do a followup of this PR and introduce PDF/Word options.

To build this first view we need to build a simple frontend api for sub-commands like Raycast does: https://developers.raycast.com/api-reference/user-interface/action-panel ; I guess we already built something similar for the first level of action? We just need to make sure the API is as nice and simple

@FelixMalfait
Copy link
Member Author

Maybe no-view = expects a hook / function, and view = expects a React component? Or even inferred dynamically? (not sure it's a good idea)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants