Skip to content

Conversation

@ParasKhandelwal1616
Copy link
Contributor

PR: Display Task Completion Metrics in Filter Dropdowns

1. Description

This PR implements a feature to display task completion percentages directly within the filter dropdowns (Project and Tag).

2. Motivation & Context

The Problem: Previously, users could only see the name of a filter, lacking immediate insight into task progress within that filter. This made it difficult to quickly gauge completion status without navigating into each filter.

3. Changes Implemented

This change enhances the filter dropdowns by showing the number of completed tasks and their percentage alongside the filter name. The stats update dynamically.

Visual Examples:

  • Project: Website Redesign (3/10 tasks completed, 30%)
  • Tag: Urgent (5/8 tasks completed, 62%)

4. User Impact

  • Efficiency: Allows users to track task completion more efficiently.
  • UX: Makes the UI more informative.
  • Convenience: Reduces the need for extra clicks to view progress.

5. Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (code change that neither fixes a bug nor adds a feature)

@github-actions
Copy link

Thank you for opening this PR!

Before a maintainer takes a look, it would be really helpful if you could walk through your changes using GitHub's review tools.

Please take a moment to:

  • Check the "Files changed" tab
  • Leave comments on any lines for functions, comments, etc. that are important, non-obvious, or may need attention
  • Clarify decisions you made or areas you might be unsure about and/or any future updates being considered.
  • Finally, submit all the comments!

More information on how to conduct a self review:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request

This helps make the review process smoother and gives us a clearer understanding of your thought process.

Once you've added your self-review, we'll continue from our side. Thank you!

@its-me-abhishek
Copy link
Collaborator

@ParasKhandelwal1616 please run npx prettier --write . in frontend directory to fix the prettier issues


export interface BottomBarProps {
projects: string[];
projects: string[] | { label: string; value: string }[];
Copy link
Collaborator

Choose a reason for hiding this comment

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

value as a prop is a bit vague, needs to be renamed

setIsLoading: (val: boolean) => void;
}
) => {
interface Option {
Copy link
Collaborator

Choose a reason for hiding this comment

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

all interfaces shall be moved to types.ts

Copy link
Collaborator

Choose a reason for hiding this comment

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

and Option seems to be vague as well. please use better variable names

.sort((a, b) => (a > b ? 1 : -1));
setUniqueProjects(filteredProjects);

const projectOptions = filteredProjects.map((project) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this filtering should be a single function perhaps. easy to test and fix if and when it breaks

Copy link
Collaborator

@its-me-abhishek its-me-abhishek left a comment

Choose a reason for hiding this comment

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

Please fix and also add some screenshots/videos to the PR description, for the changes

@its-me-abhishek
Copy link
Collaborator

Please rename the PR title as well, and follow the commit conventions as set in CONTRIBUTING.MD while naming PRs and commits. That really helps in keeping the merge history clean.

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