rancher-desktop
rancher-desktop copied to clipboard
Enable golangCI lint on all our golang repos
Currently, we are only using the linter on the following repos: https://github.com/rancher-sandbox/rancher-desktop-networking https://github.com/rancher-sandbox/rancher-desktop-agent We should update all our golang repos to use linter.
It could be simpler for this autocompleter service if it built the form view (i.e., $view = $this->getForm()->createView()) and get the label and value already processed from $view->vars['choices'], so you wouldn't miss any native features that render those options.
It could be simpler for this autocompleter service if it built the form view (i.e., $view = $this->getForm()->createView()) and get the label and value already processed from $view->vars['choices'], so you wouldn't miss any native features that render those options.
That's a really interesting idea. After all, our goal is to return the text and value that is rendered on the frontend. So creating the form view, then extracting from there makes a lot of sense. @ytilotti would you mind giving that a shot?
I don't see @yceruto's idea. Maybe he can suggest it?
Sorry for the delay @ytilotti - it's this idea: https://github.com/symfony/ux/pull/1328#issuecomment-1850665714
So instead of getting the choice_value option from the form, then trying to handle the different types that it may be (which is, I admit, what I've done so far in other spots), what if we did something like this?
$view = $this->getForm()->createView();
return $view->vars['value'];
Thanks for your work here @ytilotti. This is now fixed via #1723.