benwinding / command-pal

The hackable command palette for the web, inspired by Visual Studio Code.
https://benwinding.github.io/command-pal/docs
MIT License
75 stars 8 forks source link

Include directions for closing command-pal when blur is disabled. #32

Closed rouilj closed 1 year ago

rouilj commented 1 year ago

Your edit missed the directions on how to close an open palette when blur is disabled.

rouilj commented 1 year ago

Also you might want to add this command snippet:

  {
       name: "toggle commandPalIgnoreBlur",
       handler: () => ( commandPalIgnoreBlur = !commandPalIgnoreBlur ),
  },

I got really tired of typing that while debugging 8-). Also I usually enabled IgnoreBlure in the script. So testing on mobile without this command was difficult.

benwinding commented 1 year ago

Also you might want to add this command snippet:

  {
       name: "toggle commandPalIgnoreBlur",
       handler: () => ( commandPalIgnoreBlur = !commandPalIgnoreBlur ),
  },

I got really tired of typing that while debugging 8-). Also I usually enabled IgnoreBlure in the script. So testing on mobile without this command was difficult.

Great idea, maybe that command could be injected if the commandPalIgnoreBlur is set? 🤔

rouilj commented 1 year ago

Maybe. I would leave it for the user to add/remove. I don't think that command-pal should be changing the commands.

I am looking at implementing a hidden: boolean property for commands so they can hide commands without having to rewrite the command array.

They could also use my contexts idea expressed in:

https://dev.to/rouilj/implementing-a-command-palette-and-task-timer-part-1-12j7