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

Remove unused code from CATcher #72

Open
3 tasks done
chunweii opened this issue Feb 5, 2023 · 3 comments
Open
3 tasks done

Remove unused code from CATcher #72

chunweii opened this issue Feb 5, 2023 · 3 comments
Assignees
Labels
aspect-CodeQuality p.Medium to be done when there are no other higher priority issues

Comments

@chunweii
Copy link
Contributor

chunweii commented Feb 5, 2023

Since WATcher is a fork from CATcher, there are still many instances of old and unused code from CATcher. Let's remove these codes.

  • DataService (used to access data.csv in CATcher)
  • src/app/core/services/session-fix-confirmation (component to ask user for permission to create a new repository)
  • fetchSettingsFile() and fetchDataFile() in github.service.ts
  • Creating and updating issues in issue.service.ts
  • All tests related to the above

There could be more unused code in the project. These are some that I have found

  • - Remove unused services in src/app/core/services
  • - Remove unused component from src/app/core/services/session-fix-confirmation
  • - Remove unused models in src/app/core/models
@vigneshsankariyer1234567890
Copy link
Contributor

Adding some more after my personal investigation

  • All files in src/app/core/models/conflict
  • All files in src/app/core/models/generators
  • Seems like a lot of models in src/app/core/models/github are used by unused methods in issue.service.ts
  • and many more...

Perhaps we can break up the task into sub-tasks by folders? That way the tasks are much more easier to complete, rather than having to go through all the folders within one issue. Wdyt @chunweii ?

@chunweii
Copy link
Contributor Author

Yes, we should break fix this issue in several PRs. Removing all unused code in 1 PR might be too big of a change.

@chunweii chunweii mentioned this issue Mar 29, 2023
15 tasks
@chunweii chunweii added p.Medium to be done when there are no other higher priority issues and removed priority.Low labels Apr 13, 2023
@Eclipse-Dominator Eclipse-Dominator self-assigned this Jun 23, 2023
@Eclipse-Dominator Eclipse-Dominator linked a pull request Jun 23, 2023 that will close this issue
@chia-yh
Copy link
Contributor

chia-yh commented Jul 3, 2023

I noticed profileForm in session-selection.component.ts doesn't appear to be used currently, are there any plans on utilising Profiles in WATcher in the future? There are also some methods associated with it (e.g. initProfileForm, onProfileSelect) that could be candidates for removal in the case that there are no future plans for using Profile with WATcher.

Eclipse-Dominator added a commit that referenced this issue Jul 12, 2023
As a majority of the WATcher code base is ported over from CATcher,
it includes a lot of unused code. One such area is the code related to 
creating and updating issues on GitHub. Since WATcher is mainly used
to read data from GitHub and not modify data for now. 

Let's remove code that is related to modifying or creating repos
Eclipse-Dominator added a commit that referenced this issue Jul 14, 2023
ngx-markdown is a markdown formatter/parser that was ported over from
CATcher. As WATcher does not use any form of markdown parser, this
package currently does not serve any use in WATcher.

Therefore, let's remove the unused package and the related components.
@Eclipse-Dominator Eclipse-Dominator removed their assignment Jul 15, 2023
Eclipse-Dominator added a commit that referenced this issue Jul 16, 2023
As WATcher is ported from CATcher, there are a lot of models and methods
that are not used and are unrelated to WATcher.

Let's remove most of the unused code in core/models
joyngjr added a commit to joyngjr/WATcher that referenced this issue Jul 16, 2023
…ll-button

* commit '36a0b41c369517022086d36ea6583625f4308289':
  [CATcher-org#72] Remove unused code from catcher models (CATcher-org#146)
  [CATcher-org#72] Remove package ngx-markdown (CATcher-org#145)
  Extract method from header.component into phase.service.ts (CATcher-org#162)
  [CATcher-org#72] Remove code related to creating and updating repos (CATcher-org#143)
  Autofill repository URL with Browser Cache (CATcher-org#159)
  Update PR template (CATcher-org#157)
  Update Readme (CATcher-org#158)
  Enclose PR/issues in scrollable container (CATcher-org#148)
  Show loading spinner on switch repository (CATcher-org#151)
  Add wrap for username in issues-viewer's card-view (CATcher-org#147)
  Update website title after changing repository (CATcher-org#141)
  Disable milestone filter if there are no milestones (CATcher-org#149)
  Fix pressing back to cause issues to being cleared (CATcher-org#142)
joyngjr added a commit to joyngjr/WATcher that referenced this issue Jul 18, 2023
…apping

* commit '80f84aeb6686bb9cae9e58463baf8942fc317256':
  Add reset labels feature (CATcher-org#150)
  Allow keyboard enter when changing repository (CATcher-org#177)
  Fix ng test type error (CATcher-org#175)
  Reduce code duplication in repository url suggestions (CATcher-org#170)
  Fix hover, click interaction with issue cards (CATcher-org#173)
  [CATcher-org#72] Remove unused code from catcher models (CATcher-org#146)
  [CATcher-org#72] Remove package ngx-markdown (CATcher-org#145)
  Extract method from header.component into phase.service.ts (CATcher-org#162)
  [CATcher-org#72] Remove code related to creating and updating repos (CATcher-org#143)
  Autofill repository URL with Browser Cache (CATcher-org#159)
  Update PR template (CATcher-org#157)
  Update Readme (CATcher-org#158)
  Enclose PR/issues in scrollable container (CATcher-org#148)
  Show loading spinner on switch repository (CATcher-org#151)
  Add wrap for username in issues-viewer's card-view (CATcher-org#147)
  Update website title after changing repository (CATcher-org#141)
  Disable milestone filter if there are no milestones (CATcher-org#149)
  Fix pressing back to cause issues to being cleared (CATcher-org#142)
joyngjr added a commit to joyngjr/WATcher that referenced this issue Jul 22, 2023
* main:
  Add reset labels feature (CATcher-org#150)
  Allow keyboard enter when changing repository (CATcher-org#177)
  Fix ng test type error (CATcher-org#175)
  Reduce code duplication in repository url suggestions (CATcher-org#170)
  Fix hover, click interaction with issue cards (CATcher-org#173)
  [CATcher-org#72] Remove unused code from catcher models (CATcher-org#146)
  [CATcher-org#72] Remove package ngx-markdown (CATcher-org#145)
  Extract method from header.component into phase.service.ts (CATcher-org#162)
  [CATcher-org#72] Remove code related to creating and updating repos (CATcher-org#143)
  Autofill repository URL with Browser Cache (CATcher-org#159)
  Update PR template (CATcher-org#157)
  Update Readme (CATcher-org#158)
  Enclose PR/issues in scrollable container (CATcher-org#148)
  Show loading spinner on switch repository (CATcher-org#151)
  Add wrap for username in issues-viewer's card-view (CATcher-org#147)
  Update website title after changing repository (CATcher-org#141)
  Disable milestone filter if there are no milestones (CATcher-org#149)
  Fix pressing back to cause issues to being cleared (CATcher-org#142)
@Arif-Khalid Arif-Khalid self-assigned this Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aspect-CodeQuality p.Medium to be done when there are no other higher priority issues
Projects
None yet
5 participants