friedrich-de / Basic-Mining-Deck

Mining Deck Template
34 stars 5 forks source link

Editing on mobile breaks the pitch accent graph #2

Closed doctorhibert closed 1 year ago

doctorhibert commented 1 year ago

If I click the edit button on mobile and save the card, even if I didn't actually change anything, the pitch accent graph disappears and is replaced by a massive empty space. This effect remains when the card is later seen on PC, though editing cards on PC produces no errors.

friedrich-de commented 1 year ago

I'm afraid I can't reproduce this. Is this on AnkiDroid? Do you see any change in the pitch accent field if you enable the HTML view?

doctorhibert commented 1 year ago

Yes. It's on ankidroid. On PC, the "Graph" subsection of the card is actually empty, but it renders fine both in the preview and as a new card. On mobile, the graph section has all the code in it, and while it looks fine as a new card, if you click preview it's broken, and if you click ok after that it stays broken. The card on PC: image image The graph code that only shows up on mobile:

How the card looks on mobile as a new card: image How it looks in the preview and any time afterwards if you press okay: image

I'm not entirely sure how to enable HTML view in ankidroid, but here's the code for the back of the card I can see on PC: image image

And the styling: image image image

I have no idea if any of this is helping, but it's all I got.

doctorhibert commented 1 year ago

I saw the code when I wrote the comment, but now that it's published it's invisible for some reason. I'll add the mobile code as an image in case you can't see it either. image image

doctorhibert commented 1 year ago

Hmm. I've been looking into it and I think it might be related to my handlebars file, which I think was leftover from when you still had to edit it for yomichan. I reset it and the new cards look fine for now, but it doesn't seem to have affected any of the old cards. Is there any way to fix this, or am I screwed?

friedrich-de commented 1 year ago

Hmm. I've been looking into it and I think it might be related to my handlebars file, which I think was leftover from when you still had to edit it for yomichan. I reset it and the new cards look fine for now, but it doesn't seem to have affected any of the old cards. Is there any way to fix this, or am I screwed?

Sorry I'm replying so slow, been kind of busy lately.

If the handlebars caused the issue there isn't a way to easily fix it. You'd have to edit the cards with a script or something but that's not trivial. But at least it's fixed now with clean reset handlebars, right?

doctorhibert commented 1 year ago

Yeah, it's fixed now, I'll just edit the old cards on PC. It might be a good idea to add a step to the readme about resetting the handlebars before installing for dumb people like me.

friedrich-de commented 1 year ago

Added a note to the README.md