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

Clean up code #13

Open
IlIllII opened this issue Oct 12, 2021 · 0 comments
Open

Clean up code #13

IlIllII opened this issue Oct 12, 2021 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@IlIllII
Copy link
Owner

IlIllII commented Oct 12, 2021

I hacked this project together really quickly and so it is kind of messy.

An improvement would be to refactor the code. Many of the Vue components are mammoths containing multiple things, such as a header, body content, and a footer. We could extract these pieces of code and put them into modular components where possible. This would make the code both more readable and more reusable.

Additionally, I have a lot of methods registered in some components. These walls of code make the component hard to understand. It would benefit from being extracted to a separate file and imported rather than being written in the component itself.

If you wanted to do this, be sure you write good docstrings for the functions so the import makes sense to others; I have written very few comments so far.

Where to start

A good starting point would be extracting the legend. Currently the code for the legend is in the DegreeMap component. We could extract this to its own component and then register this component in the DegreeMap.

@IlIllII IlIllII added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant