Skip to content
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

[WEB-2753]fix: intake issue activity #6185

Merged
merged 1 commit into from
Dec 11, 2024
Merged

[WEB-2753]fix: intake issue activity #6185

merged 1 commit into from
Dec 11, 2024

Conversation

vamsikrishnamathala
Copy link
Collaborator

@vamsikrishnamathala vamsikrishnamathala commented Dec 11, 2024

Description

Activity is not getting rendered when intake is moved to issues. Modified render component according to the payload.

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

References

WEB-2753

Summary by CodeRabbit

  • New Features
    • Enhanced activity detail rendering to include new options for "intake" and "type" activity fields in the issue activity component.

Copy link
Contributor

coderabbitai bot commented Dec 11, 2024

Walkthrough

The changes introduce a new case in the switch statement of the IssueActivityItem functional component, specifically for the activityField value of "intake". This addition allows for the rendering of IssueInboxActivity when the activityField is "inbox" and introduces a new rendering option for IssueTypeActivity when the activityField is "type". The structure of the switch statement remains unchanged, and no modifications were made to existing logic, error handling, or control flow.

Changes

File Path Change Summary
web/core/components/issues/issue-detail/issue-activity/activity/activity-list.tsx Added a new case in the switch statement for handling activityField values of "intake" and "type", allowing for new rendering options.

Possibly related PRs

Suggested reviewers

  • sriramveeraghanta
  • SatishGandham
  • rahulramesha

🐰 In the meadow, where bunnies play,
A new case hops in, brightening the day!
With types and inbox, activities bloom,
Rendering joy, dispelling the gloom.
So let’s celebrate this code so fine,
A leap for the issues, oh how they shine! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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. (Experiment)
  • @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
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: 0

🧹 Outside diff range and nitpick comments (1)
web/core/components/issues/issue-detail/issue-activity/activity/activity-list.tsx (1)

Line range hint 85-89: Consider updating activity tracking documentation

The addition of "intake" as a new activity type follows the existing pattern. However, it would be beneficial to:

  1. Update any activity tracking documentation to include this new type
  2. Add comments explaining why "intake" and "inbox" activities share the same rendering component
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 7fca7fd and d0eb396.

📒 Files selected for processing (1)
  • web/core/components/issues/issue-detail/issue-activity/activity/activity-list.tsx (1 hunks)
🔇 Additional comments (2)
web/core/components/issues/issue-detail/issue-activity/activity/activity-list.tsx (2)

Line range hint 85-89: Implementation looks good!

The changes appropriately handle the intake activity rendering issue by reusing the IssueInboxActivity component. The implementation is clean and follows the existing pattern.

Please ensure that you've added test cases covering:

  1. Intake activity rendering
  2. Proper differentiation between intake and inbox activities
  3. Type activity rendering

Line range hint 85-89: Verify handling of intake and inbox activities

The implementation uses the same component (IssueInboxActivity) for both "intake" and "inbox" activities. While the fall-through case is a clean approach, we should verify that IssueInboxActivity can properly differentiate and handle both activity types.

✅ Verification successful

IssueInboxActivity correctly handles both intake and inbox activities

Looking at the search results, the IssueInboxActivity component in web/core/components/issues/issue-detail/issue-activity/activity/actions/inbox.tsx properly handles both intake and inbox activities. The component includes specific message handling for intake-related actions:

  • "declined this issue from intake"
  • "accepted this issue from intake"
  • "declined this issue from intake by marking a duplicate issue"
  • "updated intake issue status"

The fall-through case in the switch statement is appropriate as the same component is designed to handle both activity types with proper differentiation in the messaging.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify IssueInboxActivity implementation handles both activity types

# Check if IssueInboxActivity handles different activity fields
ast-grep --pattern 'const IssueInboxActivity = $_($$$) => {
  $$$
}'

# Search for any specific handling of intake vs inbox
rg -A 5 'intake|inbox' web/core/components/issues/issue-details/

Length of output: 219


Script:

#!/bin/bash
# Let's correct the path and try again with broader search

# Search for IssueInboxActivity component definition
ast-grep --pattern 'const IssueInboxActivity = $_($$$) => {
  $$$
}'

# Search for IssueInboxActivity in the codebase
rg -A 5 "IssueInboxActivity"

# Search for intake/inbox activity handling
rg -A 5 'intake|inbox' web/core/components/issues/

Length of output: 6248

@pushya22 pushya22 merged commit ca0d50b into preview Dec 11, 2024
12 of 14 checks passed
@pushya22 pushya22 deleted the fix-intake_activity branch December 11, 2024 12:27
nishantPFM pushed a commit to Pocket-Fm/plane that referenced this pull request Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working 🌐frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants