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

ES|QL wrap with pipes #165598

Merged
merged 6 commits into from
Sep 6, 2023
Merged

ES|QL wrap with pipes #165598

merged 6 commits into from
Sep 6, 2023

Conversation

stratoula
Copy link
Contributor

@stratoula stratoula commented Sep 4, 2023

Summary

Atm the wrap button is not very useful on the extended mode of the ES|QL editor. We would like to give the user the ability to wrap/unwrap based on the pipes.

esql

Checklist

@stratoula stratoula added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Feature:ES|QL ES|QL related features in Kibana labels Sep 5, 2023
@stratoula stratoula marked this pull request as ready for review September 5, 2023 11:04
@stratoula stratoula requested a review from a team as a code owner September 5, 2023 11:04
@stratoula stratoula added Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.11.0 labels Sep 5, 2023
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@dej611 dej611 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code and tested locally with Safari 👍

Just curious if we could trim before break it down:
wrap_esql

const codeNoLines = pipes?.map((pipe) => {
return pipe.replaceAll('\n', '');
});
return codeNoLines.join(isWrapped ? '|' : '\n|');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it trim the text before each pipe?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done fa833c0

@stratoula stratoula changed the title Esql wrap with pipes ES|QL wrap with pipes Sep 6, 2023
@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 6, 2023

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Serverless Observability Tests / serverless common UI Data View Management "before all" hook for "Scripted fields tab is missing"
  • [job] [logs] Serverless Security Investigations Cypress Tests #1 / Timeline Templates "before each" hook for "Create template from timeline" "before each" hook for "Create template from timeline"

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
textBasedLanguages 130.3KB 130.7KB +380.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@stratoula stratoula merged commit 1b0c095 into elastic:main Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:ES|QL ES|QL related features in Kibana release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants