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

Userscripts local import/exports #83

Open
quoid opened this issue Oct 19, 2020 · 3 comments
Open

Userscripts local import/exports #83

quoid opened this issue Oct 19, 2020 · 3 comments
Labels
discussion Any question, feedback or general comment

Comments

@quoid
Copy link
Owner

quoid commented Oct 19, 2020

Allow users to import other locally managed userscripts as dependencies, related #80

@quoid quoid changed the title Userscripts import/exports Userscripts local import/exports Oct 19, 2020
@quoid
Copy link
Owner Author

quoid commented Oct 20, 2020

@CalmBit

it would be interesting to have a @require analogue that, by default, only responds to file:// URIs. It may make it easier to include things like script dependencies that would otherwise clutter the userscript interface.

I can see why dependencies could clutter the UI. I think we can figure out a way to handle this. I am not keen on giving the app universal file system access as the app sandbox is a requirement for the app store and other reasons. I do think there are viable options, like giving the user the ability to toggles dependencies in the UI, so that they still have a way to edit them in the editor if needed. Also, there is the option of checking the dependency file path on save and if it is outside the current security scope bookmark, create a new one. However could create issues if the ability to edit the dependency in the editor is still desired - the app would need to search all of these different file locations for the dependencies and then bring them into the sidebar on load.

Alternatively, perhaps as a compromise towards a more "universal" approach (i.e. if @require was ever to be implemented for compatibility), the plugin could do something like confirm with the user that the dependency the script requires should be downloaded/queried? Just spitballing this idea here in case it makes any sense or helps to formalize a better system for those kinds of remote dependencies.

This sound like a viable option for when require is implemented, however I am leaning towards the dependency system having unique keys - not dead set on it, just leaning there.

I think the import/export system needs more thought before implementation. If you'd like to help with the feature planning, that would be appreciated. There's a beta build with the @import / @export system now, I will be sending invites out today. Currently there's no hiding of dependencies.

@CalmBit
Copy link

CalmBit commented Oct 20, 2020

A decluttering system, in retrospect, makes much more sense than file:// descriptors, haha. I would love to see that as an option.

This sound like a viable option for when require is implemented, however I am leaning towards the dependency system having unique keys - not dead set on it, just leaning there.

Unique keys as in not being called @require? Sorry, just don't know what's meant by keys here 😅

(I'll try the beta tonight - thank you again for your hard work and quick responses!)

@quoid
Copy link
Owner Author

quoid commented Oct 20, 2020

@CalmBit

Unique keys as in not being called @require? Sorry, just don't know what's meant by keys here 😅

Yeah that's what I was thinking. Keep the @require key as it "normally" works and add new ones for the new functionality.

@quoid quoid removed the enhancement label Dec 3, 2020
@quoid quoid removed the in-beta label Oct 11, 2022
@ACTCD ACTCD added the discussion Any question, feedback or general comment label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Any question, feedback or general comment
Projects
None yet
Development

No branches or pull requests

3 participants