Recent submissions

Comment · 1 day ago
What choice do we have? We have to find a solution to the problem. ContentEditable is much harder to work with. This is a solution, and I hope we will at some point work out a new web API that makes these tasks easier.

Your reasoning is that I am missing out on a large percentage of users. I understand where this is coming from. I am working on mobile apps as well, as I did with iOS. I can try to close that gap even more, but I can't just switch to ContentEditable. I don't have the time, and there are already tons of projects that do that.

But if Google did it at their scale, then I think the tradeoff is reasonable, don't you think? You said in another HN post that they don't really use pure canvas. What do you mean? ContentEditable for capturing input?

Comment · 2 days ago
This is really valuable! Just to add a bit of context: I'm not the only one using canvas for rendering. Google Docs did it years before me. Think of it this way: I've built this almost entirely alone and still get most of the basics working.

Let's start with your test. I think the reason it struggled with the Gutenberg text is that it had a lot of images. Either way, that's a bug and it should be fixed (it shouldn't load all the images at once, and there's probably too much work happening on the main thread). I really appreciate the effort you put in.

I could also use a WebGPU or WebGL context, which would certainly be faster. I think I had a working version last year, but it had problems with blurry rendering (font hinting). I don't remember the exact details now.

Overall, I'm really thankful that you pointed these out. I'll try to work through them over the next few days. I do disagree with the premise, though: canvas is more than capable of achieving this. Performance shouldn't be an issue. That said, I agree with your points about integration with context menus and other tooling.

Comment · 2 days ago
I take advice and feedback like yours seriously, thank you for giving your opinion, I appreciate it. For iOS, I tried to make it work, but iOS has really made it tough in that regard. For some reason they do not like a hidden contenteditable controlled by a canvas. That is part of the reason I have an iOS app published on the App Store.

Also, I know that LLMs might sound wrong to many, and I get where this is coming from.

For me, AI gives me, as one lone developer, the power to create and implement these ideas. It helped me translate and do so much more. I agree this may create a feeling of distrust, and I don't think it should not replace thinking.

Comment · 2 days ago
I used radix UI, but it has no styling.
Comment · 2 days ago
Nice work, liked the idea. Come join Tasfer Discord, there is one there. I just added the link to it in landing page.
Comment · 2 days ago
If you have time, really interested on where you faced this issue, anything would help.
Comment · 2 days ago
WOW, I have never know that these gesture even existed. I am not big mobile user. But i will diffently look in thoses.
Comment · 2 days ago
Google has switched in 2020 (if i am not mistaken to canvas), but I am not saying this would be the solution to everything, It is just another option one could do. I do not know if someone noticed this, but that is part of the reason you could not just open google docs on mobile. Because I would suspected that it would been too much effort for them back than. In anyway Tasfer tried as best as possible to do that on mobile too.
Comment · 2 days ago
Yes, exactly that is the input surface. Canvas can not recieve the events otherwise, IME, clipboard and others events go thraugh that.
Comment · 2 days ago
As far as I know, Monaco, the editor behind VS Code, does not use canvas. I noticed that Google Docs uses canvas, and that was the start of my project a year ago. I think that if I had used another context, like WebGL or WebGPU, it would have been much more performant, but it is really hard to render text and parse font files that way.

Anyway, I have gotten good enough results, and I don’t think normal usage will exceed the limits of the 2D canvas.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton