chrismorgan 1 day ago

Please look over my comments on HN about Flutter and pure-canvas and such. There are big problems. There is plenty special about the DOM that you lose and cannot gain back if you go pure-canvas. Links. Scrolling. Text handling. Composition. And various more.

Use DOM. Please use DOM.

Use canvas for an actual drawing canvas, but for the UI and anything else that’s largely text, use DOM.

1
peutetre 1 day ago

There aren't "big problems" because it works. When you put yourself in the corner of claiming "pure-canvas is irredeemably bad" when it's plainly not, then there's nothing practical on offer.

chrismorgan 1 day ago

“It works” is a terrible defence, because of the different degrees of working.

I’m describing various specific ways in which it doesn’t work properly, in ways that stop users from doing things they may legitimately want to do, or which will frustrate some users, and you’re just disregarding them. I’m not being vague in most of my complaints, I’m being very specific.

It’s like you have a screw, and it’s worn enough that sometimes it makes the screwdriver slip, but you’re saying “just be careful, maybe apply a little more pressure, and it still works”.

peutetre 1 day ago

> and you’re just disregarding them.

Of course. You're living in a world of your own imagined requirements. The practical reality is that there are plenty of use cases for this stuff, whether you like it or not. This stuff is fit for purpose for many purposes.

wiseowise 1 day ago

How the hell you can claim “it works” if you can’t even select text out of the box, lmao?

peutetre 1 day ago

Because I can select text out of the box.

wiseowise 1 day ago

Okay, this getting absurd. At this point I’m 90% convinced that you’re just trolling.

https://news.ycombinator.com/item?id=42252999

You can’t select text in neither of your provided samples on both PC and mobile in different browsers.

peutetre 1 day ago

You can. Text selection works, cut and copy and paste works, zooming works.

I don't know what you're doing.

erinaceousjones 19 hours ago

What about screen readers and mobile users? There's all these useful accessibility tools that would also have to be reinvented for canvas based apps.

Text selection and getting it to bring up a keyboard is iffy on the canvas-based things you linked to (I'm looking at them on Firefox for Android on a Pixel 6). Sure, the VB one is a desktop app. But the original (non canvas) version of that app likely worked with windows screen readers, and that is lost in this reincarnation onto the web. Good old fashioned DOM already has pretty good native accessibility support for mobile phone UI.

There's a lot of things that have been thought about when it comes to usability and accessibility, in both the web, and traditional desktop/mobile UI frameworks.

Reimplementing those UI frameworks in canvas in a browser environment requires mapping the a11y bits too, not just keyboard+mouse input and rendering to screen.

Not to mention Qt and Gtk and the older Android framework apps all use forms of markup and styling which are inspired by XHTML and CSS and document object models......

wiseowise 21 hours ago

Which browser/OS?