Acylation / obsidian-chem

Chemistry support for Obsidian. Rendering SMILES strings into chemistry structures.
MIT License
82 stars 4 forks source link

Add in-line config overrides via weird JSON syntax #18

Open Vawlpe opened 1 year ago

Vawlpe commented 1 year ago

Yes I know the code isn't clean and there's probably bugs, but I'll PR this anyway if anyone's willing to take a look :p image

Acylation commented 1 year ago

Thanks for your design and input! This will surely be an effective way to styling a single block, especially scaling and some drawing options.

About design

There are several questions

The size control of the structures is going to be imporved (#14), since we gonna set all structures sharing the same length of bonds, the final picture size will depend on the molecule. In the case of multi-line block, I would like to wrap the sturctures in a table to make it neat. If we want to apply inline settings, some small changes are needed to adapt to this.

Develop schedule

I'm refactoring the project using React, and the files are changed a lot. I'll try to integrate your code to new ones, to provide block-specified configuring ability. After adaptation and neccessary documentation, we will introduce the ability to the plugin. Thanks again!

Vawlpe commented 1 year ago

Hi, thanks for reviewing this PR!

crepppy commented 1 year ago

Any update on this @Acylation? I think this would be a nice feature to have

Acylation commented 1 year ago

Hi @crepppy thanks for the follow-up! I'm figuring out how to store block-specific configs and expose UI without messing notes up, perhaps using an editor extension, requiring much more coding work. I'd like to postpone this to December because I will be busy these months with PhD application.

However, if you don't mind adding extra info in your smiles block, I could create a branch for this PR, and release a preview version where you can utilize this feature. Please let me know if this would work for you, it will come out at early Oct if you need this.