sa46 1 day ago

> Where is the native HTML datagrid

Which parts of a datagrid should a browser provide? I'm familiar with AG Grid [1] and the API surface is enormous. Aligning browsers on a feature set would be challenging.

Maybe there's a core set of functionality, like Flutter's GridView or QML https://doc.qt.io/qt-6/qml-qtquick-gridview.html.

[1]: https://www.ag-grid.com/

1
crab_galaxy 1 day ago

The simplest would be to follow the aria role=“grid” spec, ideally with sortable columns. IMO it doesn’t need the kitchen sink AG Grid approach just a sane way to semantically build a data grid with proper accessibility.

https://www.w3.org/WAI/ARIA/apg/patterns/grid/examples/data-...

dimal 1 day ago

It has to handle every possible use case for a grid. You’re thinking of your use case. The spec needs to handle everything else. I don’t see how that’s manageable.

no_wizard 9 hours ago

Does it though?

A good spec really only needs clear principles. At a minimum, it should clearly explain what it does do, and also clearly explain what it does not do.

You don't need to have every edge case covered to build an API for datagrids. iOS has had native DataGrids for ages, Windows, macOS, Android. They all have this stuff built in. Other platforms have figured out how to provide these API surfaces.

Why does the web have to be seen as a special unicorn that can't have good baseline components like these platforms?

sensanaty 22 hours ago

At minimum filtering and sorting should be handled by the browser, including async for both of those.

Pagination could be argued as well, but at least that's simple-ish to implement (but still, it's such a common UI pattern that it ought to be handled in a unified way by browsers IMO)

dimal 18 hours ago

Look at how much effort has gone into just getting a stylable select box. Look at tooltips. A data grid is several orders of magnitude higher in complexity than both of these. You are severely underestimating the complexity of your ask. HTML/JS/CSS is not supposed to solve all your UX problems. It’s a toolkit for building UIs, not a framework.

prmph 17 hours ago

Is it not the design by committee approach that slows down the design consensus on things like these? Just complex is it to design a spec for a stylable select box that is reasonable for most use cases?

If it has to take decades to agree on a design for a stylable select box, then there is something fundamentally broken with the approach.