Git Product home page Git Product logo

extensions's People

Contributors

404j avatar aayush9029 avatar anhthang avatar danulqua avatar eluce2 avatar erics118 avatar fe9lix avatar fezvrasta avatar grzegorzkrukowski avatar j3lte avatar jomifepe avatar josephschmitt avatar kevinbatdorf avatar koinzhang avatar mathieudutour avatar mattisssa avatar peduarte avatar pernielsentikaer avatar raycastbot avatar skaplanofficial avatar stuvrt avatar sventiigi avatar sxn avatar thomaslombart avatar thomaspaulmann avatar tisfeng avatar tonka3000 avatar xilopaint avatar xmok avatar yukaii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

extensions's Issues

[API Bug] AccessoryTitle can be so long it hides the title and subtitle

Schermafbeelding 2021-10-23 om 9 55 28 AM

Raycast version: 1.25.1

Description

AccessoryTitle can be so long it hides/presse away the title and subtitle.

Steps To Reproduce

  1. Add a very long AccessoryTitle to a List.Item

The current behavior

It pushes away the title and subtitle

The expected behavior

I think the title and subtitle are more importend then the accessoryTitle so i think the accessoryTitle should wrap.

[API Feature Request] Function property for an Extension Preference to validate the input

Describe the feature and the current behavior/state.

Add the ability to define a function for a preference that will be called to validate the input value. This could be a new preference type or added to all of them. I feel this would be very useful for things such as external API tokens and would prevent the user from continuing to the extension that would fail if the token is incorrect.

Will this change the current api? How?

This is an addition and should be optional

Who will benefit with this feature?

Anyone that needs to have a valid preference value for the extension to run without error.

[API Feature Request] Show Extension Preferences screen

Add a way to navigate to the Preferences screen.

Once the user sets the preferences, there is no way to change them from the Extension. The user must open the Raycast preferences, search for the extension and then change the values.

A possible solution may be to add a new function to the API similar to popToRoot.

A simple use case would be when the user adds a token, if it is not valid they should be able to change it to continue.

[API Feature Request] List + Detail (side-by-side) view

I would love to see this view present in the "file search" feature to be exposed to the extensions API.

Screen Shot 2021-10-15 at 9 04 57 PM

Will this change the current api? How?
add a way to render this view to the List or ListItem component.

Who will benefit with this feature?
anyone who is interested in viewing list items inline quickly, e.g. details on a github issue in the github extension, a preview of comments in the hacker news extension, file previews in the google drive extension.

[API Feature Request] Render HTML in markdown in Detail component

Describe the feature and the current behaviour/state.
The Detail component renders markdown, but in my extension I am fetching the markdown for Github repositories and some of which include HTML. In the Detail component, any HTML seems to be rendered as a string instead of being interpreted.

In your docs, I see you use the CommonMark implementation which does render HTML in markdown, so I'm not sure quite what the issue is.

Will this change the current api? How?
I don't think this will change the current API at all.

Who will benefit with this feature?
Anyone who wants to render HTML in their markdown.

Any Other info.
An example repo that uses HTML in their markdown is: https://github.com/testing-library/react-testing-library and here is the PR for this new extension

image

[API Feature Request] Permissions

Describe the feature and the current behavior/state.
Extensions could potentially wish to do things that would require the user to give Raycast more permissions. For example, if I wanted to create an extension that needs to query all of a user's text messages in iMessage, they'd need file system access. Currently, my only recourse is to show a UI to the user instructing them they need to do this.

I would like to request that permissions requests are somehow made into a more 1st-class experience. Both for extension authors and for Raycast users.

Will this change the current API? How?
Potentially! I could see a future where any Mac permission error simply triggers a permissions request; however, imperatively using a "Permissions API" through Raycast could enable things like fallback behavior specific to that extension.

Who will benefit with this feature?

  • Extension authors who wish to create extensions that require more permissions than the user has initially provided Raycast
  • Users who want to continue enjoying Raycast's 1st-class experience surrounding permissions requests.

[API Feature Request] Add quicklink access

Describe the feature and the current behavior/state.
I was thinking about create an extension that get a list of user quicklinks, choose one of them and past a formatted markdown link, using the quicklink title and the link itself.
But this is not possible right now because the api do not provide a method to get access to quicklinks.

Will this change the current api? How?
Yes, adding access (read-only?) to user quicklinks.

[API Feature Request] Search bar should support colored text blocks

Right now the search bar is text only. It would be great to have some kind of text-block support, so that words can be colored (text or background).

example:

CleanShot 2021-10-17 at 22 16 06@2x

Describe the feature and the current behavior/state.

Will this change the current api? How?

Not sure.

Who will benefit with this feature?

Everybody who wants to add colored text-blocks.

Any Other info.

This is to some extent related to #87

[API Bug] Jumping Caret in Form.TextField and Form.TextArea

Raycast version: Version 1.25.0

Description

When entering text in a controlled Form.TextField or Form.TextArea with the caret in any position but the last of the string, the caret jumps to the last position of the string.

Steps To Reproduce

  1. Create a form with a Form.TextArea or Form.TextArea with their respective values bound to a variable using the useState hook like in the examples.
  2. Try entering text anywhere but in the last caret position.

I also made small GIF to illustrate the issue

Jumping Caret

as well as a sample extension which you can find in this repo. Also, the bug is reproducible with both the controlled Form.TextField example and uncontrolled Form.TextArea example (which is probably mixed up and should be the controlled example) in your documentation. Also, here is the code of the sample extension (which is also shown in the GIF):

import { Form } from "@raycast/api";
import { useState } from "react";

export default function Command() {
  const [textAreaText, setTextAreaText] = useState<string>("Try typing something here →  ← between the arrows!");
  const [textFieldText, setTextFieldText] = useState<string>("Try typing something here →  ← between the arrows!");

  return (
    <Form onSubmit={(values) => console.log(values)}>
      <Form.TextArea id="textarea" title="Text Area" value={textAreaText} onChange={setTextAreaText} />
      <Form.TextField id="textfield" title="Text Field" value={textFieldText} onChange={setTextFieldText} />
    </Form>
  );
}

The current behavior

It is not possible to enter text anywhere but at the end of the string. Probably because the caret position gets reset everytime the value is updated.

The expected behavior

It should be possible to enter text anywhere in the Form.TextField or Form.TextArea.

[API Feature Request] List filtering: Extend fuzzy search over keywords

Describe the feature and the current behavior/state.

It appears the built-in list filtering provided when using the Raycast List UI component is not doing fuzzy search over the terms set in the keywords prop.
For instance with the following values: ["foo bar"], the entry will be included if I type "foo" but not "bar".
Please note, the search is properly doing a fuzzy search over the title property
Let me know if this is intended, or a bug, or I am missing something.

Will this change the current api? How?

No

Who will benefit with this feature?

Every extension using the List component

[Documentation] can't receive confirm email

Hi, Raycast team

I got a problem signing up with email, Google or Github. I filled the sign up form and go back to login and the website promoted that email confirm is required. But I checked my Gmail and didn't get any email from Raycast.

Please check it out and send me a confirm email to if it's okey.

Thanks a lot

[API Feature Request] Show Alerts

Describe the feature and the current behavior/state.

An API to display Alerts to the user just like the System Extensions does when rebooting the system.

Bildschirmfoto 2021-10-15 um 19 22 27

Will this change the current api? How?

As this is an API feature request only additions would happen to the Raycast API.
The implementation could be based on the Toast API.

Example:

// Initialize a new Alert
const alert = new Alert({
  icon: Icon.Finder,
  title: 'Restart system',
  message: 'Are you sure you want to restart your computer now?',
  buttons: [
    {
      title: 'Cancel',
      style: AlertButtonStyle.cancel,
      action: () => {
        // Perform cancel action
      }
    },
    {
      title: 'Restart',
      style: AlertButtonStyle.destructive,
      action: () => {
        // Perform restart action
      }
    }
  ]
})

// Show Alert
await alert.show();

Additionally, adding a convenience function showAlert would be beneficial as the Toast API has an equivalent with showToast

Who will benefit with this feature?

Developers could add Alerts to get the user confirmation before executing a certain function for example a destructive action like deleting an entry.

[API Bug] env.PATH is undefined

Raycast version:
1.25.1

Description

Environment variable seems to be not working. This causes lots of things that has to do with shell to be broken. For me, my extension is dependent YouTube-dl, and running it using

Two ways to reproduce this error

  1. In Node, run console.log(process.env.PATH). It should output a list of path, but it return undefined.
  2. Run any non built in command with child_process.spawn() throws ENOENT error.

child_process.exec() works properly, but using child_process.spawn() is just a better practice generally, and it also sends stdout when the process is running instead of waiting for process to exit. This need to be fixed so loading progress can be shown if something relies on running shell commands.

[API Bug] tintColor does not work since 1.25.0

Raycast version: 1.25.0

Description

Since 1.25.0 tintColor seems not to work anymore. It does not work in the list view and also not in the actions menu. Regardless which tintColor is given, the icon is still the same.

Steps To Reproduce

  1. Create a new extension via the raycast command Create extension
  2. Choose the List with networking template
  3. goto src/index.tsx line 37

    Change icon="list-icon.png" to icon={{source:"list-icon.png", tintColor:Color.Red}}
  4. Icon is still the same

The current behavior

The icon get no tintColor at all.

Here is an screenshot of y GitLab extension in 1.25.0. The icons are black, but the tintColor is PrimaryText.
image

The expected behavior

Icon should respect given tintColor.

/cc @thomaspaulmann

[Extension Feature Request] Todoist Create Task Menu Improvements

Extension – Todoist

Author: @thomaslombart

Describe the feature and the current behavior/state.

The Create Task menu stays as-is when a task is created. The form does clear, nor does it send you to a different page when it's submitted.

Will this change the current api? How?

I suggest that once the task is created the project view for the task's selected project should open. There can also be a CMD-k menu option that doesn't open the project view and instead creates the task and clears the form.

Who will benefit from this feature?

Anyone using the Todoist Raycast integration to add tasks.

[API Feature Request] Add createQuicklink method

createQuicklink(name: string, destination: string, openWith: appLike|undefined);

Describe the feature and the current behavior/state.

Allow developers to create properly formatted quicklinks from the api. Users could then choose to promote import links to the root search without having to manually configure them.

Examples:

Integrating createQuicklink with Slack's api and protocol urls would allow you to create quicklinks for your most used channels:

createQuicklink(channelName, `slack://channel?team=${teamId}&id=${channelId}`, slack)

A file search extension could then allow a quicklink for a favourite folder:

createQuicklink(dir.name, dir.path, finder)

Or the same thing but with a custom app defined:

createQuicklink(dir.name, dir.path, customApp)

Will this change the current api? How?

No

Who will benefit with this feature?

Raycast users :)

Any Other info.

I believe this would expand on the api's capabilities in a powerful way that aligns with Raycast's principles, gives users control and allow 3rd party developers to have a sensible/safe way of populating root search items

[API Bug] Custom `title` for <OpenWithAction> component doesn't work

Raycast version: v1.25.1

Description

Providing title property for <OpenWithAction> doesn't change the actual title of the item in an <ActionPanel>.

Steps To Reproduce

  1. Define <OpenWithAciton> component
  2. Configure title property to anything
    <OpenWithAction path="bla" title="Open in Slack" />

The current behavior

The title stays "Open With"
CleanShot 2021-10-22 at 00 19 58@2x

The expected behavior

Title should be "Open in Slack"
CleanShot 2021-10-22 at 00 22 21@2x

[API Feature Request] Add List missing UI components

The List component is already super powerful, but it is lacking some UIs from its built-in counter-parts (ie, the List in the Jira, GitHub or Linear extensions). Especially:

  • The filtering Dropdown in the top-right corner
  • The additional columns that you can see below

image

[API Feature Request] Focus specific element in a Form

During the development of Deepcast I noticed that there is no possibility to set a focus on a specific element within a form after the render. This would simplify the input of texts to be translated, since the respective field does not have to be selected separately.

This could be made possible by specifying the element to be focused on in the Form component, or by setting the focus to true using a boolean in a Form.x child component.

[API Feature Request] Autocomplete textfield

Describe the feature and the current behavior/state.

I'd like to use something equivalent to <input type="text" /> combined with <datalist />

The developer should be able to provide a list of autocomplete options, and the user could freely type into the textarea and receive suggestions to autocomplete with any matching option. If no matching options are suitable, users can still submit their own custom text.

Will this change the current api? How?

No

Who will benefit with this feature?

Extension developers looking for more user friendly input mechanisms.

Any Other info.

[Dev Tools Bug] Command icon doesn't update until Raycast is quit and reopened

Raycast version: 1.25.0

Description

Changing the command icon after first use requires the app to be restarted to see the new command icon.

Steps To Reproduce

  1. Run nom run dev on your extension with a command-icon.png in place. (used one of the example repos)
  2. Replace command-icon.png with another image.
  3. Run the extension again.
  4. Shut down dev sever.
  5. npm run dev
  6. Still no luck.

The current behavior

Command icon doesn't update when it's changed.

The expected behavior

Shutting down the dev server and spinning it back up should update the icon. Or better yet, hot reload updates it as well.

[Weather Extension Bug] Shows blank screen with 503

image

Always shows the blank screen. The toast shows "Error: http status 503".

The issue could be location-specific or system-specific. Because some other users have told me that the command works as expected. But it never worked for me.

Raycast version: 1.25.0

Description

Unable to view weather info

Steps To Reproduce

  1. Open Command
  2. Shows blanks screen with error toast

The current behavior

Blank Screen

The expected behavior

Weather Info

[API Feature Request] refreshTime

Describe the feature and the current behavior/state.

Add refreshTime to extensions.
script-commands currently have the option to be inline, and use the refreshTime to update periodically.
This should be added to the API so that we can create complex inline commands.

Will this change the current api? How?
Yes. A new property will need to be created; I'm not sure how this should be implemented.

Who will benefit with this feature?

Extension developers and end users.

Any Other info.
No.

[API Bug] Icons from a local file resource do not render in ActionPanel.Submenu Items

Raycast version: 1.25.0

Description

If an icon from a local file resource is added to an ActionPanel Submenu Item it does not render

Steps To Reproduce

  1. Edit actions.tsx in examples/api-examples/src
  2. Add icon={{ source: { dark: "avatar-dark.png", light: "avatar-light.png" } }} after line 67

The current behavior

Icon does not render; if you change it to a built-in Icon it will. Eg. icon={Icon.Binoculars}

The expected behavior

Icon to render.

[API Bug] SecondaryText results in PrimaryText color when applied to custom PNG icon

Raycast version: 1.25.1

Description

<List.Item icon={{
  source: "icon.png",
  tintColor: Color.SecondaryText,
}}>

CleanShot 2021-10-21 at 15 30 53@2x
(top, custom icon. bottom, built-in one)

The current behavior

The above code results in a pure-black tinted icon rather than a light-gray one.

If I replace SecondaryText with Green the color is correctly applied.

The expected behavior

Icon should be light-gray tinted.

[Dev Tools Bug] Create Extension doesn't allow locations with spaces in the directory name

Raycast version: 1.25.0

Description

Trying to create an extension in a directly with a space in it fails validation. I also tried escaping the space but that was invalid as well.

Steps To Reproduce

  1. Open Create Extension
  2. Fill in Location with a directly that has a space in it
  3. Click into another text area or try and create the extension
  4. Error message telling you the location in invalid

The current behavior

Directories with spaces are unable to be used as locations for creating new extensions.

The expected behavior

Directors with spaces are valid locations. The location should probably be automatically escaped when chosen through the UI and escaping should probably be valid.

Screenshot

CleanShot 2021-10-14 at 20 29 49

[API Bug] Form Selection jumps around

I try to have dynamic FromTextArea's. The problem is that the dynamically spawn TextAreas have black text color in dark mode, which makes it unreadable. Also the selection jump back and forth (maybe related to #66)

Raycast version: 1.25.1

Description

Steps To Reproduce

export function TweetSendForm(props: { replyTweet?: TweetV1 | undefined }) {
  const [messages, setMessages] = useState<string[]>(["something"]);
  const rt = props.replyTweet;
  const submitText = rt ? "Send Reply" : "Send Tweet";
  console.log(messages);
  return (
    <Form
      onSubmit={submit}
      actions={
        <ActionPanel>
          <SubmitFormAction title={submitText} onSubmit={(values: TweetFormValues) => submit(values, rt)} />
          <ActionPanel.Item title="Add" onAction={() => setMessages([...messages, "test"])}/>
        </ActionPanel>
      }
    >
      <FormTextArea id="text" title="Text" placeholder="What's happening?" />
      {messages.map((m, i) => (
        <FormTextArea id={`t${i}`} title={`m ${i}`} placeholder="aaa" defaultValue={m} />
      ))}
    </Form>
  );
}

The current behavior

CleanShot.2021-10-20.at.22.15.20.mp4

The expected behavior

Text color like in the non dynamic version + stable selection.

[API Bug] Hotkey have no effect

Raycast version: 1.25.1

Description

Hotkey have no effect (maybe occupied by a gone command)

Steps To Reproduce

  1. Add an extension that has at least two commands, and then bind hotkeys
  2. Update the extension, remove one command
  3. The hotkey can be used to another command, but have no effect anymore

The current behavior

Nothing happened

The expected behavior

Run command properly

[API Feature Request] Inline mode

Inline mode for extension would open a lot of possibilities, for example:

  • display current temperature, but open with more details, like a forecast; or
  • display number of open PRs, then open a list to show them all and be able to open any of them.

Could work in the same way inline scripts work, where they refresh on a given timer and update their title and/or subtitle.

[Dev Tools Feature Request] source maps do not point to the right line

Screen Shot 2021-10-17 at 12 11 06 PM

Raycast version: 1.25.0

Describe the feature and the current behavior/state.

it appears the error message does not point to the correct line when there is an error on my extension. the message is correct (channels?.map is not a function) but points to a different line. here is the full file content:

// channels.tsx
import { List, ListItem } from "@raycast/api";
import { useChannels } from "./hooks/useChannels";
import { useProfile } from "./hooks/useProfile";
import { prefs } from "./util/preferences";

export default function Command() {
  const { data: user, error } = useProfile(prefs().accesstoken);

  const { data: channels } = useChannels(prefs().accesstoken, user?.id);
  return (
    <List isLoading={!channels}>
      {channels?.map((chan) => (
        <ListItem key={chan.id} title={chan.title} subtitle={`${chan.length} blocks`} />
      ))}
    </List>
  );
}

[API Feature Request] Set arguments to commands

Describe the feature and the current behavior/state.

Allow passing arguments to commands, similar to what is available for script commands

Will this change the current api? How?

this will be an addition to the current api

Who will benefit with this feature?

Users would be able to provide input to commands in a more convenient and efficient way.

Currently for a command to take user input, it would first render a Form for user to fill out and submit. For simple inputs, rendering a form could be overkill and also more keystrokes are needed from users: type command name -> hit enter to run command -> type input -> hit cmd+enter to submit form

With the ability to provide arguments, it would be simplified to: type command name -> tab and input arguments -> hit enter to run command

[API Feature Request] OAuth2 support

I would like to be able to use OAuth2 in extensions.
Ideally for services that doesn't provides a test access token feature.

Describe the feature and the current behavior/state.
Something like the native extensions works (ie, Linear). A link opens in your browser, you log in and allow then it's redirected back to Raycast (and, somehow, to your extension) to continue the process.
Automated refresh token support would be amazing too.

Will this change the current api? How?
Nope, it's just a new feature.

Who will benefit with this feature?
Anyone who wants to use third party services that uses OAuth2 as authentication.

[API Feature Request] Select file

Describe the feature and the current behavior/state.

I'd like a way to select a file from the user hard drive, ideally it should be part of the Form fields since I would like to use it on my Transmission extension to let them add a torrent from a .torrent file.

Will this change the current api? How?

Nope.

Who will benefit with this feature?

Extension that require to select/load a file from the user hard drive.

Any Other info.

[API Feature Request] Add application picker to Preferences

Describe the feature and the current behavior/state.

Add an application picker type to Preferences so things like default editor can be defined for an extension. The saved value in the preferences would be the application name and full path.

Will this change the current api? How?

A new Preference type will need to be created

Who will benefit with this feature?

Anyone that would like the user to be able to set the default editor or application for their extension

Support for SVG

Describe the feature and the current behavior/state.

Today the ImageLike type doesn't support SVG.

My use case requires to display several colors from hex values in a search view.
I would like to be able to do that:

<List.Item
  icon='../../acme.svg'
  title={props.item.name}
/>

Or

<List.Item
  icon='data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" fill="#ffffff"/></svg>'
  title={props.item.name}
/>

Or

<List.Item
  icon=' data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCIgZmlsbD0iI2ZmOGUwNSIvPjwvc3ZnPic='
  title={props.item.name}
/>

Will this change the current api? How?

No breaking change.

Who will benefit with this feature?

Every developer who wants to use SVG to display an icon or create visual things programmatically.

[API Feature Request] Extension sandboxing and permissions system

Describe the feature and the current behavior/state.

Motivation

I'm a long-time Alfred user (and recent Raycast convert!), and the main reason I don't use more workflows / extensions is that giving full access to my computer to a random extension I found on the internet scares me. A poorly-written extension might wreak havoc on my computer, accidentally overwriting files or consuming all my computer's resources. A malicious extension could steal all sorts of sensitive information.

Having extensions go through this repository (with a review process) ameliorates the situation but 1) doesn't help for extensions that never make it into the official store, and 2) isn't foolproof – it's certainly conceivable that a rogue extension could sneak past review.

Proposal

It'd be great if extensions were run in a sandbox, limiting the damage a rogue extension could do. By default, extensions would have no access to the filesystem, network, clipboard, dangerous syscalls like fork, execve, etc. Ideally the amount of CPU and memory the extension can consume would also be restricted.

Extensions could then declare the permissions they require via the package.json manifest file — for instance, if an extension required access to the GitHub API, it could request network access to api.github.com. Or a Bear extension might ask for read-only filesystem access to ~/Library/Group Containers/9K33E3U3T4.net.shinyfrog.bear/Application Data/database.sqlite. When a user goes to install the extension, they'd be told about the permissions the extension requires, allowing the user to make an informed decision about whether to install the extension. If an emoji lookup extension wants full access to my computer, I might think twice before installing it. Conversely, if it required no permissions at all, I could install it with confidence that it's unlikely to harm my computer.

There are lots of options for how this could be implemented: WASM-based sandboxes, Deno's permissions system, v8 isolates, even Docker containers at the heavier-weight end of the spectrum.

I appreciate this would represent quite a significant amount work, but I think it'd be worth it and enable a robust and trustworthy ecosystem to be built around Raycast 🚀

Will this change the current api? How?

  1. Manifests have a new optional permissions section, which might resemble the permissions a Chrome extension can request or the permissions that Deno exposes.
  2. A facility for querying permissions to enable optional permissions (e.g. ask to use a web API for up-to-date Emoji data but fall back to bundled data otherwise).
  3. Built in error handling for when an extension tries to use permissions that haven't been granted, perhaps.

Who will benefit with this feature?

  • Raycast users, as they can be more confident they're not installing malware and make more informed decisions about which extensions to install.
  • Raycast extension developers, as they can be more confident their extension won't cause unintended adverse consequences to users.
  • Raycast, as this will help build a large and trusted ecosystem around the product.

Who loses?

  • Evil hackers! 👿

[API Feature Request] More Icons

Describe the feature and the current behavior/state.

Add more icons.
(the links go to an image of the existing icon that isn't in the API)

  • Reset https://cln.sh/blwBTR
  • Folder (along with Document)
  • ArrowLeft, ArrowUp, ArrowDown (because there is ArrowRight)
  • ArrowCounterclockwise (there is ArrowClockwise)
  • StarSlash https://cln.sh/Tw40Uw
  • StarUp https://cln.sh/zcnlXi
  • StarDown https://cln.sh/DRfB7n
  • Start, Pause, Stop (for start/pause/stopping commands)
  • TerminalAlternative https://cln.sh/9hhqqa
  • Unpin (there is a pin)
  • LevelMeter0, LevelMeter1, LevelMeter2, LevelMeter3 (shading different levels)
  • Minus (because there is a plus)
  • SidebarRight, SidebarLeft(differentiate between left and right sidebar)
  • Notch (for fun)
  • Raycast (because this is Raycast)

Will this change the current api? How?

not really, just more enums to Icon

Who will benefit with this feature?

everyone who uses and/or creates extensions

Any Other info.

no

[API Feature Request] Toast Event Handler

Describe the feature and the current behavior/state.
I love the toast API. It's extremely easy to use, and it has a great aesthetic. By using const toast = new Toast(), we get to control the toast. The toast has a x button that user can click on, and there's this loading animation. I wish there's an event handler (like toast.on('close')) that fires at least when toast.style = ToastStyle.Animated. Also, toast.on('click') might be less useful, but it can be used to display a error log file when something went wrong or to show a webpage containing some information.

Will this change the current api? How?
It's going to add an event handler to the toast API

Who will benefit with this feature?
A lot of people, really. The first one can be used to stop http requests, download, and pretty much anything that require loading. Second one can provide better error handling, especially for debugging when something went wrong on a distributed build.

[API Feature Request] Search bar auto-completion support

It would be great when their will be some kind of auto-completion support. In #86 I added named label support in the search bar. The user now needs to know the name of the labels, which is not optimal.

GitLab has builtin support on the website.
CleanShot 2021-10-17 at 22 00 54@2x

CleanShot 2021-10-17 at 22 09 38@2x

CleanShot 2021-10-17 at 22 10 07@2x

Describe the feature and the current behavior/state.

Right now there is no auto-completion at all in extensions.

Will this change the current api? How?

It is completely text based, so I would say no.

Who will benefit with this feature?
Everybody how wanna give better user-feedback in the search bar

Any Other info.

[API Feature Request] Allow to register to URL protocol

Describe the feature and the current behavior/state.

I'd like a way to register a specific URL protocol with my extension.

For example, clicking on a magnet:// link my Transmission extension should be open and should then be able to do something with the URL

Will this change the current api? How?

I don't think so

Who will benefit with this feature?

Any extension than needs to register to some url protocol

Any Other info.

[API Feature Request] A method that return the selected Finder items

Describe the feature and the current behavior/state.

A method that return the selected items in Finder (files and folders). I've asked @thomaspaulmann about this on Slack and he suggested something like getSelectedFile, that would fit nicely with getSelectedText. I'm not completely convinced by the naming though because the method would ideally return an array of finder items, something like this:

interface FinderItem {
  path: string;
  isFile: boolean;
  isDirectory: boolean;
}

And that could be used like this:

const selection = getSelectedFiles();
const files = selection.filter(item => item.isFile);
files.forEach(file => { console.log(file.path) });

Will this change the current api? How?

No.

Who will benefit with this feature?

Extensions that act on the selected files and/or folders, like #147 – Open Finder Selection With…. Some examples:

  • an extension with commands to open the selection with specific applications, so you could assign a keyboard shortcut to open files with your code editor for example;
  • an extension to upload the selected file to an online file sharing service;
  • an extension to display the summed size of the selected files;
  • an extension to compress the selected files;
  • an extension to convert the format of the selected image files.

Any Other info.

[API Feature Request] Fallback image source

Describe the feature and the current behavior/state.
It would be nice to have a fallback image when the source is not available.

Will this change the current api? How?

<ListItem
	title={item.title}
	icon={{
	  source: item.mediaContent ?? Icon.QuestionMark, // What if returns 404?
	  mask: ImageMask.RoundedRectangle,
	  fallbackSource: 'https://via.placeholder.com/50'
	}}
/>

Example

img

Example of list with some broken image urls

[API Feature Request] Add possibility for multi-language support

I was not able to receive env-var infos about the OS language during implementing #74. This is based on the fact that raycast only set specific env-vars for the node process.

It would be great when raycast set an env-var (or maybe another typescript-API) to receive the OS language of the user. There are multiple variants I can think of

Variant 1

Pass the LANG, LANGUAGE, LC_ALL, LC_MESSAGES (if they exist) from raycast to the raycast node process. This would be easy to do and maybe other node packages will be based on the same fact.

Variant 2

Raycast provide it's own env-var/typescript-api to make it possible to receive the information in an extension. This variant would be my personal favorite, because raycast can make the access to this setting easy for extension devs.

Describe the feature and the current behavior/state.

Typically I receive the OS language with the following line of code.

const lang = env.LANG || env.LANGUAGE || env.LC_ALL || env.LC_MESSAGES;

This is not possible in raycast right now, so I'm not able to receive the OS language.

Will this change the current api? How?

No.

Who will benefit with this feature?

Everyone which want to build a multi-language extension for raycast.

Any Other info.

No.

[API Feature Request] Installing native node add-ons using node-gyp

Description

Right now, it looks like we cannot use any native node add-ons which are built using node-gyp. For instance, I tried various npm package to access sqlite database but failed: sqlite, sqlite3, better-sqlite3, etc

Steps To Reproduce

  1. npm install and try to import in your extension any package relying on node-gyp (for instance: https://github.com/JoshuaWise/better-sqlite3)

The current behavior

You will get a nodejs error (such as Error: Could not find module root given file: "node:internal/modules/cjs/loader". Do you have a package.json file?)

The expected behavior

No error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.