Live data from Hacker News

Google Docs will now use canvas based rendering

workspaceupdates.googleblog.com

431–440 of 953 posts

Re: Google Docs will now use canvas based rendering

#431
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.

Web UIs are already an incredibly cut-down implementation of a real OS GUI. I'm not looking forward to something even worse than that.

Re: Google Docs will now use canvas based rendering

#432

Earlier quoted context omitted.

> I imagine using canvas gave them a lot more flexibility in addition to being more performant. I'm perplexed because I don't expect canvas rendering to be faster - or necessarily more flexible - because the web is document-first: HTML and CSS were/are all built-around describing and styling textual content , and computer program source code files are invariably all textual content files. So while browsers all have h…

>I'm perplexed because I don't expect canvas rendering to be faster ...yet it is. Really. Even though DOM paths are heavily optimized, they are extremely flexible, and that flexibility creates a wall in possible performance optimizations. In a context like word processor, precision is more important than your regular website (and across browsers!) so you end up implementing little hacks everywhere, pushing half a pix…

> Google has no shortage of devs who know what they are doing so here we are.

They also have no shortage of devs who advance crazy ideas that somehow gain adoption... like starting a new general-purpose programming language in 2007 without generics nor package manager.

Re: Google Docs will now use canvas based rendering

#433

I think this is actually one of the few cases where canvas-based rendering makes sense as a replacement for the DOM. Docs is a full-featured application which already has to re-implement a lot of DOM-like features in order to fulfill its primary function (things like text formatting and layout, spell checking, etc). Doing it all in canvas doesn't sound significantly more difficult than what they're already doing. The…

This is a great example of a comment written by a developer or some otherwise technical person who is so used to thinking and speaking in terms of trees that they can't see the forest, let alone the village it's situated next to and the people inhabiting it. Google Docs may be an app, but a big part of the app, and confirmed to be one of the reasons for the migration here, is the part that renders the document to the…

Thank you for articulating this. For the last decade we have had frontend developers trying to force the web to be an app delivery platform. We have bent over backwards to accommodate this. We have turned browsers into a giant pile of hacks essentially emulating their own operating systems. And for what? As soon as they're able, they say oh, the browser is a giant bundle of hacks now, let's implement our own app delivery system on top of it.

Next time we get a document delivery format and people start trying to make it something it's not, because oh gosh it's easier to install the app, we need to push back and say hey, maybe clicking a few buttons in an installer isn't the worst thing in the world.

Re: Google Docs will now use canvas based rendering

#434

Earlier quoted context omitted.

I for one would welcome the death of HTML and CSS. Unfortunately I suspect they will merely be re-used for this.

Why? They are the best layouting tools we have to this day. Or do you want to go back to TextElement textElement = new TextElement(); textElement.position(100, 100); textElement.color(Colors.RED); textElement.alignment(Alignment.CENTER); ... and the likes? These kind of descriptional ui tools are horrible in my opinion.

We had layout managers by the early 90s, and Java was not the only choice. Delphi, wxPython, and Qt were/are pretty good. Do not use pixel positioning or hardcode colors was right in the docs.

Re: Google Docs will now use canvas based rendering

#435

Earlier quoted context omitted.

I for one would welcome the death of HTML and CSS. Unfortunately I suspect they will merely be re-used for this.

Why? They are the best layouting tools we have to this day. Or do you want to go back to TextElement textElement = new TextElement(); textElement.position(100, 100); textElement.color(Colors.RED); textElement.alignment(Alignment.CENTER); ... and the likes? These kind of descriptional ui tools are horrible in my opinion.

I find those tools much easier to get a decent GUI layout with. Getting the same layouts with HTML and CSS seems to involve a pile of hacks, because they were designed as document markup, not button and panel layout tools. (that said, a markup system for constraint based layout would probably be better, and CSS does seem to be growing some of the features, it still just seems to be hard to get something that works as consistently as e.g. Qt).

Re: Google Docs will now use canvas based rendering

#436

Earlier quoted context omitted.

What makes Google Docs a better product than MS Office? Can you provide some examples of features that are better in Google Docs?

Copy a few cells from a Google sheet and paste it in an email, then do the same with Excel. Collaborate on building out a document from scratch with 10 people in Google sheets vs Excel. Excel is a monster, and much more powerful than Google sheets in many ways, but in my experience, Google docs apps are a little better for collaboration, and they integrate a little tighter with each other.

Google docs is their document editor. Sheets is a part of GSuite.

I've also never had trouble pasting a spreedsheet selection into a word document. Email is a nightmare in general though.

I'm not sold on collaboration personally. I've had to do it a bunch since the pandemic began and I've found it to be an anti pattern. One of the big inconsistencies is that cells in sheets don't update while being edited while collaborating, which is not great if you have a spreadsheet heavy workflow. Docs is impossible to replace that though, because it's auto formatting is draconian and always seems to reset its preferences. When editing docs we spend more time formatting them then creating the content.

Re: Google Docs will now use canvas based rendering

#437

Earlier quoted context omitted.

Also, you know, accessibility. This could be a real serious problem for people with disabilities.

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?

Re: Google Docs will now use canvas based rendering

#438
post #378

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.…

A million times this - having worked in this space, nobody wants to do this. I understand the cynicism, but the affordances provided by the browser for things like accessibility are very painful to give up. This isn't some dark pattern attempt to cut out whatever "openness" remains on the web, or to convert the browser into a display-streaming client for some sinister DRM reason. In my past job, we rewrote our spread…

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.

Re: Google Docs will now use canvas based rendering

#440

Earlier quoted context omitted.

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)

Resume lines.

This is correct, I am afraid.
Post reply on HN