-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Console] Fix an error with folds in the editor #152366
Conversation
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this @yuliacech! I tested the scenario locally and the editor works fine with the given local storage items. The only thing that I noticed is that a list of all request method options shows up. Is this behaviour expected?
Apart from this, changes look good to me. I only have one small suggestion on the test.
await PageObjects.header.waitUntilLoadingHasFinished(); | ||
await PageObjects.console.closeHelpIfExists(); | ||
const request = await PageObjects.console.getRequest(); | ||
expect(request.length).to.be.greaterThan(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be a good idea to also check if request
is equal to "GET _cat/indices"
?
Thanks a lot for the review, @ElenaStoeva! |
💚 Build Succeeded
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
## Summary Fixes elastic#151563 There is a combination of the folds in the editor (collapsed lines) and the text that can cause the editor to fail. This PR adds a try/catch clause to the editor, so that the UI can still be used. ### How to use 1. Open Kibana and in your browser's Dev Tools, delete everything from local storage. 2. Add following 2 items back to the local storage: ``` sense:folds [{"start":{"row":1,"column":1},"end":{"row":82,"column":4}}] sense:console_local_text-object_e69f508c-3342-45cf-ae7c-2753548ce8e7 {"id":"e69f508c-3342-45cf-ae7c-2753548ce8e7","createdAt":1675332935410,"updatedAt":1676630754720,"text":"GET _cat/indices"} ``` 3. Navigate to Console in Kibana, make sure the editor works. ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
Summary
Fixes #151563
There is a combination of the folds in the editor (collapsed lines) and the text that can cause the editor to fail. This PR adds a try/catch clause to the editor, so that the UI can still be used.
How to use
Checklist