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

factor out listeners in electron.js to separate files #104

Open
juancarlosfarah opened this issue Jun 17, 2019 · 5 comments
Open

factor out listeners in electron.js to separate files #104

juancarlosfarah opened this issue Jun 17, 2019 · 5 comments
Assignees
Labels
good first issue Good for newcomers refactor Refactor

Comments

@juancarlosfarah
Copy link
Member

juancarlosfarah commented Jun 17, 2019

Each listener should have its own file in app/listeners which is exported out through app/listeners/index.js and imported in app/electron.js. Each listener should be a thunk, accepting arguments such as mainWindow and db and returning the listening function.

@juancarlosfarah juancarlosfarah added good first issue Good for newcomers refactor Refactor labels Jun 17, 2019
@juancarlosfarah juancarlosfarah self-assigned this Jun 17, 2019
@fboechats
Copy link
Contributor

Is it already done or can I help??

@juancarlosfarah
Copy link
Member Author

@fboechats, I have started the process and factored out saveSpace and loadSpace in commit 442755b as an example. If you're interested in helping out. Let me know!

@fboechats
Copy link
Contributor

I see. Yes I'm interested in helping.

@juancarlosfarah
Copy link
Member Author

@fboechats, thanks for your interest! If you want to go ahead and fork the repository, create a feature branch on your forked repository, make the proposed refactor and then send a pull request to our master branch, that would be great. One commit / PR per listener, please.

As mentioned in the README, for commits we follow the standards put forth by Conventional Commits.

<type>[optional scope]: <description>

[optional body]

[optional footer]

Example:

refactor: factor out saveSpace listener

Factor out the saveSpace listener to its own file.

refs #104

FYI, for this repository, we follow the GitHubFlow and for external collaborators, that would mean to follow the GitHub fork workflow. If this is new to you, I recommend you read the info on those links.

@fboechats
Copy link
Contributor

Sure, I will do that and work on getting more listeners separated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers refactor Refactor
Projects
None yet
Development

No branches or pull requests

2 participants