grafana / k6-studio

Desktop application for Mac and Windows (Linux coming soon) designed to help you generate k6 test scripts
GNU Affero General Public License v3.0
140 stars 1 forks source link

feat: word-wrap editor #355

Closed cristianoventura closed 1 week ago

cristianoventura commented 1 week ago

Description

This PR enables word-wrap for the Monaco editor in Script Preview and the Content tab of a response. The state for both are persisted individually in the settings file.

How to Test

Checklist

Screenshots (if appropriate):

https://github.com/user-attachments/assets/3b93ffa2-ed78-458d-9ae9-108ab4c01f58

Related PR(s)/Issue(s)

Resolves https://github.com/grafana/k6-studio/issues/237

cristianoventura commented 1 week ago

I've moved the word wrap switch to an IconButton aligned at the end of the toolbar.

image

@e-fisher I noticed that this only happens for JSON >= than 10000 characters. It could be related to internal performance and how Monaco handles it. I'm still trying to figure out how to solve this issue.