-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Canvas text does not appear in Trilium 0.60.0-beta and 0.60.1-beta #3979
Comments
Weird. Would you be willing to send me the note to zadam.apps@gmail.com so I can try to reproduce it? So far the text seems to be working for me.
What do you mean by edit mode? |
Sure, here's the note (it's not a private note, so no need to send via email).
Let's just say that I've become like crazy asking myself why I couldn't move my canvas while I clicked on the hand in edit mode. |
Thanks, I can reproduce, but the file works fine on https://excalidraw.com/ I will investigate. |
I downgraded excalidraw release to the one used in 0.59 which seems to fix it. I don't know what's causing this. The text is visible in the SVG which excalidraw produces (which is saved together with excalidraw's own format and is used in e.g. list preview). |
I'm pretty sure there's a mix between excalidraw variables and trilium variables... |
I was wondering about that possibility, but excalidraw draws on HTML Canvas which is not affected by CSS variables or declarations. |
Even on earlier versions of trilium, the same canvas doesn't show all the text, but not everytime, no idea why. |
Hello @zadam Just tried 0.60.2-beta. So far so good, texts did reappear, except some: Here the third line first column rectangle misses text. As soon as I hit escape key (exiting edit mode), it appears: I have other schemas where this happens: If I happen to double click into a square, the text will indeed appear: I've noted some error in the console, but this did only pop up once, and doesn't seem linked to the text not shown:
If I can help provide any better debug info, please let me know. |
Indeed, I can reproduce the issue, but it looks like it's happening already in 0.59. I fear it's an excalidraw bug, which is unfortunate since because of these other issues we can't upgrade. The error you posted is quite strange - in my testing the file is fetched correctly from correct path (no duplicated "dist"). |
Indeed, I encounter this problem since I begun using Trilium with v0.56 or so, but I didn't do as much canvas as lately. |
That would be the best - I think it would be great if you could reproduce the issue on their demo site. |
Well, I actually tried to export my canvas with the hamburger menu to have a How can I extract my canvas as excalidraw format, in order to reproduce the issue at their demo site ? |
Yes, this doesn't work unfortunately. All other in-excalidraw exports either. I believe they're using some new APIs for file handling which are not well supported in electron.
The idea is that you should be able to use the exported *.json from trilium. But it looks like excalidraw started to require some "headers" to recognize the file. I've added them and this will work in the next 0.60 release. In the meantime, I modified the file manually: Just upload this JSON file to https://excalidraw.com/ The good thing is that it appears to be reproducible there. |
Opened issue 6686 at excalidraw. Let's see ;) |
So , got a reply from them... Shall we talk about trilium there ? |
It's excalidraw related very likely. Trilium doesn't do anything with such attributes. All Trilium does is saving the JSON and reading it before serving to excalidraw. It's likely because of the bug in an earlier excalidraw version as mentioend in the issue. |
Well, then I am stuck between excalidraw and trilium. I've asked them which version of excalidraw did have the bug meanwhile. |
This bug was fixed in v0.60.3, but it reappeared in v0.60.4 |
@harveyTon I don't see any excalidraw related commits between 0.60.3 and 0.60.4. Are you sure 0.60.3 was good ? |
I don't think there's any difference between 0.60.3 and 0.60.4 regarding excalidraw. |
Trilium 0.61 will again contain excalidraw 0.15.2. It looks like the problem was caused by somehow corrupted attributes in the canvas JSON which is not something which trilium can fix/influence. |
Thanks for you answer. Looking out to test 0.61. |
I hit this same bug on 0.61.13 with canvas notes where my text is not showing up properly. What can I do to mitigate/fix this issue? Or is there any follow-up bug? |
@Areiser Export your canvas, load it into online excalidraw, save it, rename it from .excalidraw to .JSON, reimport into trilium and you're good. [EDIT] This was actually an excalidraw bug saving text size as 0px as far as I remember[/EDIT] |
Can confirm this makes the text reappear again. But the preview image in Trilium seems to be broken. |
@Nriver the preview uses image generated during editing of the canvas note. After import there won't be an image generated until you edit again. I guess that is something which could be handled better ... |
Ah, that broken preview image seem to be a different issue caused by Chinese name in the note. I will continue to discuss it here #4478 |
Whether developer can supply a script tool or another things to do this, automaticly?? |
I guess you could make use of the API here. |
Trilium Version
0.60.0-beta
What operating system are you using?
Windows
What is your setup?
Local + server sync
Operating System Version
Windows 10 22H2
Description
Tried to migrate from trilium 0.59-4 to 0.60.1-beta in order to get rid of a bug being:
When I show a note containing a canvas, some texts that describe the rectangles I draw don't show, unless I double click the rectangle.
I've upgraded to current 0.60.1-beta in order to see whether it gold resolved.
But now no text show at all.
Here's an image of a canvas as seen in 0.59-4:
The same canvas as seen in 0.60-0-beta and 0.60.1-beta
As a side note, it's never obvious if we are in edit mode or not in the canvas (it's small written text, grey on grey when using dark theme...). It would be nice to have an icon somewhere with a lock or so.
Error logs
Error log when trying to double click on a rectangle in trilium 0.60.1-beta
The text was updated successfully, but these errors were encountered: