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

config quicklink from extension #1461

Closed
chyroc opened this issue Apr 22, 2022 · 2 comments
Closed

config quicklink from extension #1461

chyroc opened this issue Apr 22, 2022 · 2 comments
Labels
api Issues related to API feature request New feature or improvement

Comments

@chyroc
Copy link
Contributor

chyroc commented Apr 22, 2022

Describe the feature and the current behavior/state.

  1. update package.json

add command mode: quicklink to package.json

  "commands": [
    {
      "name": "google-search",
      "title": "Search Google",
      "description": "Search Google",
      "mode": "quicklink"
    },
  1. create src/google-search.tsx
export default async (query: string): Promise<string> =>{
	return `https://google.com/search?q=${query}`
}
  1. render quicklink

image

Will this change the current API? How?

no

Who will benefit from this feature?

developers and users

Any Other info.

@chyroc chyroc added api Issues related to API feature request New feature or improvement labels Apr 22, 2022
@pomdtr
Copy link
Contributor

pomdtr commented Apr 22, 2022

I think this is essentially the same as adding args to no-view commands (#59):

"commands": [
    {
      "name": "google-search",
      "title": "Search Google",
      "description": "Search Google",
      "mode": "no-view",
      "args": [
          {"type": "string", "placeholder": "query"}
       ]
 }

Then command with one args could be used as fallback commands (similarely to script commands).

@peduarte
Copy link
Contributor

peduarte commented Jan 4, 2023

Hey, what @pomdtr is correct. This can be achieved via a no-view Command, then set as Fallback Command. Thanks!

@peduarte peduarte closed this as completed Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issues related to API feature request New feature or improvement
Projects
None yet
Development

No branches or pull requests

3 participants