kblincoe / VisualGit_SE701_2019_4

1 stars 0 forks source link

refactor diff panel UI logic from file service into diff component #248

Closed WanniCode closed 5 years ago

WanniCode commented 5 years ago

Resolves issue #230.

Note that:

Testing:

  1. Start the application
  2. Continue without signing in (or sign in - this should not matter since we're just opening a local repository)
  3. select a local repository
  4. select any files that have changes from the file panel (on the left)
  5. the diff panel should show green/red line changes as normal
  6. editing should work

Note that step 3. can be replaced by any method of opening a repository (so it could also be cloned from a remote repository on GitHub first).

Essentially, for formality, regression tests would have to be done in order to verify the refactoring did not break the application in any way (relative to how it was before the refactor). At the code level (at the time of this PR), this means that non-breaking behavior should be observed from file.service.ts, file.panel.component.ts, diff.panel.component.ts, and diff-service.ts. The link between the file onClick() handler in file.component.ts and updating the diff panel component should still work.

henryli333 commented 5 years ago

Can you also fix the missing function issue in header component? Relates to #242

WanniCode commented 5 years ago

made the changes suggested above. please check again :)

WanniCode commented 5 years ago

Can you also fix the missing function issue in header component? Relates to #242

this is gonna be fixed in a separate PR