AnubisNekhet / AnuPpuccin

Personal theme for Obsidian
GNU General Public License v3.0
2.08k stars 163 forks source link

[Bug] With Cards #124

Closed whichy closed 1 year ago

whichy commented 1 year ago

Describe the bug

Card snippet doesn't work as expected

Please see ticket https://github.com/AnubisNekhet/AnuPpuccin/issues/120 the proposed solution didn't solve the problem it made no change in the result.

Any other ideas?

To Reproduce Steps to reproduce the behavior:

This time I added the snippet from your suggested link. I turned it on Setup a test page with a dataview query It isn't displaying as cards - but more like a differently formatted table

I tried turning on and off any style settings related to tables, I tried adjusting the cards settings in style settings. Neither of those seem to affect the issue.

Expected behavior I expected to get a card/boxed display

Screenshots If applicable, add screenshots to help explain your problem. withoutsnippet withsnippet using minimal

Additional context running current version of theme on current version of obsidian on windows 11

syrth-io commented 1 year ago

I had an issue like this when I first did my cards, but I can't remember now what the problem was and can't seem to replicate it. could you share your Dataview codeblock?

EDIT: also, I'm a bit confused by the third image -- if that's the result you're able to achieve, it looks similar to what cards look like for me, albeit without the dashed borders inside (thrilling inside look at my writing vault! /light-hearted): image

would you also clarify that a bit?

whichy commented 1 year ago

the third image is the same page using the minimal theme directly - showing the cards working with that theme, but which are not working with AnuPpuchin. Which implies to me that the query isn't the problem.

anyway - here is the query:

```dataview
table
pattern_type, designer, queue_status
WHERE doctype = "knitting_pattern"
Where queue_status = "in progress"
 SORT pattern_type ASC
syrth-io commented 1 year ago

ah I'm sorry, I missed that on your previous topic, so that's on me.

but yes, you're right! I was hoping seeing your query would help joggle my memory, but even altering mine to remove anything that wasn't in yours didn't break anything. it's been a while since I used minimal and couldn't recall if the cards are hardcoded into the theme or not, so I turned my cards snippet off and switched to the minimal theme and it appears that they are, which means I could get the card formatting snippet-free. (I also forgot to mention in my initial reply that I'm also on Windows 11.)

both my compiled CSS for the snippet and the one Anubis posted work in my vault, even with a few small differences in how they compiled. with further testing, I can replicate the issue you're having, including the difference in table styling depending on whether the cssClasses attribute is in the metadata or not -- but only when the snippet is disabled, or when it's enabled, but the cssClasses is positioned before a metadata field name with a space in it (as you have with created date and mod date), but it does work when it's after one as in your screenshots.

do you have other snippets enabled that work as intended? could one of those, or a plugin, possibly be interfering? how did you add the snippet -- via copy & paste or by saving the file directly into your snippets folder? do you use the native snippet interface (in the appearances tab in settings) or a plugin to manage them, such as MySnippets? there are honestly hundreds of small possibilities, but they're impossible to narrow down without much detail or knowing your level of comfort with Obsidian/coding, specifically CSS/tech in general, so please know I'm not being patronizing with the questions--just genuinely trying to help figure this out!

whichy commented 1 year ago

I am medium new to obsidian (less than a year). I have "ye olde" css experience from web design ages ago. And am usually functional in poking other people's css to fix stuff, but don't really write my own.

I tried getting the snippet in a few different ways including copying/paste and downloading. I have not yet tried a snippet plugin.

I don't have any other places were I have tried instigating cards yet - but I can mess around with that tomorrow and see if I can get it to work elsewhere.

I REALLY appreciate the help, and am confident enough to try just about anything css/tech wise. But am not a coder by training. But I follow instructions well :) (I do IT, but not dev for a living)

Not feeling patronized. I'm new to obsidian troubleshooting so knowing where people look for the issues is also super helpful.

whichy commented 1 year ago

Okay - I have it working and it was a "duh". I didn't realize that the css file had to have EXACTLY the exact name.

whichy commented 1 year ago

thank for the attempt at help!!