When writing Flux on Cloud 2.0, the new form of "Inject" for functions does not inject a working bit of code

Has anyone else noticed the change in the code that "Inject delivers on Cloud 2.x?

“Injecting” a function used to inject a working bit of code and I could immediately remember how to fill in the variables to make it work.
This worked for 99% of cases even for functions I rarely use and have forgotten what variables it needs.
In many cases the injected code worked “as is”.

For example; Injecting used to give
|> sort(columns: ["region", "host", "_value"])

So I could tell instantly how the function works and edit it for my purpose

Now it injects
|> universe.sort( )

Which leaves me (and maybe other people?) guessing what on earth variables I’m supposed to put in the brackets

So now I have to:

  • open up the help page in a separate tab
  • find the place where a working example is given
  • copy the code
  • flick back to my tab
  • paste in the code
  • edit as before

Why break such a useful feature?
The new way is really unproductive for me.

I’d cote to bring back injection of a completed working example code because it contains everything that most people need to know to use it.

Anyone else?

Hello @asmith,
I agree with you I am now doing the same.
Can you please submit an issue here:

Looks like its a bug that’s actively being worked on.

HI @Anaisdg , I had already posted on github

I posted here to check whether other people were also not liking the new feature.

1 Like