Skip to content

Refactor code structure in app.js #1859

@jotaen4tinypilot

Description

@jotaen4tinypilot

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions