Skip to content

Add universal-commands extension - #13129

Merged
raycastbot merged 7 commits into
raycast:mainfrom
cyxn:ext/universal-commands
Jul 25, 2024
Merged

raycastbot merged 7 commits into
raycast:mainfrom
cyxn:ext/universal-commands

Conversation

@cyxn

@cyxn cyxn commented Jun 23, 2024 •

Copy link
Copy Markdown
Contributor

Description

Sometimes, I encounter difficulties in finding the right shortcut for the same action across different applications.
For instance, in various meeting platforms like Google Meet, Slack Huddle, and Zoom, each has a different shortcut for
muting the microphone.
Furthermore, in Slack, the ability to rebind shortcuts is limited.

To address this issue, the solution is the Universal
Commands extension for Raycast. This extension provides users with the ability to
configure commands to execute specific shortcuts based on the application in use. As the result, users can use a single
command to toggle between mute and unmute, and this action will be tailored to the current application and it will
execute corresponding shortcut.

Screencast

CleanShot.2024-06-23.at.13.54.49-converted.mp4

Checklist

- add screenshots of extension, improve language of forms
- Merge pull request raycast#2 from cyxn/NEW-FUNCTIONALITY
- fix typing and prettify code
- Only one key could be passed in shortcut
- add run command
- Fix comments
- Add create, edit and delete command functionality
- add extension icon
- ensure hotkeys work without modifier
- fix build
- improve readme, add manage custom commands
- initial draft version
@raycastbot

ghost commented Jun 23, 2024 •

Copy link
Copy Markdown
Collaborator

Congratulations on your new Raycast extension! 🚀

We're currently experiencing high demand and limited capacity. As a result, extension reviews might take longer than usual to get the initial review. Please expect an initial review within 5-10 business days.

Once the PR is approved and merged, the extension will be available on our Store.

Sorry for the inconvenience

@raycastbot raycastbot added the new extension Label for PRs with new extensions label Jun 23, 2024
@mil3na

ghost commented Jul 2, 2024

Copy link
Copy Markdown
Contributor

Hi!
Thank you for your contribution! My name is Milena and I will be reviewing it today.

Is your extension designed for working on web apps only? Also, how come it would be different in functionality than adding the option to be app/website specific to this extension? https://www.raycast.com/HelloImSteven/keyboard-shortcut-sequences

@mil3na mil3na self-assigned this Jul 2, 2024
@cyxn

ghost commented Jul 3, 2024 •

Copy link
Copy Markdown
Contributor Author

Hi Milena!

Is your extension designed for working on web apps only?
It works with both web applications and mac applications.

My extension is different from the one mentioned above and aims for a different use case. The extension above can't solve my use-case.

Good example of usage of my extension is toggle mute/unmute for different call apps (zoom, google meet, teams, slack etc). In different apps, it is a different shortcut. You can't remap the shortcut in Slack and Google Meet, and both are different. With my extension, you can use the same Raycast command for all your apps to toggle mute/unmute. Extension will execute the correct shortcut under the hood depending on what app is opened right now. Mute/unmute is just an example. You can build your own universal commands.

@mil3na

ghost commented Jul 3, 2024

Copy link
Copy Markdown
Contributor

Hey! I think you didn't answered my question. I saw you example, but my question is: the only difference I see from your extension and the one I pointed out was the app awareness, which I believe can be added to the other extension. Are there any other differences I am missing?

@cyxn

ghost commented Jul 3, 2024

Copy link
Copy Markdown
Contributor Author

It is an entirely different perspective. My extension is more like if/else, depending on what app is running.
1/ There is no sequence of shortcuts — just a single shortcut that will be executed only to that exact app.
2/ If app is not matched, it won't execute any shortcut. keyboard-shortcut-sequences will always send shortcuts whatever is set up
3/ because of the different perspective and use cases: UI, commands, and naming of commands/extensions are tailored to that exact envisioned experiences.

I think the main point from me is — it is not only about the number of differences but more about how huge that single difference is.


