-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
Alternating inline fields are invisible when using Dataview Format #1913
Comments
Many thanks for taking the time to log this.
Please supply text for the tasks you showed above. Thank you. |
- [ ] Single space [priority:: medium] [created:: 2023-04-24 ] [start:: 2023-04-25] [due:: 2023-04-26]
- [ ] Two spaces [priority:: medium] [created:: 2023-04-24 ] [start:: 2023-04-25] [due:: 2023-04-26]
- [ ] Comma seperated [priority:: medium], [created:: 2023-04-24 ], [start:: 2023-04-25], [due:: 2023-04-26] I can repro this issue with the text above, with or without Tasks installed. This is reproducible in a vault with no plugins so long as live preview is enabled. I would've assumed this would have been reported on Dataview's repo before, but searching any of [ I think the easiest "fix" would be to add a warning in the docs and endorse one of the workarounds (two spaces would work with no code changes), unless there is a non-hacky way to tell Obsidian "this isn't actually a reference style link". |
Wow, many thanks @Chris-Andrews for reporting this and the workarounds, and @kedestin for giving the text.
If we recommend two spaces, I think auto-suggest and the Edit task modal will need to be changed to write two spaces out. The problem currently with the comma idea is that it prevents Tasks parsing the fields... If we were to fix the parsing to allow text in between fields, as is requested elsewhere, I think that after the user has edited the task, the current code would put all the fields/properties after all the commas and the problem would reappear again. I played with different dataview settings around whether to do inline highlighting - and none of it helped. I'll ask in the dataview channel on Obsidian Discord to see what others do... |
https://discord.com/channels/686053708261228577/1014259487445622855/1100358299028828181 |
I'll see what I can do
I had already started on implementation of #1505 and have a proof of concept working, but dropped it soon after realizing that it:
There may be more that I'm not remembering off the top of my head. I'd rather not leave folks in a poor state w.r.t Dataview support, so I'd be willing to keep working on this if we decide it's the best course of action. |
There was a suggestion on Discord that I think might be a good workaround...
|
@kedestin thanks for a very helpful comment... I do agree that we are straying in to #1505 territory, so will quote your above comment there and then reply there... |
The only thing I'd add to this is that the situation in #1913 must have existed in dataview in some time, and as far as I can see, nobody has complained about it. I really am comfortable with documenting a known limitation that is outside Tasks' control. Another solution might be to log this as an Obsidian bug on the Forum. |
I will:
When I was initially searching for reports of this, I found this repo https://github.com/dsarman/better-inline-fields, which has this gif in its README: The gif is nearly a year old, so I assume this issue is already known and this gif is an example of someone using commas as a workaround.
Just to ask explicitly, we don't need #1505 to be implemented to close this issue? |
Yes that's fine. If you are on Discord, before spending much time on it, may I very gently encourage you to ask on #plugin-dev in case the Obsidian team has any ideas or if there is already a known workaround... |
The fix for this has just been released in Tasks 3.5.0. |
Per the CommonMark Dingus, one space is already enough to make a link not reference-style. GitHub Flavored Markdown does not modify the spec here. This seems like an Obsidian bug. |
Huh, didn't realize Obsidian claimed compatibility with existing formats
Like @bb010g said, both Github's spec and the Commonmark spec forbid the space: (Both use the same example and almost the same text, so I'm only quoting Github):
@claremacrae It might be worthwhile filing this as a bug report for Obsidian. If they fix, then most of the warning in the docs can go away. Though, this would technically be a breaking change for Obsidian, so I'm unsure if they'd be willing to. |
Reminder logged in: |
Please check that this issue hasn't been reported before.
Expected Behavior
All inline fields should be visible for tasks in the default editing mode (live preview)
Current behaviour
When Dataview Format is used and multiple task parameters are set (priority, due date, start date, etc.), pairs of parameters are interpreted as reference-style links. The effect is that every even-numbered parameter is invisible. An example is provided in the first task for the image below.
Steps to reproduce
With Dataview Format enabled, use the create/edit task function to create a task with all of the properties set (like above). When two Dataview Format properties are next to each other, the second one will not be visible in live preview.
Which Operating Systems are you using?
Obsidian Version
v1.1.16
Tasks Plugin Version
3.3.0
Checks
Possible solution
Two possible workarounds are shown in the image above. One is to have two spaces between Dataview Formatted properties, and the other is to separate them with commas.
The text was updated successfully, but these errors were encountered: