Skip to content

[$250] [Insights] [Release 3] Add group-by:tag #80394

Description

@neil-marcellini

Frontend Release 3: Add group-by:tag

Implement the same pattern as other group-by options (from, card, category, merchant), but without a suggested search.

  1. Add the ability to Group By Tag from Reports > Expenses (group-by:tag)

    1. Follow the pattern used for group-by:from in Top Spenders.
    2. src/CONST/index.ts - Add TAG: 'tag' to CONST.SEARCH.GROUP_BY
    3. src/languages/en.ts (and all language files) - Add [CONST.SEARCH.GROUP_BY.TAG]: 'Tag' to search.filters.groupBy
  2. Add "Tag" to Group Columns on Search Columns Page (follow the same pattern as existing group columns: FROM, CARD, WITHDRAWAL_ID, CATEGORY, MERCHANT)

    1. Define the GROUP_TAG table column constant in the TABLE_COLUMNS object - src/CONST/index.ts
    2. Add a TAG entry to GROUP_CUSTOM_COLUMNS to define which group columns are available when grouping by tag. Include tag, expenses, total - src/CONST/index.ts
    3. Add a TAG entry to GROUP_DEFAULT_COLUMNS that specifies the default columns to show when grouping by tag - src/CONST/index.ts
    4. Add a user friendly name mapping for the GROUP_TAG column - src/CONST/index.ts
    5. Handle the TAG case in getCustomColumns() to return the tag custom columns - src/libs/SearchUIUtils.ts
    6. Handle the TAG case in getCustomColumnDefault() to return the default tag columns - src/libs/SearchUIUtils.ts
    7. Add TAG mappings to both the customColumns and defaultCustomColumns objects in getColumnsToShow() - src/libs/SearchUIUtils.ts
    8. Add a conditional check in getColumnsToShow() to ensure required columns (AVATAR and GROUP_TAG) are always included when grouping by tag - src/libs/SearchUIUtils.ts
    9. Add a case for GROUP_TAG in getSearchColumnTranslationKey() that returns the tag translation key - src/libs/SearchUIUtils.ts
    10. Add GROUP_TAG to the required columns set so it cannot be hidden on the Search Columns Page - src/pages/Search/SearchColumnsPage.tsx
    11. Add a case for TAG in getTransactionGroupHeaders() that returns the appropriate column header configuration - src/components/SelectionListWithSections/SearchTableHeader.tsx
    12. Update the SearchCustomColumnIds type to include the tag custom column values - src/components/Search/types.ts
Issue OwnerCurrent Issue Owner: @suneox

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

NewFeatureSomething to build that is a new item.ReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions