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

[Console Monaco migration] Save and restore editor folds from localStorage #180215

Closed
yuliacech opened this issue Apr 5, 2024 · 4 comments
Closed
Labels
Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@yuliacech
Copy link
Contributor

When a user folds editor lines in Ace, their state is persisted in localStorage. We need to re-implement the same for monaco

Screenshot 2024-04-05 at 20 16 23
@yuliacech yuliacech added Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Apr 5, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@ElenaStoeva
Copy link
Contributor

I didn't see anything in the Monaco documentation for setting/retrieving folds and experimented with different APIs but no luck so far.

I found this issue in the Monaco repo where the author overall wants to do the same thing as we do, and the Monaco team has suggested a way for setting folds, but it doesn't use a public API so it might be unreliable. Also, they have mentioned that there's no way to obtain the folds in the editor, which is a problem for us since we need to retrieve the folds in order to store them. There is another open Monaco issue for catching a fold change event but again there is no straightforward solution and the proposed approach is pretty hacky.

With that being said, we might need to reconsider whether it is worth keeping this functionality given that it's not that important and its implementation would be very complex.

@yuliacech
Copy link
Contributor Author

Thanks a lot for researching this feature, @ElenaStoeva!
I agree with your assessment, let's confirm in the team sync today

@yuliacech
Copy link
Contributor Author

As discussed with the team, I'm closing this issue: we won't implement persisting the folded ranges in localStorage

@yuliacech yuliacech closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

No branches or pull requests

3 participants