openui / open-ui

Maintain an open standard for UI and promote its adherence and adoption.
https://open-ui.org
Other
3.39k stars 183 forks source link

Standardise and expose browser pickers #922

Open lukewarlow opened 8 months ago

lukewarlow commented 8 months ago

There's requests to improve various inputs #421 #423

Most of these requests actually apply to the "pickers" more so than the trigger input (though that should be addressed too).

Currently browsers all expose picker UIs for a variety of input types. e.g. color, and date. It's inconsistent which inputs get these pickers exposed and how they look. There's also use cases that aren't addressed such as range support.

On native platforms (such as macOS) there's the ability to have for example a date input, but then also the graphical "picker" these can be used separately.

Is it worth OpenUI looking into standardising these pickers in a way that also makes them usable standalone (much like listbox is the selectlist picker but is usable standalone?).

(File picker I suggest we leave alone as that's quite a standard at this point and very security conscious)

lukewarlow commented 8 months ago

This should be even easier now we have popover and soon anchor positioning as I imagine (at least Chrome and Firefox) will move to a web implementation for their picker UIs.

lukewarlow commented 8 months ago

This came out of https://github.com/whatwg/html/pull/9754#issuecomment-1787802085 which suggests a key use case developers wanted showPicker for was to be able to get the pickers even if the input isn't in the DOM.

I feel like we'd be better off allowing them to just use the pickers as elements rather than using hacks such as that (especially because implementations aren't consistent and positioning is currently impossible)

YummyBacon5 commented 8 months ago

How would this work? Would the UA's browser picker be embedded into the page? - since on mobile browsers, it's normally a picker that stops interaction with the rest of the page

Or would it be a custom picker that authors could create with elements.

lukewarlow commented 8 months ago

Would need discussion but I'm leaning towards making a touch friendly web based picker UI and using that everywhere. So a standardised version effectively.

github-actions[bot] commented 2 months ago

There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label.