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
Added keyboard shortcut for displaying settings dialog. #1016
Added keyboard shortcut for displaying settings dialog. #1016
Conversation
👋🏾Thanks for opening this pull request! Please check out our contributing guidelines.👊🏾😁 |
Hey, did you test the code? Looks like you have linting issues. Also shouldn't this be only in the electron app? This shortcut should open the Chrome or Firefox browser settings in the extensions and web apps right? |
I just saw you also commented that you had similar doubts. So this should only work in the Mac electron app. For that, you'd need to update the menu.js in altair-electron with the preferences shortcut and also add an ipc event in the electron service |
So what I mean for the implementation is, In the menu.js, add a new item somewhere around here: https://github.com/imolorhe/altair/blob/staging/packages/altair-electron/src/menu.js#L53 for "Preferences..." and set an The actions for the menu items are defined here (as you can see it just sends an event to the app): https://github.com/imolorhe/altair/blob/staging/packages/altair-electron/src/window.js#L23-L42 You define the ipc channel listeners here:
|
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.
You would need to implement this on the electron app as I have described. Hopefully my description was clear and easy enough for you 🙂
Another helpful resource: https://dev.to/aurelkurtula/creating-a-text-editor-in-electron-part-3---setting-preferences-584h |
Thanks for the descriptive comments. I will look into it tonight. |
@imolorhe I have done the changes you had said and have removed the code for displaying the settings dialog on website. I was not able to run the electron app since I am quite new to electron app development. So please test the code and give feedback on how to improve the contribution. |
@imolorhe How do we launch electron app. I tried building it but its throwing error at end ? Can you clarify on how to launch the electron app. |
You need to run |
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.
Can you verify the changes before I merge them
@imolorhe Yes i will verify the changes and update in PR. |
…ub.com/MathewTheCoder/altair into altair-1006-settings-dialog-keybinding
@imolorhe I have tested the electron app and it works as expected. |
Nice! After the build passes, I'll merge. 🙂 |
Congrats on merging your first pull request! 🙌🏾🎉🎊 |
Fixes
...
Checks
npm run test-build
Changes proposed in this pull request: