[WEB-2015] chore: handled type error in issue detail and issue peek overview#5185
Conversation
…iled in the project types and handled the default active filters in constants in activity constants
WalkthroughThe recent changes enhance project management functionalities by introducing a boolean property to track time tracking status within projects. Additionally, new constants streamline activity filtering, and updates to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant IssueActivity
participant ActivityStore
participant ProjectType
User->>IssueActivity: Initialize component
IssueActivity->>ProjectType: Check time tracking status
ProjectType-->>IssueActivity: Return is_time_tracking_enabled
IssueActivity->>ActivityStore: Fetch activity comments
ActivityStore-->>IssueActivity: Return filtered comments
IssueActivity->>User: Display comments and filters
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? 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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- packages/types/src/project/projects.d.ts (1 hunks)
- web/ce/constants/issues.ts (1 hunks)
- web/ce/store/issue/issue-details/activity.store.ts (3 hunks)
- web/core/components/issues/issue-detail/issue-activity/root.tsx (2 hunks)
Additional comments not posted (6)
web/ce/constants/issues.ts (1)
19-20: Introduction ofdefaultActivityFiltersThe new constant
defaultActivityFiltersis introduced to streamline activity filtering. This is a good addition for maintainability and usability. Ensure that this constant is used consistently across the codebase.packages/types/src/project/projects.d.ts (1)
38-38: Introduction ofis_time_tracking_enabledThe new property
is_time_tracking_enabledis added to theIProjectinterface. This enhances the interface by allowing the representation of whether time tracking is enabled for a project. Ensure that this property is utilized correctly in the codebase.web/ce/store/issue/issue-details/activity.store.ts (2)
9-9: ImportcomputedFnfrommobx-utilsThe addition of the
computedFnimport frommobx-utilsis necessary for transforming thegetActivityCommentByIssueIdmethod into a computed function. This is a good practice to enhance reactivity.
Line range hint
74-105:
Transformation ofgetActivityCommentByIssueIdto a computed functionThe transformation of the
getActivityCommentByIssueIdmethod into a computed function usingcomputedFnfrommobx-utilsenhances reactivity within the MobX store architecture. The logic within the method remains consistent, but the execution context is improved for better performance and efficiency in state management.Ensure that this change is thoroughly tested to confirm that the reactivity improvements do not introduce any unexpected behavior.
web/core/components/issues/issue-detail/issue-activity/root.tsx (2)
17-17: LGTM! Import statement updated correctly.The import statement has been updated to import
defaultActivityFiltersinstead ofEActivityFilterType, which aligns with the changes in the initialization ofselectedFilters.
38-38: LGTM! State initialization updated correctly.The
selectedFiltersstate is now initialized withdefaultActivityFilters, enhancing maintainability and flexibility.
Summary
This PR resolved the TypeError of the issue activity in the issue peek overview and issue detail page
Changes
References
[WEB-2015]
Summary by CodeRabbit
New Features
Improvements