Skip to content

[ES|QL] Adds "Prettify" button in the editor and removes the abiity to unwrap#228159

Merged
stratoula merged 18 commits intoelastic:mainfrom
stratoula:prettify-button-esql-editor
Jul 30, 2025
Merged

[ES|QL] Adds "Prettify" button in the editor and removes the abiity to unwrap#228159
stratoula merged 18 commits intoelastic:mainfrom
stratoula:prettify-button-esql-editor

Conversation

@stratoula
Copy link
Contributor

@stratoula stratoula commented Jul 16, 2025

Summary

Closes #223209

Removes the wrap button and inserts a prettify one instead. It is currently missing the icon.

image
@stratoula stratoula added release_note:enhancement Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana t// v9.2.0 backport:skip This PR does not require backporting labels Jul 25, 2025
@stratoula stratoula changed the title [ES|QL] Prettify button Jul 25, 2025
@stratoula stratoula marked this pull request as ready for review July 28, 2025 12:26
@stratoula stratoula requested review from a team as code owners July 28, 2025 12:26
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-esql (Team:ESQL)

@stratoula stratoula requested a review from machadoum July 28, 2025 12:26
Copy link
Contributor

@vadimkibana vadimkibana left a comment

Choose a reason for hiding this comment

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

Nice! Code changes LGTM.

@drewdaemon
Copy link
Contributor

"Prettify" is fun! But is "Format" easier to translate?

@stratoula
Copy link
Contributor Author

stratoula commented Jul 29, 2025

"Prettify" is fun! But is "Format" easier to translate?

Mmm I personally prefer Prettify but I am not a native speaker. @andreadelrio @florent-leborgne wdyt?

We are talking about the tooltip

@florent-leborgne
Copy link
Contributor

@stratoula No strong opinion on my end. "Prettify query" is perfectly valid and even slightly more engaging than a classic "Format query" (which would be very fine too). It's slightly harder to translate without surrounding context though, if that is a concern 😅

@drewdaemon
Copy link
Contributor

I think "Prettify" is more fun. Maybe we go with that and change it if it raises eyebrows.

@stratoula
Copy link
Contributor Author

@florent-leborgne you are right. I should have given you more context. We have this button in the editor which when the user clicks it the ES|QL query changes in order to be more readable. We add some indent, we are wrapping, we change the keywords from lowercase to uppercase etc

@florent-leborgne
Copy link
Contributor

florent-leborgne commented Jul 29, 2025

@stratoula thanks for the added details. I was just saying that translators (or the machines that translate our content 🤔) might not correctly translate "prettify" if they translate it literally because they often lack that context :D (like in french it should be translated to "formatter" anyways because the literal translation of "prettify" would make no sense 😂). So in case there is a strong concern with how this could be translated, or if we're unable to make a note for the translator, "Format" is maybe a safer option.

If not, let's keep "Prettify", because we all prefer this term :)

@stratoula
Copy link
Contributor Author

stratoula commented Jul 29, 2025

Ah I see!! It is a good point! But as Drew said let's try Prettify (super cute) and if we have concerns we can always change it

I could change the key to format to make it more clear for them

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #93 / Air-gapped environment with pre-bundled packages @ess @serverless @skipInServerlessMKI Install bundled package should install prebuilt rules from the package that comes bundled with Kibana

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/esql-utils 100 99 -1

Async chunks

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

id before after diff
esql 258.0KB 257.6KB -389.0B
securitySolution 9.8MB 9.8MB +10.0B
total -379.0B
Unknown metric groups

API count

id before after diff
@kbn/esql-utils 118 117 -1

References to deprecated APIs

id before after diff
@kbn/esql-utils 35 34 -1

History

@stratoula stratoula enabled auto-merge (squash) July 30, 2025 05:23
@stratoula stratoula merged commit 5fcbce1 into elastic:main Jul 30, 2025
12 checks passed
delanni pushed a commit to delanni/kibana that referenced this pull request Aug 5, 2025
…o unwrap (elastic#228159)

## Summary

Closes elastic#223209

Removes the wrap button and inserts a prettify one instead. It is
currently missing the icon.

<img width="288" height="158" alt="image"
src="https://github.com/user-attachments/assets/d9adbab2-abdb-4b3b-acd7-7cb3ece9aca7"
/>

---------

Co-authored-by: Vadim Kibana <82822460+vadimkibana@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:ES|QL ES|QL related features in Kibana needs_docs release_note:enhancement Team:ESQL ES|QL related features in Kibana t// v9.2.0

6 participants