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

Establish pattern for splitting Engine.ts file #12184

Open
9 tasks
Cal-L opened this issue Nov 5, 2024 · 0 comments · May be fixed by #12366
Open
9 tasks

Establish pattern for splitting Engine.ts file #12184

Cal-L opened this issue Nov 5, 2024 · 0 comments · May be fixed by #12366
Assignees

Comments

@Cal-L
Copy link
Contributor

Cal-L commented Nov 5, 2024

What is this about?

The Engine.ts file is a large ~2500 LOC file that holds the logic for controller initialization and is used in many places in the app. The goal here is to establish a pattern for splitting out the file so that it is:

  • Easier to manage
  • Better testability
  • Reduce non-relevant codeowner reviews (saves time on PRs)
  • More scalable solution

Scenario

No response

Design

No response

Technical Details

  • Since controllers tend to be dependent on one another, the imports from abstracted files can be functions that take dependent controllers as args to ensure initialization order is respected. For example, if TokenListController is dependent on NetworkController, the abstracted TokenListController file could look like initializeTokenListController(networkController: NetworkController)

Threat Modeling Framework

No response

Acceptance Criteria

  • App behavior should remain the same
  • Abstract at least one area as POV that can be applied to other pieces later on

Stakeholder review needed before the work gets merged

  • Engineering (needed in most cases)
  • Design
  • Product
  • QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
  • Security
  • Legal
  • Marketing
  • Management (please specify)
  • Other (please specify)

References

@Cal-L Cal-L self-assigned this Nov 5, 2024
@Cal-L Cal-L linked a pull request Nov 21, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant