rancher-desktop icon indicating copy to clipboard operation
rancher-desktop copied to clipboard

Enable golangCI lint on all our golang repos

Open Nino-K opened this issue 2 years ago • 0 comments

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.

Nino-K avatar Nov 03 '23 16:11 Nino-K

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.

yceruto avatar Dec 11 '23 18:12 yceruto

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?

weaverryan avatar Jan 09 '24 14:01 weaverryan

I don't see @yceruto's idea. Maybe he can suggest it?

ytilotti avatar Jan 09 '24 16:01 ytilotti

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'];

weaverryan avatar Jan 29 '24 11:01 weaverryan

Thanks for your work here @ytilotti. This is now fixed via #1723.

kbond avatar Apr 15 '24 12:04 kbond