influxdata / influxdata/ui

Regression: script editor flux help/autofill

Open
#4,514 2 comments 0 reactions 1 assignee Claimed by @TCL735 View on GitHub
IceBox kind/bug team/automation team/dumplings team/ui
Dominant language
TypeScript
Stars
117
Forks
51
Avg merge
2d 15h
Merged PRs (30d)
4

Description

## About the bug

The flux autofill when you click a function from the picker has changed recently.

For one, the names of the builtin functions in the search are different (see screenshot), all starting with `universe`. For example, searching for “map” returns the builtin map as `universe.map` (universe being the package for all builtins), but universe is typically at the bottom of the list starting with `u` so the most commonly used functions are the farthest away - sometimes needing to scroll.

For second, the autofill has changed when you click a function. For example, map autofills with `|> universe.map(fn: )` but used to do `map(fn: (r) => ({ _value: r._value * r._value })`. `r._value * r._value` is never what I want but having the function form is helpful as the in-app help doesn’t provide an example for the form of `fn` (see screenshot), which is different than say `filter`’s `fn` form.

**Steps to reproduce:**
List the minimal actions needed to reproduce the behavior.

1. Visit the data explorer page or any flux query builder ("script editor")
2. Search for `map` or `filter` in the sidebar to see how it sorts.
3. Click the function and see how it autofills as described above

**Expected behavior:**
* Common functions sort near the top - but `universe` first?
* Autofill fill with a complete working example of the function OR the in-app help provides a complete working example.

**Actual behavior:**
* builtin function sort last, sometimes needing a scroll to get to
* function autofill uses blank arguments - for unfamiliar functions, this means I have to click away to get to the help docs (which doesn't go to the specific function help: see https://github.com/influxdata/ui/issues/4513)

**Visual Proof:**

Screen Shot 2022-04-28 at 8 20 43 AM

Screen Shot 2022-04-28 at 8 30 44 AM

## About your environment

**Environment info:**
cloud2

**Config:**

na

**Logs:**

na
**Performance:**
na

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.