aidenlx / obsidian-icon-shortcodes

Obsidian Plugin: Insert emoji and custom icons with shortcodes
MIT License
138 stars 11 forks source link

Conflict with Inline Dataview fields in Reading (Unless icons and Inline Dataview fields are placed in a table) #41

Closed I-Pch closed 2 years ago

I-Pch commented 2 years ago

Hi there 😊

So, I'm hitting a very strange bug with the plugin where there seems to be some conflicts with the inline dataview fields (field_x::value).

The plugin doesn't render the icons in Reading unless both icons and inline dataview fields are placed in a table 🤔 . It seems to work fine in Live Preview though 🤔 .

Icons shortcodes - Inline Dataview fields

I'm on Mac + Obsidian v0.14.2 + Icon Shortcodes 0.9.2

And here's the markdown I used for the screenshot above :

> [!quote]
> an icon :luc_lightbulb: some text :luc_lightbulb_off: (moon_illuminated::41%)
> 
> |1|2|3|
> |--|--|--| 
> |an icon :luc_lightbulb:| some text| :luc_lightbulb_off: (moon_illuminated::41%)|

an icon :luc_lightbulb: some text :luc_lightbulb_off: (moon_illuminated::41%)

|1|2|3|
|--|--|--| 
|an icon :luc_lightbulb:| some text| :luc_lightbulb_off: (moon_illuminated::41%)|
I-Pch commented 2 years ago

Just wanted to add that this is completely new and was working before 🤔 (before what I have no idea though 😅 ... sorry 😇 )

Here's a screenshot of an old daily note (in Reading) from a test vault (for the date 2022-03-15) where I used both icons and inline dataview fields in a table or not without any troubles 🤔 ...

Working Icon Shortcodes

I tried to uninstall/re-install the plugin but it didn't change a thing

I-Pch commented 2 years ago

Another small addition, in case this could be useful 😇 ...

When using icons within the brand new Obsidian Callouts, the icons seems to be rendered if and only if there's some space between the line where there are icons and the inline dataview field(s).

icon shortcodes and callouts

So I guess, something changed in the editor when Obsidian v.0.14.0 (at least) was released for the insiders 🤔 (as this is when Callouts and Tables in LP appeared)

Emojis though don't seem to be impacted (as far as I can tell)

I-Pch commented 2 years ago

Just wanted to add that this is completely new and was working before 🤔 (before what I have no idea though 😅 ... sorry 😇 )

Here's a screenshot of an old daily note (in Reading) from a test vault (for the date 2022-03-15) where I used both icons and inline dataview fields in a table or not without any troubles 🤔 ...

Working Icon Shortcodes

I tried to uninstall/re-install the plugin but it didn't change a thing

I should have added here (sorry 😔 ) that in the vault where I can still mix icons and inline dataview fields, I didn't updated Icon Shortcodes ...

The settings for the screenshot here are still from Mac + Obsidian v.0.14.2 but Icon Shortcodes 0.8.4.

aidenlx commented 2 years ago

pretty sure that it's Dataview render issue, I'll add one comment there.

aidenlx commented 2 years ago

should be fixed with icon shortcode v0.9.5 and this PR is merged: https://github.com/blacksmithgu/obsidian-dataview/pull/1098

NothingWorksToday commented 1 year ago

Bug is there (again?) Obsidian: v1.0.3 DataView: 0.5.47 Icon-Shortcodes: 0.9.7

Source-code-view: image

Live-preview image

Reading-view: image

Iconca commented 1 year ago

Hello, I'm having the same issue with not rendering icons in reading view, when it's in the same line with dataview inline field. Is there any chance that it will be fixed soon or is it too complicated? Sorry if I'm asking in a wrong place, but with all this cross-referencing on git hub I'm never really sure, where I should post.

I-Pch commented 1 year ago

Hi @Iconca 😊 !

Well, this specific issue was closed (and I don't have troubles using icons and inline dataview fields within callouts/admonitions) but, you could probably add info to this other issue here -> #54 (as it's still opened) 😊.

Iconca commented 1 year ago

Hello. After your comment I've thought that after all, it may be only my problem caused by some CSS. So I've checked in a Sandbox Volt and it still occurs. I'll make sure to ask in the thread that you pointed out. Thank you for the reply.