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

Add ability to write preference values programatically #2246

Open
JiriTrecak opened this issue Jul 13, 2022 · 2 comments
Open

Add ability to write preference values programatically #2246

JiriTrecak opened this issue Jul 13, 2022 · 2 comments
Labels
api Issues related to API feature request New feature or improvement

Comments

@JiriTrecak
Copy link
Contributor

Describe the feature and the current behavior/state.

Currently, it is only possible to read user preferences. This however makes it hard to provide conveniences for the users to set Raycast extension up. Specifically, we are making extension that allows access to the data from the organization/project, and setting up IDs, to select which organization to use / project / branches etc. required for this is very hard to do for the users manually.

We'd appreciate if it is possible to both read and write to preferences, so if we make convenience form for the user with autocomplete, autoselections etc. in our own view, but we can synchronize the preferences between the two places. For now, we'll not use the raycast-provided preferences but prefer our own system and prevent users to invoke command until the required data is provided similarly how it is done when the configuration is required and not provided natively (we'll make some nice design for that intro view as well).

I made a video that makes you understand better what we are trying to achieve:

https://drive.google.com/file/d/1s0_-nG8l827sIRV39uK3P9b0whu7ypqh/view?usp=sharing

There, you see the view we've created that after adding API key will automatically provide the rest of the values with options to change the selection (including all validation etc.). Notethat there will be even more dropdowns that depend on one another. However, as an alternative, user should be able to use the preferences as well, so we can use the native engine. Data we obtain from both places in the video are now disconnected, and we'll have to drop the native settings because our users can't be forced to find ids etc. - so we'd like to use the best of both.

Will this change the current API? How?

No, this is only additive. There is an alternative, however, in that we could allow for computed values for dropdowns and dependencies between values inside preferences themselves, but that seems quite more complex than what we are asking for (it would be a really solid longer-term solution down the road though. A good example of this is VSCode extension system, which allows both read and write with a user/extension preference approach similar/same to Raycast: https://code.visualstudio.com/api/references/vscode-api#WorkspaceConfiguration

Who will benefit from this feature?

For more sophisticated use-cases or when you truly want to polish your extension, simple input inside preferences doesn't cut it, especially for integrations with enteprise-grade tools that can't relay on users knowing what ids etc. put there to configure their workspaces.

@JiriTrecak JiriTrecak added api Issues related to API feature request New feature or improvement labels Jul 13, 2022
@peduarte
Copy link
Contributor

peduarte commented Jan 4, 2023

Hey, thanks for your suggestion. This is now under consideration!

@atian25
Copy link

atian25 commented May 9, 2024

any progress on this? @peduarte

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