If you still believe those two extensions should be together, I can foresee that it will be quite challenging:

  • to put it together in convenient UX
  • position it properly in terms of naming (keyboard-shortcut-sequences doesn't really explain my use-case)

But before diving into that, I want to hear your thoughts.

@mil3na

ghost commented Jul 4, 2024

Copy link
Copy Markdown
Contributor

I will do some thinking and will get back to this review tomorrow!

@mil3na

ghost commented Jul 5, 2024

Copy link
Copy Markdown
Contributor

I guess I understand the use case of this. However I have a few comments:

  • The "run command" command expects an id that I'm not sure where to get it. Can you explain to me why this command is necessary?
  • I miss a "Create Command" command, it took me a while to find it on the action menu
  • Maybe an option to pin or favorite commands on the list would be useful?

Please, take a look at my comments and tell me what you think :)

@cyxn

ghost commented Jul 5, 2024 •

Copy link
Copy Markdown
Contributor Author

The "run command" command expects an id that I'm not sure where to get it. Can you explain to me why this command is necessary?

The command is meant to be called by a Raycast QuickLink rather than by the user directly. When you view list of commands, you can create it as quicklink. This is the way I call my commands.
Do you think I should enter the primary action (instead of running the command) to guide users using it the same way I do?

CleanShot 2024-07-05 at 16 06 50

Maybe an option to pin or favorite commands on the list would be useful?

The way it works right now is that the list is auto-sorted by the frontmost application. Pinning may be additional nice thing but in my eyes "List Custom Commands" is mostly for managing the commands rather than running them. QuickLink, I believe, is the right way to call your shortcuts. But who knows, maybe it's only me who thinks QuickLinks is the best way to call commands. This is why the primary action is to run the command and not save it as quick link — I want users to use the extension the way it works best for them.

@cyxn

ghost commented Jul 5, 2024

Copy link
Copy Markdown
Contributor Author

I miss a "Create Command" command, it took me a while to find it on the action menu

yes, it is cmd + N in "List Custom Commands".

Should I create new command just for create flow?

@mil3na

ghost commented Jul 9, 2024

Copy link
Copy Markdown
Contributor

Do you think I should enter the primary action (instead of running the command) to guide users using it the same way I do?

Yes!

Should I create new command just for create flow?

I believe so. It would make the process easier.

But who knows, maybe it's only me who thinks QuickLinks is the best way to call commands. This is why the primary action is to run the command and not save it as quick link — I want users to use the extension the way it works best for them.

It's up to you. I'd recommend to implement this now, but you can wait for user feedback as well. Anyway, I would explain your vision on the README file anyway, to avoid confusion.

@cyxn

ghost commented Jul 14, 2024

Copy link
Copy Markdown
Contributor Author

I have updated my extension, @mil3na please look

@mil3na

ghost commented Jul 16, 2024

Copy link
Copy Markdown
Contributor

Hi!
Thanks for addressing my comments!
Talking about comments, I see some commented code, do you mind removing it, if it is not relevant?
And I still don't understand how to get the input for the Run Custom Command command.

@cyxn

ghost commented Jul 16, 2024 •

Copy link
Copy Markdown
Contributor Author

And I still don't understand how to get the input for the Run Custom Command command.

as I said, the command is not supposed to be used by the user directly. You can create a Quicklink to the command (for example mute/unmute) from "List Custom Commands" command. This Quickling will use Run Custom Command

- Merge branch \'contributions/merge-1721150201782028000\'
- Pull contributions
- cleanup mock.ts file

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that can be done in a better way. And explained on your README file. Remember, not every user will have the same context as you. Let me know if you want to brainstorm this.

@cyxn

ghost commented Jul 18, 2024

Copy link
Copy Markdown
Contributor Author

I have updated my extension. I think it should guide a user really well. If the user runs a command without an id, it will pop the list of commands with the primary action to run (by hitting enter).
When user goes to "manage" command, primary action would be to save it as quicklink

@cyxn
cyxn requested a review from mil3na July 20, 2024 11:31

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Thanks you so much for your effort!

@raycastbot
raycastbot merged commit 27f119e into raycast:main Jul 25, 2024
@github-actions

ghost commented Jul 25, 2024

Copy link
Copy Markdown
Contributor

@raycastbot

ghost commented Jul 25, 2024

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

@cyxn
cyxn deleted the ext/universal-commands branch July 25, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new extension Label for PRs with new extensions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants