chore: issue detail refactor
Description
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)
- [x] Code refactoring
- [ ] Performance improvements
- [ ] Documentation update
Screenshots and Media (if applicable)
Test Scenarios
References
Summary by CodeRabbit
-
New Features
- Introduced additional work item widgets in the issue details view for enhanced information display.
- Implemented an improved sorting mechanism for work items.
-
Refactor
- Streamlined the sidebar component by removing an unnecessary view property.
Walkthrough
This pull request introduces a new TypeScript component along with its associated type for rendering additional widgets related to work items in the issue detail area. The new component is exported through the module’s index to facilitate easier imports and is integrated with the existing collapsible widget component. Additionally, a new sorting function is added to the issue store helpers, and a redundant prop has been removed from the sidebar component.
Changes
| File(s) | Change Summary |
|---|---|
web/ce/components/issues/issue-detail-widgets/additional-widgets.tsx, web/ce/components/issues/issue-detail-widgets/index.ts, web/core/components/issues/issue-detail-widgets/issue-detail-widget-collapsibles.tsx |
Introduces a new type (TWorkItemAdditionalWidgets) and functional component (WorkItemAdditionalWidgets); re-exports the module; integrates the new widget in the collapsible component. |
web/ce/store/issue/helpers/base-issue-store.ts |
Adds a new function workItemSortWithOrderByExtended to sort work items using getIssueIds. |
web/core/components/issues/issue-detail/sidebar.tsx |
Removes the isPeekView prop from the WorkItemAdditionalSidebarProperties component. |
packages/constants/src/index.ts, packages/constants/src/swr-keys.ts, packages/utils/src/common.ts |
Adds new exports and a new enum (SWR_KEYS); introduces a new function getSwrKey for generating unique SWR cache keys. |
Sequence Diagram(s)
sequenceDiagram
participant User
participant Collapsibles as IssueDetailWidgetCollapsibles
participant Widgets as WorkItemAdditionalWidgets
User->>Collapsibles: Load issue details
Collapsibles->>Widgets: Render Additional Widgets<br/>(workspaceSlug, projectId, workItemId, disabled)
Widgets-->>Collapsibles: Return rendered widget
sequenceDiagram
participant Caller as Client Code
participant IssueStore as BaseIssueStore
participant IssuesUtil as BaseIssueUtils (getIssueIds)
Caller->>IssueStore: Call workItemSortWithOrderByExtended(array, key)
IssueStore->>IssuesUtil: Invoke getIssueIds(array)
IssuesUtil-->>IssueStore: Return sorted IDs
IssueStore-->>Caller: Return sorted work items
Possibly related PRs
-
makeplane/plane#6724: The changes in the main PR, which introduce a new functional component
WorkItemAdditionalWidgets, are related to modifications in handling work item properties. - makeplane/plane#6608: The changes in the main PR are related to modifications in components within the issue detail widgets, specifically the addition of new components that interact with work items.
Suggested labels
🌟improvement, 🌐frontend
Suggested reviewers
- prateekshourya29
- sriramveeraghanta
Poem
I'm just a rabbit hopping through the code,
Discovering changes on every new road.
A widget here, a sort function there,
And props removed with meticulous care.
I celebrate these tweaks with a cheerful hop—
Happy coding, may your fixes never stop! 🐰
✨ Finishing Touches
- [ ] 📝 Generate Docstrings
🪧 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
@coderabbitaiin 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
@coderabbitaiin 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 pauseto pause the reviews on a PR. -
@coderabbitai resumeto resume the paused reviews. -
@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository. -
@coderabbitai full reviewto do a full review from scratch and review all the files again. -
@coderabbitai summaryto regenerate the summary of the PR. -
@coderabbitai generate docstringsto generate docstrings for this PR. -
@coderabbitai resolveresolve all the CodeRabbit review comments. -
@coderabbitai configurationto show the current CodeRabbit configuration for the repository. -
@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile 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.
Discarding swr keys changes for now.