[WEB-3948] chore: recent work item improvement#6976
[WEB-3948] chore: recent work item improvement#6976sriramveeraghanta merged 3 commits intopreviewfrom
Conversation
WalkthroughThis set of changes introduces the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant RecentIssue
participant useIssueDetail
participant setPeekIssue
participant setPeekEpic
User->>RecentIssue: Clicks recent issue item
RecentIssue->>useIssueDetail: Fetch issue details
alt issueDetails.is_epic == true
RecentIssue->>setPeekEpic: Set epic peek state
else issueDetails.is_epic == false
RecentIssue->>setPeekIssue: Set issue peek state
end
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Pull Request Linked with Plane Work Items Comment Automatically Generated by Plane |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
web/ce/components/home/peek-overviews.tsx (1)
1-9: Simplify wrapper component
The fragment wrapper aroundIssuePeekOverviewis unnecessary. You can streamline the component and add an explicit return type.Proposed diff:
-import { IssuePeekOverview } from "@/components/issues"; - -export const HomePeekOverviewsRoot = () => ( - <> - <IssuePeekOverview /> - </> -); +import React from "react"; +import { IssuePeekOverview } from "@/components/issues"; + +export const HomePeekOverviewsRoot: React.FC = () => <IssuePeekOverview />;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
packages/types/src/home.d.ts(1 hunks)web/ce/components/home/index.ts(1 hunks)web/ce/components/home/peek-overviews.tsx(1 hunks)web/core/components/home/root.tsx(2 hunks)web/core/components/home/widgets/recents/issue.tsx(4 hunks)web/ee/components/home/index.ts(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
web/ce/components/home/peek-overviews.tsx (1)
web/core/components/issues/peek-overview/root.tsx (1)
IssuePeekOverview(34-368)
web/core/components/home/root.tsx (1)
web/ce/components/home/peek-overviews.tsx (1)
HomePeekOverviewsRoot(5-9)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Analyze (javascript)
- GitHub Check: Analyze (python)
🔇 Additional comments (8)
web/ce/components/home/index.ts (1)
1-1: New re-export of peek-overviews module
The export of./peek-overviewsensuresHomePeekOverviewsRootis exposed through this entry point. This aligns with the new component structure.web/ee/components/home/index.ts (1)
1-1: Verify alias resolution for CE proxy export
The pathce/components/homemust be correctly aliased to the CE implementation. Please confirm yourtsconfig.json/webpackconfig includes:{ "paths": { "ce/*": ["web/ce/*"] } }so that EE consumers can import home components without errors.
web/core/components/home/root.tsx (1)
15-15: Confirm correct import alias for HomePeekOverviewsRoot
Ensure that@/plane-web/components/homemaps to the EE/CE index (e.g.,web/ee/components/home/index.ts) so that you import from the intended layer. Otherwise, this may inadvertently pull in the wrong module.web/core/components/home/widgets/recents/issue.tsx (5)
1-1: Good addition of MobX observer wrapperWrapping the component with
observerwill correctly re-render the component when the observed MobX state changes, improving reactivity and performance.Also applies to: 24-24, 133-133
3-3: Proper separation of epics and regular issuesGood job importing
EIssueServiceTypeand creating a separate hook instance for epics. This clearly distinguishes the different service types and makes the code more maintainable.Also applies to: 29-29
45-45: Appropriate passing of epic status to link generatorPassing the
isEpicflag to the link generator ensures proper routing based on the issue type.
48-58: Well-structured event handler for peek overviewThe new
handlePeekOverviewfunction is a good refactoring that:
- Prevents default behavior and propagation correctly
- Properly handles both epics and regular issues with a clear conditional
- Extracts the logic into a named function for better maintainability
The structure with a single handler that branches based on the issue type is cleaner than separate handlers would be.
129-129: Clean implementation of click handlerUsing the extracted
handlePeekOverviewfunction instead of an inline handler improves code readability and maintainability.
* chore: issue entity data type updated * chore: HomePeekOverviewsRoot component added * chore: recent work item improvement and code refactor
Description
This PR introduces the following updates:
Type of Change
Media
References
[WEB-3948]
Summary by CodeRabbit
New Features
Improvements
Bug Fixes