Open the1gofer opened 8 months ago
If I understand correctly,because the input is of type note you expect the rendered output to be a link? Or you refer to something else. If that is the case, it is the expected behavior. Not saying it's the best, but I decided to not take too many decisions for the user, and I leave the conversion to the one using the values
Oh maybe that’s it I associated note with a link to the note.
Jason Crews
On Thu, Dec 28, 2023 at 1:32 PM Daniel Rodríguez Rivero < @.***> wrote:
If I understand correctly,because the input is of type note you expect the rendered output to be a link? Or you refer to something else. If that is the case, it is the expected behavior. Not saying it's the best, but I decided to not take too many decisions for the user, and I leave the conversion to the one using the values
— Reply to this email directly, view it on GitHub https://github.com/danielo515/obsidian-modal-form/issues/177#issuecomment-1871472377, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQKUNGDMVXOQZ7EQ7I6ZMLYLXJOFAVCNFSM6AAAAABBFARIAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZRGQ3TEMZXG4 . You are receiving this because you authored the thread.Message ID: @.***>
Ok,
Maybe I'm odd, but if you you use multi select, and select a note, I would expect it to be a link to that page. I'm not sure how usefull just the name is, but maybe it's just me.
Jason Crews
On Thu, Dec 28, 2023 at 1:41 PM Jason Crews @.***> wrote:
Oh maybe that’s it I associated note with a link to the note.
Jason Crews
On Thu, Dec 28, 2023 at 1:32 PM Daniel Rodríguez Rivero < @.***> wrote:
If I understand correctly,because the input is of type note you expect the rendered output to be a link? Or you refer to something else. If that is the case, it is the expected behavior. Not saying it's the best, but I decided to not take too many decisions for the user, and I leave the conversion to the one using the values
— Reply to this email directly, view it on GitHub https://bitli.pro/22Qwm_07b90ad0, or unsubscribe https://bitli.pro/22Qwn_5a12806a. You are receiving this because you authored the thread.Message ID: @.***>
I am open to make easy to format values as links, but making it the default will be a breaking change, and from my perspective less flexible. With just the note name, you can do whatever you like. For example I use them as contacts in several fields where a link doesn't make sense
I also would find it useful to have the link format--honestly for my own usecase this is the only scenario where it is useful. Perhaps this could be done as a separate type? (i.e. instead of "note" it could be "link"?) Separately I tried to implement links using the dataview module of the modal forms plugin but nothing showed up in the eventual form as options even if they did in the preview, which I find strange. So currently I am unable to get links via the plugin, which is impeding my ability to implement it.
Properly rendering as links is a bit more tricky that it could initially look. First, we need the original file we want to link to, that is not a problem, I can either keep the file reference or get it when rendering as link. However, it is also needed the current note link, and that is something that my plugin doesn't know, it needs to be provided from templater template, so the API will look something like this:
result.notesField.asLinks(tp.config.target_file).bullets
Will that work for you?
Thanks. I haven't had a chance to try it, but it looks promising. Jason Crews
On Fri, Jan 19, 2024 at 12:05 PM Daniel Rodríguez Rivero < @.***> wrote:
Properly rendering as links is a bit more tricky that it could initially look. First, we need the original file we want to link to, that is not a problem, I can either keep the file reference or get it when rendering as link. However, it is also needed the current note link, and that is something that my plugin doesn't know, it needs to be provided from templater template, so the API will look something like this:
result.notesField.asLinks(tp.config.target_file).bullets
Will that work for you?
— Reply to this email directly, view it on GitHub https://bitli.pro/23SKg_64259acc, or unsubscribe https://bitli.pro/23SKh_1db65aeb. You are receiving this because you authored the thread.Message ID: @.***>
Thanks. I haven't had a chance to try it, but it looks promising. Jason Crews
That was just a proposition to see if the API makes sense to you, it is not yet a real thing. Just wanted to clarify
yes, seems reasonable.
Jason Crews
On Tue, Jan 23, 2024 at 2:40 AM Daniel Rodríguez Rivero < @.***> wrote:
Thanks. I haven't had a chance to try it, but it looks promising. Jason Crews
That was just a proposition to see if the API makes sense to you, it is not yet a real thing. Just wanted to clarify
— Reply to this email directly, view it on GitHub https://bitli.pro/24qra_e3bcee6b, or unsubscribe https://bitli.pro/24qrb_d9eb7007. You are receiving this because you authored the thread.Message ID: @.***>
This isn't the ideal solution, but it does format notes as links, once the modal form is closed and you're back in your Note:
Make a multiselect field, with the following dataview query to populate it:
dv.pagePaths('"yourDirectoryHere"').map(path=>"[["+ path + "|" + dv.page(path).file.name + "]]")
I'm not sure if this is the intended behavior or not, but it seems like a bug.
To Reproduce
let frontmatter = result.asFrontmatterString('call');
andresult.get('case-link', (p) => p)
yields amongst other things:case link: "Test Call"
I'm assuming it's becuase I am using a drop down, and it's not getting saved as a link, but I'm not sure.