Skip to content

Definition of categories Array is Duplicated and Loosely Defined #39

@tim-rohrer

Description

@tim-rohrer

Problems

  1. The categories array, which defines filter groups and their options, is currently duplicated in three different places within the codebase. This leads to:

    • Increased maintenance effort (changes must be made in multiple locations)
    • Higher risk of inconsistencies and bugs
    • Reduced code clarity and reusability
  2. Further, each type definition includes the primitive string[]. This is too broad, and may lead to unexpected assignments.

Proposed Solution

  • Refactor the codebase to define the categories array in a single, dedicated file (e.g., src/components/filters/filterCategories.ts) without including primitives.
  • Import and use this shared definition wherever filter categories are needed.

Benefits

  • Easier maintenance and updates
  • Consistent filter group definitions across the app
  • Improved code readability and organization

Action:
Refactor the code to centralize the categories array and to remove duplicates and primitives.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions