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
Keybindings editor should emit change events on changes #142020
Comments
I think this might require a change in the way the keybindings editor works: i.e. if a change is made, issue a change event, independent from the underlying file itself. I think the settings editor does the same. |
@alexdima we might need a way to refresh keybindings model |
After a bit of discussion with Sandeep, we came to the conclusion that a change from me probably is the underlying reason for the recent flakiness in the test. Specifically, file watching is more delayed on startup ever since it moved to the shared process and if a component or test relies on file events alone, there is a higher chance of failure. I have opened #142027 for me to revisit this and I can bring back this test in its old form when that happened. Nevertheless: I believe that we should never use file events as the only source of truth for changes when changes are made from within VSCode. File events are meant to detect changes from outside VSCode or an external program, not when changes are made within VSCode. As indicated, the keybindings editor should follow a similar strategy as the UI settings editor and update the keybindings settings file through some kind of higher level service that also sends out change events. |
This sounds reasonable. But since we always use Also, there are cases when users edit |
Yeah, we already have the infrastructure for events like that called You could then globally listen on that event as well as the file events to ensure you get hold of any updates.
That is fine. Somewhere in the keybindings model code you already listen to file change events and now all you have to add is the additional listener for |
I pushed a change to have a |
👏 |
Update
This was originally a test failure, but my suggestion in the end would be to come up with a solution that lets the keybindings editor emit change events when they occur via the keybindings editor.
Original:
https://dev.azure.com/monacotools/Monaco/_build/results?buildId=153487&view=logs&j=672276a2-8d3a-5fab-615d-090c51352f92&t=0699ae84-7245-5a45-5eee-80b086af2725&l=101
This test suffers from the same "relies on file changes events" issue.
The text was updated successfully, but these errors were encountered: