SilentVoid13 / Templater

A template plugin for obsidian
https://silentvoid13.github.io/Templater
GNU Affero General Public License v3.0
3.05k stars 179 forks source link

Using templater and system.prompt with several entries #1059

Open hydraInsurgent opened 1 year ago

hydraInsurgent commented 1 year ago

I am trying to insert text from a template and ask the user(self) questions about my day, like emotion, mood, how was day, etc in the pop-up by using system.prompt(). It gets tedious to have multiple popups appear for different things I want to ask.

The prompt function is really great at taking input and converting it to the variable on runtime, but could we add a group prompt containing multiple prompts rendered similar to the image below from another plugin metadata menu(attached screenshot below), Tasks plugin also does something like this I remember.

I would like to have one grouped prompt for my emotions and other for Mood, each can have multiple questions like, what is mood, what factors are influencing it, how is your behavior affected by your mood ... so on. We can have different types of input as well like checkboxes, text boxes, select lists, and date pickers later as enhancements to the usability of grouped prompts.

Also, there can be multiple grouped prompts in a single document, so we do need to take care of this. Would love to see this in action on this plugin. Do let me know if you or anyone is interested to work on this idea, willing to put in some effort myself but I am new to plugin development so might need some assistance there.

Attachment image

AB1908 commented 1 year ago

Hmm I think this has come up once or twice. I'm unsure what the best idea for this is, to allow a simpler version like being able to render multiple elements in a single modal or a more complex version where you can embed your own HTML components. There's a React plugin that lets you make your own components like that. Anyhow, the simpler version is very much doable and I'm up to help but be warned that Templater is a somewhat complex plugin and may be challenging if you haven't programmed before.

hydraInsurgent commented 1 year ago

@AB1908 , thank you for your offer. I think there should be both options available so people can choose whatever they want simple one is really nice too. I am going to discuss this idea in the Metadata menu community and also if we can implement their popup via javascript on runtime in some way. Will ping you if I need some help with the Templater.

NotNotQuinn commented 1 year ago

Hello I am interested in this feature, what is the status of those conversations mentioned?

It seems other people are also interested in something like this:

AB1908 commented 1 year ago

No one has picked it up yet. There isn't anyone to review and merge either though Zachatoo and I do review this stuff occasionally.

Zachatoo commented 10 months ago

This plugin appears to be tackling this issue.

https://github.com/danielo515/obsidian-modal-form