Skip to content

[Web]-Refactor: Update styling for task filters and date range components #3964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2025

Conversation

NdekoCode
Copy link
Collaborator

@NdekoCode NdekoCode commented Jul 28, 2025

Update styling for task filters and date range components

  • Adjusted class names in TaskFilter and TaskStatusFilter components for improved layout and consistency.
  • Modified height properties for dropdowns and date picker to enhance visual alignment.
  • Ensured proper spacing and margins for better user experience across task filtering UI.

How to Test This PR

screenshot-localhost-3030-2025-07-28-21-06-13
  1. Run the app with yarn web:dev
  2. Open the browser at http://localhost:3030/profile/[memberId]
  3. Click on the filter and search Button

Screenshots (if needed)

Previous screenshots

Screenshot 2025-07-28 at 21 07 35 Screenshot 2025-07-28 at 21 07 24

Current screenshots

screenshot-localhost-3030-2025-07-28-21-07-50 screenshot-localhost-3030-2025-07-28-21-08-11

Related Issues

Please list related issues, tasks or discussions:

Example:

  • Closes #12343434344
  • Related to #567834232

Type of Change

  • Bug fix (fixes a problem)
  • New feature (adds functionality)
  • Breaking change (requires changes elsewhere)
  • Documentation update

✅ Checklist

Please confirm you did the following before asking for review:

  • My code follows the project coding style
  • I reviewed my own code and added comments where needed
  • I tested my changes locally
  • I updated or created related documentation if needed
  • No new warnings or errors are introduced

Summary by CodeRabbit

  • Style

    • Improved consistency in sizing, spacing, and theming of task filter UI elements for a more polished appearance across light and dark modes.
  • New Features

    • Added support for custom content styling in the date range picker component.

- Adjusted class names in TaskFilter and TaskStatusFilter components for improved layout and consistency.
- Modified height properties for dropdowns and date picker to enhance visual alignment.
- Ensured proper spacing and margins for better user experience across task filtering UI.
Copy link
Contributor

coderabbitai bot commented Jul 28, 2025

Walkthrough

This change refines the visual styling and layout of task filter UI components, including dropdowns and a date range picker, by adding and adjusting CSS classes for spacing, height, and theming. Additionally, the date picker component interface is extended to accept a new contentClassName prop for further styling control.

Changes

Cohort / File(s) Change Summary
Task Filter UI Styling
apps/web/core/components/pages/profile/task-filters.tsx
Adjusts margins, heights, and theme classes for filter panel, dropdowns, and date picker to unify appearance and spacing.
Date Picker Interface & Styling
apps/web/core/components/tasks/task-date-range.tsx
Adds contentClassName prop to interface and component; updates button height and applies the new class for flexible styling.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TaskFilters
    participant TaskStatusFilter
    participant TaskDatePickerWithRange

    User->>TaskFilters: Render Task Filters
    TaskFilters->>TaskStatusFilter: Render Status & Property Dropdowns
    TaskFilters->>TaskDatePickerWithRange: Render Date Range Picker (with contentClassName)
    TaskDatePickerWithRange-->>TaskFilters: Rendered with custom classes
    TaskStatusFilter-->>TaskFilters: Rendered with unified styling
    TaskFilters-->>User: Display updated, consistently styled filters
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Possibly related PRs

Suggested labels

WEB

Suggested reviewers

  • evereq

Poem

In the garden of code, where filters bloom bright,
We trimmed every margin and set heights just right.
Dropdowns now sparkle, the date picker’s in line—
With a hop and a skip, the UI looks fine!
🐇✨

CSS in our hats, and carrots for snacks,
Review these changes—no logic to track!

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-filter-ui-issues-on-profile-page

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

⚠️ Unused code detected in the following changed files:

  • apps/web/core/components/pages/profile/task-filters.tsx

Please review these files and clean up the unused code.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR refactors the styling of task filter components on the profile page to improve visual consistency and alignment. The changes focus on two main files:

task-date-range.tsx: Adds a new optional contentClassName prop to the TaskDatePickerWithRange component interface, allowing external components to override the button styling. The default button height is also reduced from h-9 to h-8 to better align with other filter components.

task-filters.tsx: Implements comprehensive styling improvements including:

  • Standardizing all filter dropdown components to use h-7 height for consistent visual alignment
  • Setting the filter container height to h-9 to accommodate the standardized dropdowns
  • Adding mt-5 top margin to the filter transition container for better spacing
  • Enhancing the TaskLabelsDropdown with improved dark theme support and rounded borders
  • Using responsive margin classes (lg:mb-0) for better cross-device compatibility

These changes address UI inconsistencies visible in the provided before/after screenshots, where filter dropdowns previously had misaligned heights and inconsistent spacing. The refactor creates a more polished and uniform filter interface while maintaining all existing functionality. The implementation leverages Tailwind CSS utility classes and follows the existing component architecture patterns used throughout the codebase.

Confidence score: 4/5

• This PR is safe to merge as it only contains CSS styling improvements without functional changes
• The score reflects that while the changes are low-risk, comprehensive UI testing across different screen sizes and themes would be beneficial
• The task-filters.tsx file needs attention to ensure all responsive breakpoints work correctly

2 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🔭 Outside diff range comments (1)
apps/web/core/components/pages/profile/task-filters.tsx (1)

1-1: Address the pipeline failure for unused code.

The GitHub Actions pipeline detected unused code in this file. Please identify and remove any unused imports, variables, or code to resolve the CI check failure.

#!/bin/bash
# Description: Identify unused imports and code in the task-filters.tsx file

# Use rg to find all imports in the file
echo "=== All imports in the file ==="
rg "^import.*from" apps/web/core/components/pages/profile/task-filters.tsx

# Check for unused imports by searching for usage of each imported item
echo -e "\n=== Checking usage of imports ==="
rg "import.*\{([^}]+)\}" apps/web/core/components/pages/profile/task-filters.tsx | while read -r line; do
    # Extract imported items
    items=$(echo "$line" | sed -n 's/.*{\([^}]*\)}.*/\1/p' | tr ',' '\n' | sed 's/^[[:space:]]*//' | sed 's/[[:space:]]*$//')
    echo "$items" | while read -r item; do
        if [ -n "$item" ]; then
            echo "Checking usage of: $item"
            if ! rg -q "\b$item\b" apps/web/core/components/pages/profile/task-filters.tsx --context=0 | grep -v "^import"; then
                echo "  -> Potentially unused: $item"
            fi
        fi
    done
done
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 161d5a2 and 1da630c.

📒 Files selected for processing (2)
  • apps/web/core/components/pages/profile/task-filters.tsx (3 hunks)
  • apps/web/core/components/tasks/task-date-range.tsx (2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: NdekoCode
PR: ever-co/ever-teams#3962
File: apps/web/core/hooks/tasks/use-task-statistics.ts:180-184
Timestamp: 2025-07-28T13:57:33.553Z
Learning: The progress bar color logic enhancement and task estimation handling improvements in PR #3962 were implemented only for the web part of the application, not the mobile part.
Learnt from: Innocent-Akim
PR: ever-co/ever-teams#3208
File: apps/web/app/[locale]/timesheet/components/FrequencySelect.tsx:67-79
Timestamp: 2024-10-30T16:25:19.910Z
Learning: The date range selection functionality for the date range options in the `FilterTaskActionMenu` component will be implemented in a future PR.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:35.107Z
Learning: In `apps/web/components/ui/sidebar.tsx`, keyboard shortcut accessibility has already been reviewed and approved by shadcn-ui; further suggestions in this area are unnecessary.
Learnt from: CREDO23
PR: ever-co/ever-teams#3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In `apps/web/lib/features/task/task-input.tsx`, prefer using `useRef` over `useState` for `assignees` in the `AssigneesSelect` component to prevent re-renders on change.
Learnt from: CREDO23
PR: ever-co/ever-teams#3360
File: apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx:346-354
Timestamp: 2024-11-25T18:49:15.126Z
Learning: In `apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx`, within the `ProjectDropDown` component, both parent and child state should be synchronized for better UI updates, even in controlled mode. The `onChange` function carries the parent state, and `setSelected` maintains the selected state in the child component.
Learnt from: CREDO23
PR: ever-co/ever-teams#3626
File: apps/web/app/[locale]/projects/components/page-component.tsx:119-119
Timestamp: 2025-02-28T09:17:46.802Z
Learning: In the projects page component, filtering of projects based on the active team has been moved out of the useEffect hook that fetches organization projects, and is now handled in the pagination logic instead.
Learnt from: Innocent-Akim
PR: ever-co/ever-teams#3208
File: apps/web/app/[locale]/timesheet/components/TimesheetFilter.tsx:30-35
Timestamp: 2024-10-30T16:31:01.294Z
Learning: In the `TimesheetFilter` component, the `Add Time` button does not need to use the `AddManualTimeModal` component, as per the user's decision.
apps/web/core/components/tasks/task-date-range.tsx (6)

Learnt from: Innocent-Akim
PR: #3208
File: apps/web/app/[locale]/timesheet/components/FrequencySelect.tsx:67-79
Timestamp: 2024-10-30T16:25:19.910Z
Learning: The date range selection functionality for the date range options in the FilterTaskActionMenu component will be implemented in a future PR.

Learnt from: CREDO23
PR: #3360
File: apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx:346-354
Timestamp: 2024-11-25T18:49:15.126Z
Learning: In apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx, within the ProjectDropDown component, both parent and child state should be synchronized for better UI updates, even in controlled mode. The onChange function carries the parent state, and setSelected maintains the selected state in the child component.

Learnt from: CREDO23
PR: #3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In apps/web/lib/features/task/task-input.tsx, prefer using useRef over useState for assignees in the AssigneesSelect component to prevent re-renders on change.

Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In apps/web/components/ui/sidebar.tsx, modifications to the keyboard shortcut implementation within React.useEffect can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.

Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:35.107Z
Learning: In apps/web/components/ui/sidebar.tsx, keyboard shortcut accessibility has already been reviewed and approved by shadcn-ui; further suggestions in this area are unnecessary.

Learnt from: NdekoCode
PR: #3199
File: apps/web/components/nav-main.tsx:74-90
Timestamp: 2024-10-28T17:28:53.268Z
Learning: In apps/web/components/nav-main.tsx, prefer to keep className styles inline instead of extracting repeated logic into shared classes.

apps/web/core/components/pages/profile/task-filters.tsx (11)

Learnt from: CREDO23
PR: #3360
File: apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx:346-354
Timestamp: 2024-11-25T18:49:15.126Z
Learning: In apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx, within the ProjectDropDown component, both parent and child state should be synchronized for better UI updates, even in controlled mode. The onChange function carries the parent state, and setSelected maintains the selected state in the child component.

Learnt from: Innocent-Akim
PR: #3208
File: apps/web/app/[locale]/timesheet/components/FrequencySelect.tsx:67-79
Timestamp: 2024-10-30T16:25:19.910Z
Learning: The date range selection functionality for the date range options in the FilterTaskActionMenu component will be implemented in a future PR.

Learnt from: CREDO23
PR: #3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In apps/web/lib/features/task/task-input.tsx, prefer using useRef over useState for assignees in the AssigneesSelect component to prevent re-renders on change.

Learnt from: CREDO23
PR: #3626
File: apps/web/app/[locale]/projects/components/page-component.tsx:119-119
Timestamp: 2025-02-28T09:17:46.802Z
Learning: In the projects page component, filtering of projects based on the active team has been moved out of the useEffect hook that fetches organization projects, and is now handled in the pagination logic instead.

Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In apps/web/components/ui/sidebar.tsx, modifications to the keyboard shortcut implementation within React.useEffect can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.

Learnt from: NdekoCode
PR: #3234
File: apps/web/components/pages/team/tasks/TaskTable.tsx:9-13
Timestamp: 2024-11-06T17:10:06.239Z
Learning: In the TaskTable component (apps/web/components/pages/team/tasks/TaskTable.tsx), we do not need to add error handling for task fetching when using useTeamTasks().

Learnt from: NdekoCode
PR: #3328
File: apps/web/lib/features/team/user-team-card/user-team-card-activity.tsx:66-78
Timestamp: 2024-11-13T05:17:33.527Z
Learning: In the UserTeamActivity component (apps/web/lib/features/team/user-team-card/user-team-card-activity.tsx), the overflow-hidden class is intentionally applied only to the first Tab.Panel because the hidden overflow is needed when the sub-component has not yet been made visible. Applying overflow-hidden to the other Tab.Panel components is not required.

Learnt from: CREDO23
PR: #3353
File: apps/web/components/pages/kanban/menu-kanban-card.tsx:85-85
Timestamp: 2024-11-20T19:57:48.324Z
Learning: We are gradually migrating from 'taskName' to 'title' as we make changes to the remaining files.

Learnt from: Innocent-Akim
PR: #3208
File: apps/web/app/[locale]/timesheet/components/TimesheetFilter.tsx:30-35
Timestamp: 2024-10-30T16:31:01.294Z
Learning: In the TimesheetFilter component, the Add Time button does not need to use the AddManualTimeModal component, as per the user's decision.

Learnt from: NdekoCode
PR: #3199
File: apps/web/app/stores/team-tasks.ts:39-40
Timestamp: 2024-10-28T17:23:01.110Z
Learning: The favoriteTasksAtom in apps/web/app/stores/team-tasks.ts is important for future implementations and should not be removed, even if it appears unused currently.

Learnt from: NdekoCode
PR: #3199
File: apps/web/components/nav-main.tsx:74-90
Timestamp: 2024-10-28T17:28:53.268Z
Learning: In apps/web/components/nav-main.tsx, prefer to keep className styles inline instead of extracting repeated logic into shared classes.

🧬 Code Graph Analysis (1)
apps/web/core/components/pages/profile/task-filters.tsx (2)
apps/web/core/components/tasks/task-status.tsx (3)
  • TaskStatusDropdown (35-73)
  • TaskPropertiesDropdown (292-329)
  • TaskLabelsDropdown (406-457)
apps/web/core/components/tasks/task-sizes-dropdown.tsx (1)
  • TaskSizesDropdown (12-50)
🪛 GitHub Actions: Knip Review - Cleanup Unused Code - WEB
apps/web/core/components/pages/profile/task-filters.tsx

[error] 1-1: Unused code detected in this file. Please remove unused code to pass the CI check.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: deploy
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (7)
apps/web/core/components/tasks/task-date-range.tsx (3)

19-19: LGTM! New prop enhances styling flexibility.

The addition of the optional contentClassName prop provides consumers with the ability to customize button styling, which aligns well with the component's design pattern.


21-28: LGTM! Parameter destructuring updated correctly.

The component's parameter destructuring has been properly updated to include the new contentClassName prop, maintaining consistency with the interface changes.


51-54: LGTM! Height adjustment and conditional styling applied correctly.

The height change from h-9 to h-8 and the conditional application of contentClassName improve visual consistency across the task filter components. The cn utility properly handles the conditional class application.

apps/web/core/components/pages/profile/task-filters.tsx (4)

65-65: LGTM! Consistent spacing added to filter panel.

The addition of mt-5 to the Transition wrapper improves the visual spacing of the filter panel, enhancing the overall layout consistency.


222-222: LGTM! Consistent height and margin applied to dropdown container.

The addition of mb-2 and h-9 to the dropdown container provides consistent spacing and height for the filter elements.


226-226: LGTM! Uniform height and margin classes applied consistently.

The consistent application of h-7 height and responsive margin classes (mt-4 mb-2 lg:mb-0 lg:mt-0) across all dropdown components (TaskStatusDropdown, TaskPropertiesDropdown, TaskSizesDropdown) creates a unified visual appearance.

Also applies to: 234-234, 242-242


262-264: LGTM! Proper usage of new contentClassName prop.

The TaskDatePickerWithRange component correctly utilizes the new contentClassName prop to maintain height consistency (h-7) with other filter components, demonstrating good coordination between the two files.

@evereq evereq merged commit 63f59ef into develop Jul 29, 2025
14 of 16 checks passed
@evereq evereq deleted the fix-filter-ui-issues-on-profile-page branch July 29, 2025 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants