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

Handle ctrl+S in monaco editor #1033

Closed
kirjs opened this issue Sep 7, 2019 · 6 comments
Closed

Handle ctrl+S in monaco editor #1033

kirjs opened this issue Sep 7, 2019 · 6 comments
Assignees

Comments

@kirjs
Copy link
Collaborator

@kirjs kirjs commented Sep 7, 2019

While we run the code on every keystroke, lot of user still hit ctrl+S by instinct and get a file save dialog.

We should prevent the dialog from showing, and maybe show some little animation saying everything is saved (so that the user feels nice)

@kirjs

This comment has been minimized.

Copy link
Collaborator Author

@kirjs kirjs commented Sep 7, 2019

@jatinAroraGit

This comment has been minimized.

Copy link

@jatinAroraGit jatinAroraGit commented Sep 27, 2019

Hey there,
I would like to work on this.

@NothingEverHappens

This comment has been minimized.

Copy link
Collaborator

@NothingEverHappens NothingEverHappens commented Sep 28, 2019

Hey @jatinAroraGit that's awesome, I'm not exactly sure what would be the best way to handle this.

The global configuration is here:

MonacoConfigService.configureMonaco();

The actual editor instantiation happens here:

return this.monacoConfigService.monaco.editor.create(el, {

Feel free to ping this thread if you're stuck at any point or with any other questions

@jatinAroraGit

This comment has been minimized.

Copy link

@jatinAroraGit jatinAroraGit commented Oct 5, 2019

Hey @NothingEverHappens,
So I have figured out most of it and have stopped popping of Save Window. Currently nothing is being displayed on pressing Ctrl+S, Do you want me to implement something to show ctrl+s doing something (like one of those alert boxes with message 'Saved' ) or leave it as it is ?

@kirjs

This comment has been minimized.

Copy link
Collaborator Author

@kirjs kirjs commented Oct 6, 2019

How about if anything was changed, we can show a snack bar saying everything was saved successfully?

https://material.angular.io/components/snack-bar/overview

@jatinAroraGit

This comment has been minimized.

Copy link

@jatinAroraGit jatinAroraGit commented Oct 6, 2019

Sounds good, @kirjs .

@kirjs kirjs closed this in 3afd8e0 Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.