Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Everything (containers, widgets, etc.) is basically SVG's

Controversial opinion: vector-based UI widgets are the right way to do web apps. Instead of all the existing framework approaches that ultimately produce HTML, both developers and users would be better served by using HTML for the elements on a screen that correspond to documents, but the web app's "chrome" should use SVG. Most of the complications of frameworks come from a blind spot on the part of developers, who continually select a tool with a high impedance mismatch to their goal (producing an app). This blind spot on the part of developers leaves this area under-explored, and in turn there's under-investment in the specs / on the part of browser makers to eliminate pain points in the way that developers are actually using the platform for their work.



The problem is that SVG doesn't AFAIK support layout constraints - you'd have to essentially recreate flexbox and grid in JS, and God forbid you wanted to make the design responsive!

I agree with you in principle that SVG is a better match to app UIs, but we'd need a good layout story for that to happen. And I'm using SVG for much of my own application interface!


You should be able to use CSS (incl. grid, flex, etc) within an SVG context though.


ideally, an SVG layout optimised for web app design would be somewhat more flexible than just grid and flex - such as anchoring an element to 2 other separate parents (or in other words, supporting a directed graph rather than a tree). A pure constraint system would be nice, but is probably not viable if fast rendering is important (which, it is).


I went down that road for awhile. You start running into problems when you research all of the default behavior that the built-in widgets have, and this is even before you get to accessibility issues.

I love the idea of punting on HTML and writing a ground-up SVG UI toolkit, or even a WebGL based on if you're feeling ambitious, but giving up on the built-in browser behavior and all of the automation tooling around interacting with HTML is a non-starter for most use cases.


How do you make this accessible?


Can you use ARIA attributes on inline SVG in a Html document? That would do the trick nicely if it works.


Interesting, if SVGs make sense, then a new game-engine-like client makes more sense as a general delivery platform. Maybe Dart/Flutter/Fuchsia isn't far off.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: