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

Refactor code structure in app.js #1859

Open
jotaen4tinypilot opened this issue Dec 5, 2024 · 0 comments
Open

Refactor code structure in app.js #1859

jotaen4tinypilot opened this issue Dec 5, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jotaen4tinypilot
Copy link
Contributor

Our app.js file has grown quite a bit over time, and I think the internal code structure has become continuously harder to work with. For example:

  • The high-level structure could be clearer and more expressive: in which order do we do things? Can we e.g. group things better, so that it’s clear what belongs together and what doesn’t?
  • We have some redundancies, especially around looking up elements by id (getElementById). For our web components, we usually do this look up once, and then share it via a this._elements field.
  • There are some function definitions in the first half of the file. Would we be able to split them out into one or more separate files, to make the file more concise overall?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant