kblincoe / VisualGit_SE701_2019_4

1 stars 0 forks source link

[#126] Refactored repo.ts into repository.service.ts. #207

Closed Excaleo closed 5 years ago

Excaleo commented 5 years ago

Refactor of repo.ts

This PR is the refactoring of repo.ts into a repository service that is responsible for handling repository data. Currently, the refactor is only of the service itself, and it has not been fully integrated into the view. Instead, global functions from repo.ts are used to update the view.

Closes #126.

Through this refactor, I concluded that there might be a need for some components that subscribe to a repo. e.g. The header component can subscribe to a repository, but this would probably need to be discussed.

Work done during this PR:

Some features are still incomplete, however given the size of the PR I may split it into separate issues. These include:

Tested on:

Manually testing the service

repo.ts is mainly used in the addComponent to open, clone or init repositories.

The following should work and can be manually tested by clicking the view: