[yew-devel] [PATCH proxmox-yew-comp v3 1/2] schema_validation: use Schema to populate field properties of number, check- and combobox

Hannes Laimer h.laimer at proxmox.com
Fri Oct 10 14:43:55 CEST 2025



On 10/10/25 10:32, Dietmar Maurer wrote:
> partially applied.
> 
> - setting placeholder is OK
> 
> - setting tips from description is problematic, because those 
> description are basically for developers and have no translations, so I 
> think its not worth to do it.
> 
> - setting field default values form schema default is most times not 
> what you need (depends highly on your input form logic)
> 
> - setting validator for Number makes no sense 
> (schema.parse_simple_value() does not add any advantage, because values 
> are already parsed - correct me if I am wrong)
> 
> - auto-generating Combobox is usually not what we want, because we 
> display translated, annotated items...
> 

hmm, we can still do that though. for combobox items specifically I feel
like having it still adds some value. There are places where we don't,
and a later .items() does override whatever we took from the schema if
we want to set them ourself.

We don't for example for firewall logging levels or firewall policies
like DROP, REJECT, ACCEPT. Also having the default as a placeholder
automatically is, if nothing else, convenient. tbh, I'm not super sure
how often we do this, so may not be warranted to have a general thing if
only these two end up using it.


> - Dietmar
> 
> 





More information about the yew-devel mailing list