-
Notifications
You must be signed in to change notification settings - Fork 113
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
Application refactor #591
Application refactor #591
Conversation
✔️ No visual differences introduced by this PR. View Playwright Report (note: open the "playwright-report" artifact) |
Something this change makes more obvious is situations where there are implicit dependencies that are easy to miss stubbing for tests. For example, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I sort of feel like "application" (or "yomitan" previously) is not really a valid unit of abstraction / grouping, it should probably be split up a bit differently. But this is just a hot take, haven't really thought about if there is some salient division of stuff in there, or a less-generic sounding category name.
(Merge conflict) |
I didn't name it "Extension" because that is somewhat ambiguous with the overall concept of a "web extension". I went with "application" instead because it's generic and the goal of the class is that it hosts generic components of the class that contain state and are shared around the different parts of the codebase. It kind of serves as an initialization point and an easier way to group a few communication types together (the API stuff). You're right that it's not a perfect abstraction, and this is reflected by some places being passed The biggest previous design issue that I am trying to address with this is the idea that "yomitan" is not initialized as part of the |
451829b
to
63d02ed
Compare
I mentioned that I was wanting to do this in a comment somewhere, but this change makes the initialization process a bit less spaghetti.
yomitan
is no longer a global, and instead anApplication
instance is passed around to the components that need it.