Skip to content

[WEB-4365]fix: dates display properties toggle#7262

Merged
sriramveeraghanta merged 1 commit intopreviewfrom
fix-merged_date_display
Jun 30, 2025
Merged

[WEB-4365]fix: dates display properties toggle#7262
sriramveeraghanta merged 1 commit intopreviewfrom
fix-merged_date_display

Conversation

@vamsikrishnamathala
Copy link
Member

@vamsikrishnamathala vamsikrishnamathala commented Jun 24, 2025

Description

This update fixes the date display visibility when one of the dates (Due date / Start date) is enabled in work item layouts.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Summary by CodeRabbit

  • New Features
    • Improved date selection for issues: now displays either a combined date range picker or separate start and due date pickers based on available data and settings.
    • Enhanced visual cues: due dates are highlighted when attention is needed.
  • Style
    • Updated icons and styling for start and due date selectors for better clarity and usability.

@makeplane
Copy link

makeplane bot commented Jun 24, 2025

Pull Request Linked with Plane Work Items

Comment Automatically Generated by Plane

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 24, 2025

Walkthrough

The changes update date input handling in issue property components. They introduce logic to conditionally render either a combined date range picker or separate start and due date pickers, depending on the availability and display settings of those dates. No public API or exported entity signatures are altered.

Changes

File(s) Change Summary
web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/properties.tsx Refactored to conditionally render a merged date range picker or separate start/due date pickers based on date presence and display settings; updated imports, memoized values, and highlight logic for due date.
web/core/components/issues/issue-layouts/properties/all-properties.tsx Added logic to toggle between combined date range and individual date pickers; updated imports, conditional rendering, icons, and styling for date dropdowns; no changes to public entity signatures.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant IssuePropertiesComponent
    participant DateRangeDropdown
    participant DateDropdown

    User->>IssuePropertiesComponent: Render properties
    IssuePropertiesComponent->>IssuePropertiesComponent: Check if both start_date and due_date are enabled
    alt Both dates enabled
        IssuePropertiesComponent->>DateRangeDropdown: Render merged date range picker
    else
        IssuePropertiesComponent->>DateDropdown: Render start date picker (if enabled)
        IssuePropertiesComponent->>DateDropdown: Render due date picker (if enabled)
    end
Loading

Possibly related PRs

  • makeplane/plane#7141: Adds mergeDates prop and merged date display to DateRangeDropdown, directly related to merged date picker logic.
  • makeplane/plane#7079: Modifies SubIssuesListItemProperties, affecting related UI but focusing on state dropdown and start date removal.

Suggested labels

ready_to_merge

Suggested reviewers

  • anmolsinghbhatia
  • prateekshourya29

Poem

In the garden of code where the issues bloom,
Dates now dance in pickers, giving users more room.
Sometimes together, sometimes apart,
Each dropdown a petal, UI a work of art.
🗓️🌱
With every hop, the rabbit refines—
Now picking dates is simply divine!


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 072f2e2 and c0a9fe6.

📒 Files selected for processing (2)
  • web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/properties.tsx (6 hunks)
  • web/core/components/issues/issue-layouts/properties/all-properties.tsx (6 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (5)
web/core/components/issues/issue-layouts/properties/all-properties.tsx (3)

271-274: Well-implemented conditional logic for date range display.

The isDateRangeEnabled logic correctly addresses the PR objective by ensuring the combined date range picker only displays when both dates exist AND both display properties are enabled. This should fix the toggle visibility issue.


278-279: Proper date constraint calculations.

The minDate and maxDate calculations are correctly positioned and will provide appropriate constraints for the individual date pickers.


353-398: Excellent implementation of separate date dropdowns.

The individual date dropdowns are well-implemented with:

  • Proper conditional rendering using !isDateRangeEnabled
  • Appropriate date constraints (maxDate for start date, minDate for due date)
  • Consistent styling and event handling
  • Semantic icons (CalendarClock for start, CalendarCheck2 for due)
  • Proper accessibility with tooltips and placeholders

This should resolve the issue where individual date visibility wasn't working correctly.

web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/properties.tsx (2)

63-72: Good use of memoization for performance optimization.

The memoized stateDetails and shouldHighlight values are well-implemented and will prevent unnecessary re-calculations. The isDateRangeEnabled logic is consistent with the main properties component.


157-200: Consistent implementation of separate date dropdowns.

The individual date dropdowns follow the same pattern as the main properties component with:

  • Proper conditional rendering logic
  • Appropriate date constraints and styling
  • Consistent iconography and accessibility features
  • Higher z-index (z-30) appropriate for sub-issues context

The implementation maintains consistency across both components while addressing the specific requirements for sub-issues.

✨ Finishing Touches
  • 📝 Generate Docstrings

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 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.

@sriramveeraghanta sriramveeraghanta merged commit 912246c into preview Jun 30, 2025
5 of 6 checks passed
@sriramveeraghanta sriramveeraghanta deleted the fix-merged_date_display branch June 30, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛bug Something isn't working requires approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants