Skip to content

Saved views#880

Merged
gaspergrom merged 2 commits intofeature/filtersfrom
feature/saved-views
May 18, 2023
Merged

Saved views#880
gaspergrom merged 2 commits intofeature/filtersfrom
feature/saved-views

Conversation

@gaspergrom
Copy link
Copy Markdown
Contributor

@gaspergrom gaspergrom commented May 17, 2023

Changes proposed ✍️

What

🤖 Generated by Copilot at 7472c8c

This pull request refactors the member filter configurations by using shared helper functions and types from a common module, reducing code duplication and improving consistency. It also adds a new module for the member saved views configuration, which defines a list of hardcoded views and their settings, using enums and a common filter renderer.

🤖 Generated by Copilot at 7472c8c

We're sailing on the code sea, with filters galore
We're using shared modules, to make them less of a chore
We're reusing types and functions, to keep them consistent
We're heaving away on the count of three, to make them more efficient

Why

How

🤖 Generated by Copilot at 7472c8c

  • Refactor the item label and api filter renderers for different filter types to use generic helper functions imported from a shared module (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Add a new module frontend/src/modules/member/config/saved-views/main.ts that exports the member saved views configuration and a list of hardcoded views (link)
  • Add new modules for each saved view, such as frontend/src/modules/member/config/saved-views/views/all-members.ts and frontend/src/modules/member/config/saved-views/views/influential.ts, that define the settings and filters for the view (link, link)
  • Add new modules for each saved view setting, such as frontend/src/modules/member/config/saved-views/settings/bot.ts and frontend/src/modules/member/config/saved-views/settings/organization.ts, that define the enum type and the api filter renderer for the setting (link, link)
  • Add a common helper function to render the api filter for the include/exclude/filter settings in frontend/src/modules/member/config/saved-views/settings/common/includeFilterRenderer.ts (link)
  • Add a new module that defines the enum type for the include/exclude/filter values in frontend/src/modules/member/config/saved-views/settings/types/IncludeEnum.ts (link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@gaspergrom gaspergrom added the Feature Created by Linear-GitHub Sync label May 17, 2023
@gaspergrom gaspergrom requested a review from joanagmaia May 17, 2023 19:35
@gaspergrom gaspergrom self-assigned this May 17, 2023
@gaspergrom gaspergrom changed the base branch from main to feature/filters May 17, 2023 19:37
@gaspergrom gaspergrom merged commit ba833c4 into feature/filters May 18, 2023
@gaspergrom gaspergrom deleted the feature/saved-views branch May 18, 2023 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Created by Linear-GitHub Sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants