Skip to content

feat: hide activity types that don't exist in project [IN-751]#733

Merged
borfast merged 1 commit into
mainfrom
feat/IN-751-hide-activity-types-that-dont-exist-in-project
Oct 15, 2025
Merged

feat: hide activity types that don't exist in project [IN-751]#733
borfast merged 1 commit into
mainfrom
feat/IN-751-hide-activity-types-that-dont-exist-in-project

Conversation

@borfast
Copy link
Copy Markdown
Contributor

@borfast borfast commented Oct 10, 2025

In the widgets that currently support filtering by activity type (see image below for an example), we want to change the available options, so that activity types that do not exist for the displayed project are not shown as filter options.

image

This is hard-coded in the platform config files here.

We want to change this so that only activity types that exist for the given project are shown - i.e. if a project has no github issues, this activity type should not be displayed in the dropdown as a filtering option.

In this PR we:

  • create an API endpoint for the frontend to get this information;
  • the corresponding Tinybird data source that fetches the required data;
  • change the frontend so that it fetches the list of activity types to display from Tinybird (via the backend API), which filters them at the source based on the provided project and, optionally, repositories.

Since the activity types from the platforms config files are not necessary or even wanted anymore, they are also being removed.

This depends on my two other related PRs from crowd.dev to be merged and deployed first (3488 and 3489).

Jira tickets:

  • IN-511 (for adding the backend endpoint)
  • IN-751 (for modifying the frontend)

These were initially two separate PRs but to avoid some issues and make it easier to review (despite this way having more files in a single PR) I merged them into a single one, and so I'm closing #745 in favour of this one.

@borfast borfast requested a review from emlimlf October 10, 2025 13:31
@borfast borfast self-assigned this Oct 10, 2025
@borfast borfast force-pushed the feat/IN-751-hide-activity-types-that-dont-exist-in-project branch 5 times, most recently from d8cb3aa to 2de67d6 Compare October 10, 2025 13:36
@borfast borfast requested a review from gaspergrom October 10, 2025 13:37
@borfast borfast force-pushed the feat/IN-751-hide-activity-types-that-dont-exist-in-project branch from 2de67d6 to 72fe8a3 Compare October 10, 2025 13:38
const projectSlug = computed(() => project.value?.slug || '');

// Fetch activity types from Tinybird
const { data: activityTypesData } = await useFetch(() => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use useQuery from tanstack for this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to the best of my knowledge. I have 0 experience with Tanstack, so please have a look to see if there's anything done incorrectly.

@borfast borfast force-pushed the feat/IN-751-hide-activity-types-that-dont-exist-in-project branch from 72fe8a3 to 59cc5c7 Compare October 14, 2025 11:15
@borfast borfast changed the base branch from main to feat/in-511-provide-new-endpoint-with-available-activity-types October 14, 2025 11:21
@borfast borfast force-pushed the feat/IN-751-hide-activity-types-that-dont-exist-in-project branch from 59cc5c7 to 369758e Compare October 14, 2025 12:59
@borfast borfast requested a review from gaspergrom October 14, 2025 13:00
@borfast borfast force-pushed the feat/IN-751-hide-activity-types-that-dont-exist-in-project branch from 369758e to 9788948 Compare October 14, 2025 13:11
@borfast borfast force-pushed the feat/in-511-provide-new-endpoint-with-available-activity-types branch from ebf69cb to 0d69666 Compare October 14, 2025 13:11
@borfast borfast force-pushed the feat/IN-751-hide-activity-types-that-dont-exist-in-project branch from 9788948 to 3b0df28 Compare October 14, 2025 13:27
@borfast borfast changed the base branch from feat/in-511-provide-new-endpoint-with-available-activity-types to main October 14, 2025 13:35
Signed-off-by: Raúl Santos <4837+borfast@users.noreply.github.com>

feat: provide a new endpoint with available activity types

Signed-off-by: Raúl Santos <4837+borfast@users.noreply.github.com>
@borfast borfast force-pushed the feat/IN-751-hide-activity-types-that-dont-exist-in-project branch from 3b0df28 to facd854 Compare October 15, 2025 09:08
@borfast borfast merged commit 6ae302c into main Oct 15, 2025
9 checks passed
@borfast borfast deleted the feat/IN-751-hide-activity-types-that-dont-exist-in-project branch October 15, 2025 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants