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

Feature Request: Subcircuit as Dependencies #970

Open
by-justin opened this issue Nov 13, 2024 · 0 comments
Open

Feature Request: Subcircuit as Dependencies #970

by-justin opened this issue Nov 13, 2024 · 0 comments

Comments

@by-justin
Copy link

Currently, subcircuits are kept in the browser cache after being defined by the user. To reuse a subcircuit on a different device, it must either be saved within a circuit file or individually reimported. This can become cumbersome, especially when dealing with many subcircuits, as users need to either store them all in one large file or manage multiple small files, which must be opened one by one to reload the subcircuits into the cache. Furthermore, when different circuit files share the same subcircuits, this leads to repetition.

As mentioned in #769, the goal is to keep everything in text files. One solution is to allow URL-based references for subcircuit definitions at the start of a circuit file. When loading the file, the subcircuits would be fetched and incorporated recursively into the current circuit. For example:

> https://url.to.subcircuit.1
> https://url.to.subcircuit.2
  ...
. subcircuit1 ...
  ...

Additionally, it would be helpful to add an option to export all directly defined (non-imported) subcircuits in the current file as separate files.

This approach would allow users to maintain a proper subcircuit library (as requested in #690) and would address any concerns about subcircuits across sessions by letting users save them as text files instead of relying on browser cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant