-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[WEB-1964]chore: cycles actions restructuring #6298
Conversation
WalkthroughThis pull request introduces several enhancements to the cycles management module across multiple files. The changes primarily focus on expanding the public API of the cycles components, adding new exports, and introducing new components like Changes
Possibly related PRs
Suggested Labels
Suggested Reviewers
Poem
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 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: 0
🧹 Nitpick comments (1)
web/core/components/cycles/list/cycle-list-item-action.tsx (1)
154-154
: Error silencing in the catch block
Removing the error parameter obfuscates debugging. Consider at least logging or capturing the error to help diagnose issues if the check fails.-} catch { +} catch (error) { + console.error(error); return false; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
web/ce/components/cycles/index.ts
(1 hunks)web/core/components/cycles/index.ts
(0 hunks)web/core/components/cycles/list/cycle-list-item-action.tsx
(2 hunks)web/core/components/cycles/list/cycles-list-item.tsx
(1 hunks)web/ee/components/cycles/index.ts
(1 hunks)
💤 Files with no reviewable changes (1)
- web/core/components/cycles/index.ts
🔇 Additional comments (4)
web/ce/components/cycles/index.ts (1)
3-3
: Exportingquick-actions
from CE cycles is consistent with the restructuring goal.
By exposing its functionalities at this level, it centralizes the reorganization and makes the feature more discoverable across the codebase.web/ee/components/cycles/index.ts (1)
3-3
: Ensure importing paths are correct in dependent modules.
Addingexport * from "ce/components/cycles/quick-actions";
provides a unified interface for the EE layer. Verify that all references and imports use the correct path.web/core/components/cycles/list/cycles-list-item.tsx (1)
21-22
: Updated import path
Switching to"@/plane-web/components/cycles/"
aligns with the new structure, improving clarity. Confirm that references toCycleQuickActions
in related files have similarly consistent paths.web/core/components/cycles/list/cycle-list-item-action.tsx (1)
34-35
: Use of plane-web import
Adopting the"@/plane-web/components/cycles"
path is consistent with the refactoring. This cleanly segregates the feature scope into plane-web.
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
🧹 Nitpick comments (1)
web/ce/components/cycles/additional-actions.tsx (1)
1-2
: Consider renaming or consolidating imports if the component grows in complexity.
The current imports are concise and clear, but if the component's complexity increases, you might consider grouping related imports into a barrel or shared index file for clarity.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
web/ce/components/cycles/additional-actions.tsx
(1 hunks)web/ce/components/cycles/index.ts
(1 hunks)web/core/components/cycles/list/cycle-list-item-action.tsx
(3 hunks)web/ee/components/cycles/index.ts
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- web/core/components/cycles/list/cycle-list-item-action.tsx
🔇 Additional comments (4)
web/ce/components/cycles/additional-actions.tsx (2)
3-6
: Ensure type definitions accommodate future expansion.
The selectedProps
type is straightforward. Keep an eye on whether you’ll need optional or more specialized properties (e.g., booleans or callback handlers) as the component evolves.
7-7
: Placeholder component - plan for next steps.
Currently, the component returns an empty fragment. Verify that this placeholder is intentional and consider adding a short explanatory comment or a minimal placeholder UI to guide future contributors.web/ce/components/cycles/index.ts (1)
3-4
: Exports align with intended structure.
By exporting everything from bothquick-actions
andadditional-actions
, you ensure these modules remain easily discoverable. Confirm that no private or helper utilities are unintentionally exposed.web/ee/components/cycles/index.ts (1)
3-4
: Parallel structure maintained between CE and EE.
Mirroring the CE exports helps align both editions of the application. Continue ensuring your build/deploy processes handle these consistent exports without duplication or conflicts.
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
🧹 Nitpick comments (4)
web/ce/components/cycles/end-cycle/modal.tsx (1)
3-10
: Validate usage of prop types.
The interface is well-defined with strongly-typed props. However, none of them are currently used in the component. Ensure that future logic references the props properly to avoid potential dead code.web/ce/components/cycles/end-cycle/use-end-cycle.tsx (1)
1-7
: Unused parameter and placeholders.
The hook returns static values, andisCurrentCycle
parameter is unused at runtime. This can lead to confusion or technical debt if future maintainers expect the parameter to alter the hook’s state. Consider implementing a functional approach or clarifying that this is strictly a placeholder.web/core/components/cycles/quick-actions.tsx (2)
54-54
: Validate the new hook usage.
You’re callinguseEndCycle(isCurrentCycle)
but the hook currently ignores the parameter. Ensure the hook is updated soon so thatisCurrentCycle
influences the modal’s behavior, or rename it if it’s intentionally unused.
146-146
: Context menu insertion logic.
MENU_ITEMS.splice(3, 0, endCycleContextMenu)
is straightforward but can be fragile in the long run, especially if the menu item order changes. Consider a structure where you define menu items based on conditions, or insert them more semantically.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
web/ce/components/cycles/end-cycle/index.ts
(1 hunks)web/ce/components/cycles/end-cycle/modal.tsx
(1 hunks)web/ce/components/cycles/end-cycle/use-end-cycle.tsx
(1 hunks)web/ce/components/cycles/index.ts
(1 hunks)web/core/components/cycles/list/cycle-list-item-action.tsx
(3 hunks)web/core/components/cycles/list/cycles-list-item.tsx
(1 hunks)web/core/components/cycles/quick-actions.tsx
(5 hunks)web/ee/components/cycles/end-cycle/index.ts
(1 hunks)web/ee/components/cycles/index.ts
(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- web/ee/components/cycles/end-cycle/index.ts
- web/ce/components/cycles/end-cycle/index.ts
🚧 Files skipped from review as they are similar to previous changes (4)
- web/ee/components/cycles/index.ts
- web/core/components/cycles/list/cycles-list-item.tsx
- web/ce/components/cycles/index.ts
- web/core/components/cycles/list/cycle-list-item-action.tsx
🔇 Additional comments (5)
web/ce/components/cycles/end-cycle/modal.tsx (2)
1-2
: Ensure consistent naming imports next time.
The import statement is concise and clear, but it's always good to keep import statements organized (grouping React, external packages, and internal modules separately) if the file grows.
12-12
: Placeholder component logic.
TheEndCycleModal
returns an empty fragment, indicating a placeholder. If this modal is intended to handle end-of-cycle actions, a skeleton or preliminary UI may be useful for layout or testing, ensuring the rest of the code can integrate with this component’s future functionality.Would you like help adding a skeleton for the modal?
web/core/components/cycles/quick-actions.tsx (3)
18-18
: Imports are organized properly.
AddinguseEndCycle
andEndCycleModal
here aligns with the new end-cycle feature. Good job keeping them in a single import statement for clarity.
44-45
: Ensure correct logic for cycle states.
By settingisCurrentCycle
andtransferableIssuesCount
, you correctly derive states from the cycle details. Verify that thetransferableIssuesCount
is the correct formula for your use case.
173-180
: Properly connect modal props.
TheEndCycleModal
is receiving all relevant props for future end-of-cycle functionality. Once the modal is implemented, the parent component will already be well-prepared for a smooth integration.
* chore: cycles quick actions restructuring * chore: added additional actions to cycle list actions * chore: cycle quick action structure * chore: added additional actions to cycle list actions * chore: added end cycle hook * fix: updated end cycle export --------- Co-authored-by: gurusinath <gurusainath007@gmail.com>
* WIP * WIP * WIP * WIP * Create home preference if not exist * chore: handled the unique state name validation (#6299) * fix: changed the response structure (#6301) * [WEB-1964]chore: cycles actions restructuring (#6298) * chore: cycles quick actions restructuring * chore: added additional actions to cycle list actions * chore: cycle quick action structure * chore: added additional actions to cycle list actions * chore: added end cycle hook * fix: updated end cycle export --------- Co-authored-by: gurusinath <gurusainath007@gmail.com> * fix: active cycle graph tooltip and endpoint validation (#6306) * [WEB-2870]feat: language support (#6215) * fix: adding language support package * fix: language support implementation using mobx * fix: adding more languages for support * fix: profile settings translations * feat: added language support for sidebar and user settings * feat: added language support for deactivation modal * fix: added project sync after transfer issues (#6200) * code refactor and improvement (#6203) * chore: package code refactoring * chore: component restructuring and refactor * chore: comment create improvement * refactor: enhance workspace and project wrapper modularity (#6207) * [WEB-2678]feat: added functionality to add labels directly from dropdown (#6211) * enhancement:added functionality to add features directly from dropdown * fix: fixed import order * fix: fixed lint errors * chore: added common component for project activity (#6212) * chore: added common component for project activity * fix: added enum * fix: added enum for initiatives * - Do not clear temp files that are locked. (#6214) - Handle edge cases in sync workspace * fix: labels empty state for drop down (#6216) * refactor: remove cn helper function from the editor package (#6217) * * feat: added language support to issue create modal in sidebar * fix: project activity type * * fix: added missing translations * fix: modified translation for plurals * fix: fixed spanish translation * dev: language type error in space user profile types * fix: type fixes * chore: added alpha tag --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com> Co-authored-by: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com> Co-authored-by: Akshita Goyal <36129505+gakshita@users.noreply.github.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> Co-authored-by: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Co-authored-by: gurusinath <gurusainath007@gmail.com> * feat: introduced stacked bar chart and tree map chart. (#6305) * feat: add issue attachment external endpoint (#6307) * [PE-97] chore: re-order pages options (#6303) * chore: re-order pages dropdown options * chore: re-order pages dropdown options * fix: remove localdb tracing * [WEB-2937] feat: home recent activies list endpoint (#6295) * Crud for wuick links * Validate quick link existence * Add custom method for destroy and retrieve * Add List method * Remove print statements * List all the workspace quick links * feat: endpoint to get recently active items * Resolve conflicts * Resolve conflicts * Add filter to only list required entities * Return required fields * Add filter * Add filter * fix: remove emoji edit for uneditable pages (#6304) * Removed duplicate imports * feat: patch api * Enable sort order to be updatable * Return key name only insert missing keys use serializer to return data * Remove random generation of sort_order * Remove name field Remove random generation of sort_order --------- Co-authored-by: Bavisetti Narayan <72156168+NarayanBavisetti@users.noreply.github.com> Co-authored-by: Vamsi Krishna <46787868+mathalav55@users.noreply.github.com> Co-authored-by: gurusinath <gurusainath007@gmail.com> Co-authored-by: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com> Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com> Co-authored-by: Akshita Goyal <36129505+gakshita@users.noreply.github.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> Co-authored-by: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Co-authored-by: Nikhil <118773738+pablohashescobar@users.noreply.github.com>
Description
Restructured cycles actions.
Type of Change
References
WEB-1964
Summary by CodeRabbit
Release Notes
New Features
Improvements
Technical Updates