-
Notifications
You must be signed in to change notification settings - Fork 2.2k
chore: issue detail refactor #6803
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
Conversation
WalkthroughThis pull request introduces a new React component along with its associated type for additional work item widgets. The new component is integrated into the existing issue detail widgets, and an export has been added to streamline imports. Additionally, a helper function for sorting issue arrays is introduced, and a prop removal update has been made in the issue sidebar component. Changes
Sequence Diagram(s)sequenceDiagram
participant Collapsibles as IssueDetailWidgetCollapsibles
participant AddWidgets as WorkItemAdditionalWidgets
Collapsibles->>+AddWidgets: Render with props (workspaceSlug, projectId, workItemId, disabled)
AddWidgets-->>-Collapsibles: Return rendered fragment
sequenceDiagram
participant Caller as SortCaller
participant Store as BaseIssueStore
participant Utils as BaseIssuesUtils
Caller->>+Store: workItemSortWithOrderByExtended(issues, key?)
Store->>+Utils: getIssueIds(issues)
Utils-->>-Store: sorted IDs
Store-->>-Caller: Return sorted result
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 (
|
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: 1
🧹 Nitpick comments (2)
web/ce/components/issues/issue-detail-widgets/additional-widgets.tsx (1)
10-10
: Empty component implementation.The component currently renders an empty fragment. While this is likely intentional as part of the refactoring process, make sure to add implementation or documentation comment if this is meant to be extended later.
Consider adding a TODO comment if implementation is planned for the future:
-export const WorkItemAdditionalWidgets: FC<TWorkItemAdditionalWidgets> = (props) => <></>; +// TODO: Implement additional widgets for work items +export const WorkItemAdditionalWidgets: FC<TWorkItemAdditionalWidgets> = (props) => <></>;web/core/components/issues/issue-detail-widgets/issue-detail-widget-collapsibles.tsx (1)
72-78
: Consider conditional rendering for consistency.Unlike other widgets in this component which are conditionally rendered based on certain criteria, the
WorkItemAdditionalWidgets
component is always rendered. While this may be intentional if the component handles its own visibility, it's inconsistent with the pattern used for other widgets.Consider wrapping this component in a conditional check for consistency with other widgets, if appropriate:
- <WorkItemAdditionalWidgets - workspaceSlug={workspaceSlug} - projectId={projectId} - workItemId={issueId} - disabled={disabled} - /> + {/* Add appropriate condition here */} + {true && ( + <WorkItemAdditionalWidgets + workspaceSlug={workspaceSlug} + projectId={projectId} + workItemId={issueId} + disabled={disabled} + /> + )}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
web/ce/components/issues/issue-detail-widgets/additional-widgets.tsx
(1 hunks)web/ce/components/issues/issue-detail-widgets/index.ts
(1 hunks)web/ce/store/issue/helpers/base-issue-store.ts
(1 hunks)web/core/components/issues/issue-detail-widgets/issue-detail-widget-collapsibles.tsx
(2 hunks)web/core/components/issues/issue-detail/sidebar.tsx
(0 hunks)
💤 Files with no reviewable changes (1)
- web/core/components/issues/issue-detail/sidebar.tsx
🧰 Additional context used
🧬 Code Definitions (1)
web/core/components/issues/issue-detail-widgets/issue-detail-widget-collapsibles.tsx (1)
web/ce/components/issues/issue-detail-widgets/additional-widgets.tsx (1)
WorkItemAdditionalWidgets
(10-10)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: CodeQL
- GitHub Check: Analyze (javascript)
- GitHub Check: Analyze (python)
🔇 Additional comments (3)
web/ce/components/issues/issue-detail-widgets/index.ts (1)
1-1
: LGTM! Good export pattern.This export statement follows good module organization practices by re-exporting all entities from the additional-widgets module, making them accessible through a single entry point.
web/ce/components/issues/issue-detail-widgets/additional-widgets.tsx (1)
3-8
: LGTM! Clear type definition.The type definition for
TWorkItemAdditionalWidgets
is well-structured with appropriate property types.web/core/components/issues/issue-detail-widgets/issue-detail-widget-collapsibles.tsx (1)
14-14
: LGTM! Proper import of the new component.The import statement correctly brings in the new
WorkItemAdditionalWidgets
component.
Description
Type of Change
Screenshots and Media (if applicable)
Test Scenarios
References
Summary by CodeRabbit
New Features
Refactor