Live data from Hacker News

Google Docs will now use canvas based rendering

workspaceupdates.googleblog.com

461–470 of 953 posts

Re: Google Docs will now use canvas based rendering

#461
post #437

Earlier quoted context omitted.

This is 100% the reason why I decided not to use Flutter back when I was shopping. It probably would have reduced my developer effort considerably compared to basically every other option that made it to my short list, but I can't in good conscience build something that isn't accessible.

Flutter claims to be fully accessible: https://flutter.dev/docs/development/accessibility-and-local... Did you actually try it?

Thank you for saying "claims to". Copy pasting a response I made elsewhere:

This is making a mockery of accessibility.

It's the equivalent of having a company that actively discriminates against everyone not passing a internally developed test to check whether you are a "neurotypical" and then respond to criticism by pointing at the wheelchair ramp you installed on one of your entrances.

If I can't copy paste words from your websites to put them into a translator, if I can only use your website when I use one of the two corporate-affiliate-selected screen readers (not even platform-agnostic ones), when I can't look at your website from anything that does not have 4+ cores and a 4G or better connection...saying accessiblity is a "first class citizen" or even citizen at all is laughable at best.

Re: Google Docs will now use canvas based rendering

#462
post #99

Ever since WebAssembly was first introduced, I thought it was obvious[1][2] that the end game for those that want to control the web is sending opaque binary blobs of code that only use the browser for the canvas tag's framebuffer. Font rendering and layout can all easily be accomplished by embedding libraries like freetype. This breaks all forms of user control - like ad blockers - and turns the web back into cable…

This is what Flutter on the web is, by the way. You can try it out here: https://gallery.flutter.dev/#/ and marvel at the impossible to select text, one of the many affordances violently excised here. If it wasn't still incredibly slow even on a cutting-edge Zen3, Nvidia 3070 system they might almost be on to something here.

I didn't believe you at first, but then I gave it a try.

Yes, they actually built an email client from which you cannot copy text: https://gallery.flutter.dev/#/reply

Re: Google Docs will now use canvas based rendering

#464
post #425

Earlier quoted context omitted.

Just for what it’s worth, “word processors” are a logical starting point specifically because the APIs for text manipulation in the DOM are abysmal, and every in-browser WYSIWYG text editor is a steaming pile of hacks. Some of them work well despite this, but, it’s a horrible set of code to maintain and very, very hard to make a good user experience. One of the very hardest things to do well in the browser, actually.…

teach markdown in schools. who needs word processors anyway? need something fancier than headings, lists, block-quotes etc? learn LaTeX. Text rendering can be fantastic in the browser. I'm half joking, but I think the world would be a better place if folks had fewer, more precise ways of making words look the way they want

I love markdown, all my blog posts, TILs, book notes are in it. Even my presentations are written in markdown. But this comment is so obtuse and user hostile. Millions of people know how to use word processors. Let's not take that away from them or even imply that they're doing it wrong. They're fine. Software can always be improved, like the Docs team is attempting here. But we can't overnight tell people that their skills are obsolete because some developers somewhere like Markdown and Latex.

Re: Google Docs will now use canvas based rendering

#465

Earlier quoted context omitted.

I had these exact complaints about web apps many years ago, and I was dead wrong. Nobody cared that web apps were slow, had/has horrible UX compared to native apps, and feel janky by comparison. These demos elicit similar feelings. Now, they're not as fast as I like, but they feel better than most webapps already. (It reminds me of Flash, actually.) If the Flutter dev experience is good enough, this will eat traditio…

Despite their shortcomings webapps won because they had a number of advantages that native lacked, most of all software distribution. What has flutter to offer that a regular webapp lacks? (not performance, it seems)

SPAs to Flutter is a much smaller step conceptually than native to Web. Most of the world is using a Blink-based browser of some sort already. Updates are pushed aggressively.

> What has flutter to offer that a regular webapp lacks?

Google branding, novelty, more sane dev UX. I'm not saying those are good reasons to choose it, I'm just extrapolating from how the industry works.

Let's be honest: end users basically just put up with whatever devs release at this point. It doesn't matter if the end product murders battery life, doesn't fit the target platform, and steals their data. It's not like switching to some less-than-web-native framework is somehow a bridge too far for end users.

Re: Google Docs will now use canvas based rendering

#466

Earlier quoted context omitted.

The dom isn't trash. Its good enough. We just need to stop making it do things it wasn't supposed to. That's why things like electron make sense a little bit. Not perfect but sensible.

> We just need to stop making it do things it wasn't supposed to This is a thread about Google Docs. Your suggestion to the Docs team is to ... stop? Just shut down their product?

Oh no. They're google. They make a godforsaken browser. They can pay people to do nothing more than think about code. By all means. They can launch a satellite with css if they want.

But the rest of us plebs...

Re: Google Docs will now use canvas based rendering

#467
post #280

Earlier quoted context omitted.

This is what Flutter on the web is, by the way. You can try it out here: https://gallery.flutter.dev/#/ and marvel at the impossible to select text, one of the many affordances violently excised here. If it wasn't still incredibly slow even on a cutting-edge Zen3, Nvidia 3070 system they might almost be on to something here.

That is absolutely horrible. I am only waiting for the day when people start making desktop apps using electron + Flutter on the web.

Right now probably some people seeing this on HN will be thinking about it.

Re: Google Docs will now use canvas based rendering

#468

Earlier quoted context omitted.

The dom isn't trash. Its good enough. We just need to stop making it do things it wasn't supposed to. That's why things like electron make sense a little bit. Not perfect but sensible.

> We just need to stop making it do things it wasn't supposed to This is a thread about Google Docs. Your suggestion to the Docs team is to ... stop? Just shut down their product?

I read this as sometimes you need to use an exit hatch like Canvas instead of a bunch of hacks to make a WYSIWYG editor strictly with the DOM. Google seemed to come to the same realization and that is why they are using Canvas

Re: Google Docs will now use canvas based rendering

#469
post #425

Earlier quoted context omitted.

Just for what it’s worth, “word processors” are a logical starting point specifically because the APIs for text manipulation in the DOM are abysmal, and every in-browser WYSIWYG text editor is a steaming pile of hacks. Some of them work well despite this, but, it’s a horrible set of code to maintain and very, very hard to make a good user experience. One of the very hardest things to do well in the browser, actually.…

teach markdown in schools. who needs word processors anyway? need something fancier than headings, lists, block-quotes etc? learn LaTeX. Text rendering can be fantastic in the browser. I'm half joking, but I think the world would be a better place if folks had fewer, more precise ways of making words look the way they want

To me this is like saying that because we are no longer able to make good bicycles people should walk everywhere.

Re: Google Docs will now use canvas based rendering

#470
post #308

I wrote the terminal canvas renderers in VS Code that has been called out a few times here. Initially I implemented a canvas renderer using just a 2d context to draw many textures which sped things up "5 to 45 times"[1] over the older DOM renderer. Since then I moved onto a WebGL renderer[2] which was mostly a personal project, it's basically the first canvas renderer but better in every way since it works by organiz…

Do you think the large performance benefits can be achieved for any general web app (e.g. if I rewrite my Vue app's render functions to using a canvas instead of the DOM) or is the canvas' benefits mainly for niche workloads?
Post reply on HN