Skip to content

Refactor IssueTablesComponent #1315

Open
@yucongkoo

Description

@yucongkoo

While implementing the new UI for bug reporting phase in #1312, I noticed some places that I could be further improved in terms of code quality, mainly the following 2 aspects:

  • Duplication of code between deleteIssue and undeleteIssue, they are essentially performing the same actions, but in reverse directions, hence the code is highly duplicated.
  • There are 2 separate lists issuesPendingDeletion and issuesPendingRestore, which is used for displaying the loading icon (instead of the delete/restore icon), we can actually merge these 2 lists into a single list (maybe issuesPendingAction?) instead and display the loading icon (and hide the delete/restore icon) based on this list
  • There is a lot of conditional logic in the issue-tables.component.html file, we should probably move these logic into the issue-tables.component.ts file instead. See the *ngIf=...
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions