-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[WEB-5054]feat: added activity filters for state and assignee activities #7918
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
base: preview
Are you sure you want to change the base?
Conversation
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
WalkthroughRefactors issue activity aggregation into helper methods, derives activity_type from activity.field, adds sortOrder state and toggle, extends activity filter enum/types with STATE, ASSIGNEE, DEFAULT and updates filtering logic, adjusts rendering checks to use expanded filter types, and reorders one story import. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant UI as Issue Detail UI
participant Store as IssueActivityStore
participant DB as Data (activities/comments)
UI->>Store: toggleSortOrder()
Store->>Store: flip sortOrder (ASC ⇄ DESC)
UI->>Store: getActivityAndCommentsByIssueId(issueId, sortOrder?)
Store->>Store: buildActivityAndCommentItems(issueId)
Store->>DB: read activities & comments
Store->>Store: derive activity_type from activity.field (STATE/ASSIGNEE/DEFAULT/ACTIVITY)
Store->>Store: sortActivityComments(items, sortOrder)
Store-->>UI: return sorted items
UI->>UI: render items (filter via EActivityFilterType)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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). (1)
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. Comment |
There was a problem hiding this 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/web/ce/store/issue/issue-details/activity.store.ts (1)
58-78
: MakesortOrder
observable and toggle action.
toggleSortOrder
mutatesthis.sortOrder
, butsortOrder
isn't part of themakeObservable
map and the toggle itself isn't marked as an action. As a result, MobX won't track or propagate the updated sort order, so the UI never re-renders with the new sort. Please register both inmakeObservable
.makeObservable(this, { // observables loader: observable.ref, activities: observable, activityMap: observable, + sortOrder: observable, // actions fetchActivities: action, + toggleSortOrder: action, });
🧹 Nitpick comments (1)
packages/ui/src/popovers/popover-menu.stories.tsx (1)
1-2
: Switch Storybook type imports to the Vite-specific entry point.For our React + Vite stories we should pull
Meta
andStoryObj
from"storybook/react-vite"
; sticking with"@storybook/react"
causes the framework-specific helpers (and build optimizations) to be skipped. Please update the import accordingly. Based on learnings-import type { Meta, StoryObj } from "@storybook/react"; +import type { Meta, StoryObj } from "storybook/react-vite";
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
apps/web/ce/store/issue/issue-details/activity.store.ts
(5 hunks)apps/web/core/components/issues/issue-detail/issue-activity/activity-comment-root.tsx
(3 hunks)packages/constants/src/issue/filter.ts
(2 hunks)packages/types/src/issues/activity/base.ts
(1 hunks)packages/ui/src/popovers/popover-menu.stories.tsx
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-06T01:45:11.248Z
Learnt from: lifeiscontent
PR: makeplane/plane#7888
File: packages/propel/src/table/table.stories.tsx:1-1
Timestamp: 2025-10-06T01:45:11.248Z
Learning: When using Storybook with React + Vite framework, Meta and StoryObj types should be imported from "storybook/react-vite", not from "storybook/react". This is the correct pattern per Storybook's official documentation for framework-specific type imports.
Applied to files:
packages/ui/src/popovers/popover-menu.stories.tsx
🧬 Code graph analysis (2)
packages/constants/src/issue/filter.ts (1)
packages/types/src/issues/activity/base.ts (1)
TIssueActivityComment
(48-83)
apps/web/ce/store/issue/issue-details/activity.store.ts (2)
packages/types/src/issues/activity/issue_activity.ts (3)
TIssueActivity
(10-42)TIssueActivityIdMap
(48-50)TIssueActivityMap
(44-46)packages/types/src/issues/activity/base.ts (1)
TIssueActivityComment
(48-83)
⏰ 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). (2)
- GitHub Check: Build and lint web apps
- GitHub Check: Analyze (javascript)
Description
Add new activity filters for activity
State
andAssignee
.Type of Change
Screenshots and Media (if applicable)
Test Scenarios
References
Summary by CodeRabbit
New Features
Refactor
Style