Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lens] auto-formatting for formulas #153387

Closed
Tracked by #184648
drewdaemon opened this issue Mar 21, 2023 · 5 comments
Closed
Tracked by #184648

[Lens] auto-formatting for formulas #153387

drewdaemon opened this issue Mar 21, 2023 · 5 comments
Labels
enhancement New value added to drive a business result Feature:Lens 🧊 iceboxed impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:large Large Level of Effort Team:Visualizations Visualization editors, elastic-charts and infrastructure usability

Comments

@drewdaemon
Copy link
Contributor

Describe the feature:
Large formulas can become quite unwieldy and difficult to read. It would be nice if we had an automatic formatter to keep things ✨ beautiful ✨ .

cc: @P1llus

@drewdaemon drewdaemon added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. labels Mar 21, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)

@drewdaemon drewdaemon added the enhancement New value added to drive a business result label Mar 21, 2023
@dej611
Copy link
Contributor

dej611 commented Mar 21, 2023

I would vote for an on-demand auto-formatter like the one in DevTools or Vega

@timductive timductive added loe:large Large Level of Effort impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. and removed impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. labels Mar 22, 2023
@P1llus
Copy link
Member

P1llus commented Mar 23, 2023

Just some usecases for this. As we progress moving all our dashboards to Lens from other types of viz, the complexity of formulas increases.

Since formulas usually end up being a single line by default, it would be nice to indent it using some very basic rules, like @dej611 , a on-demand manual linting is just fine, if it happens to be automatic it's even better, but still optional.

A basic example could be something like newlines when using , and newline + indent for ( and )

Another option that Devtools has, is that it will slightly highlight which brackets you are in-between. When working on large formulas, it is extremely hard to find out if you are missing a closing bracket, or in which nested bracket you are currently inside.

@drewdaemon
Copy link
Contributor Author

is that it will slightly highlight which brackets you are in-between. When working on large formulas, it is extremely hard to find out if you are missing a closing bracket, or in which nested bracket you are currently inside.

I like this point a lot.

@markov00
Copy link
Member

markov00 commented Jun 3, 2024

In order to provide better transparency of priorities, issues that will not be prioritized within the next 24 months are being closed.

Tracking request in Lens general improvements ice box, solvable possibly with ESQL #184648

@markov00 markov00 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Lens 🧊 iceboxed impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:large Large Level of Effort Team:Visualizations Visualization editors, elastic-charts and infrastructure usability
Projects
None yet
Development

No branches or pull requests

6 participants