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:
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.
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:
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.