Live data from Hacker News

HTML Can Do That

chrisburnell.com

11–20 of 249 posts

Re: HTML Can Do That

#11
post #4

The “hidden until found” feature surprised me. What’s the use case for something like that?

One thing that comes to mind is JS-less image preview, clicking on an image thumbnail reveals the full preview.

Re: HTML Can Do That

#13

Just a heads up but datalist is not really a great solution if you need a strong contract. The user can still type whatever they want into the field and there is no fuzzy filtering or typo mitigation. Once you add those requirements, a library that gives you a more fully featured combobox is likely going to make a lot of sense in your project.

There’s still browser/OS typo mitigation.

Re: HTML Can Do That

#14
I think it’s neat but at the same time I’m cautious about implementing an “almost feature” in what’s supposed to be a declarative language.

Now everybody needs to support it and nobody can really use it.

I’m talking about the features in work like media controls on dialog buttons.

Re: HTML Can Do That

#15

Just a heads up but datalist is not really a great solution if you need a strong contract. The user can still type whatever they want into the field and there is no fuzzy filtering or typo mitigation. Once you add those requirements, a library that gives you a more fully featured combobox is likely going to make a lot of sense in your project.

Very true, and ran into this one specifically myself when going down the "HTML can do this!" road. HTML can NOT, in fact, replace a good combobox with search input. Datalist has significant shortcomings. I wound up using a React island for this single input inside otherwise normal HTML, despite my own objections, because it really it just that much better than the native options.

Re: HTML Can Do That

#16

I don’t understand why the group invented these new attributes and methods of action for dialogs that don’t seem relevant to anything else. Was there some silly patent to work around?

As opposed to what? Not sure what the alternative you're picturing is.

Re: HTML Can Do That

#18
post #8

This comment by yurishimo should not be [dead], imo >Just a heads up but datalist is not really a great solution if you need a strong contract. The user can still type whatever they want into the field and there is no fuzzy filtering or typo mitigation. Once you add those requirements, a library that gives you a more fully featured combobox is likely going to make a lot of sense in your project. It is true! HTML can…

I seem to recall there was a proposal to add such thing to s

Re: HTML Can Do That

#19

Just a heads up but datalist is not really a great solution if you need a strong contract. The user can still type whatever they want into the field and there is no fuzzy filtering or typo mitigation. Once you add those requirements, a library that gives you a more fully featured combobox is likely going to make a lot of sense in your project.

That's the whole sanitize vs. validate argument debate that keeps coming up.

How you handle it is project-dependent. But if you're doing a real web site, not an SPA, you can show an error/help page, or re-load the current page with the error/help message.

Re: HTML Can Do That

#20
Related to this, I’d love that HTML natively support sortable tables. This is a common need but every single time I have to reimplement it.
Post reply on HN