Skip to content

[WEB-5599] refactor: enhance Kanban swimlane components with improved props and structure#8262

Merged
pushya22 merged 1 commit intopreviewfrom
improvement-swimlanes
Dec 8, 2025
Merged

[WEB-5599] refactor: enhance Kanban swimlane components with improved props and structure#8262
pushya22 merged 1 commit intopreviewfrom
improvement-swimlanes

Conversation

@prateekshourya29
Copy link
Member

@prateekshourya29 prateekshourya29 commented Dec 8, 2025

Description

Type of Change

  • Improvement (change that would cause existing functionality to not work as expected)

Summary by CodeRabbit

  • New Features
    • Enhanced kanban swimlane rendering with epic-aware functionality for improved display and interaction.
    • Expanded swimlane controls with improved customization options for issue creation, property editing, and display preferences.

✏️ Tip: You can customize this high-level summary in your review settings.

@makeplane
Copy link

makeplane bot commented Dec 8, 2025

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

Walkthrough

The change introduces an isEpic flag and expands public component interfaces by adding new optional properties to kanban swimlane components, threading them through KanBanSwimLanes, SubGroupSwimlane, SubGroupSwimlaneHeader, and child components to enable epic-specific rendering and interaction behavior.

Changes

Cohort / File(s) Change Summary
Kanban swimlane component interface and prop expansion
apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx
Introduces isEpic flag propagation throughout swimlane hierarchy. Expands IKanBanSwimLanes, ISubGroupSwimlane, and ISubGroupSwimlaneHeader interfaces with new optional properties including addIssuesToView, canEditProperties, collapsedGroups, disableIssueCreation, displayProperties, enableQuickIssueCreate, and additional filtering/grouping options. Updates component destructuring and prop threading to pass new fields to child components.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15–30 minutes

  • Multiple interface definitions updated across three related prop interfaces (IKanBanSwimLanes, ISubGroupSwimlane, ISubGroupSwimlaneHeader) requiring verification of consistency
  • Prop threading logic spans several component levels; ensure all new properties are correctly passed down the component hierarchy
  • Verify that isEpic flag is correctly utilized in rendering decisions and drop/creation logic
  • Check for any breaking changes to existing prop contracts or optional vs. required field consistency

Poem

🐰 A hop through swimlanes, epic and grand,
New flags take flight across the land,
Props thread like clover through kanban's dance,
Each component poised for its epic chance! 🌟

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is largely incomplete, with only the type of change checkbox filled out; critical sections like detailed description, test scenarios, and references are missing or only contain template placeholders. Complete the description section with details about what was changed and why; add test scenarios demonstrating verification of the changes; include issue references or links to related tracking items.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: refactoring Kanban swimlane components with improved props and structure, directly corresponding to the modifications documented in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch improvement-swimlanes

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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)
apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx (4)

77-77: Prefer returning null over empty fragment.

Returning null is more idiomatic in React when intentionally rendering nothing. Empty fragments can cause confusion and null explicitly signals "nothing to render."

-          if (subGroupByVisibilityToggle === false) return <></>;
+          if (subGroupByVisibilityToggle === false) return null;

101-125: Remove redundant collapsedGroups declaration.

ISubGroupSwimlane extends ISubGroupSwimlaneHeader, which already declares collapsedGroups on line 30. The redeclaration on line 104 is redundant.

 interface ISubGroupSwimlane extends ISubGroupSwimlaneHeader {
   addIssuesToView?: (issueIds: string[]) => Promise<TIssue>;
   canEditProperties: (projectId: string | undefined) => boolean;
-  collapsedGroups: TIssueKanbanFilters;
   disableIssueCreation?: boolean;
   displayProperties: IIssueDisplayProperties | undefined;
   enableQuickIssueCreate: boolean;

177-177: Prefer returning null over empty fragment.

Same as line 77 - use null for clearer semantics when not rendering.

-          if (subGroupByVisibilityToggle.showGroup === false) return <></>;
+          if (subGroupByVisibilityToggle.showGroup === false) return null;

287-298: Use ES6 shorthand property syntax.

Since the property name matches the variable name, you can use shorthand syntax for cleaner code.

   const groupByList = getGroupByColumns({
     groupBy: group_by as GroupByColumnTypes,
     includeNone: true,
     isWorkspaceLevel: isWorkspaceLevel(storeType),
-    isEpic: isEpic,
+    isEpic,
   });
   const subGroupByList = getGroupByColumns({
     groupBy: sub_group_by as GroupByColumnTypes,
     includeNone: true,
     isWorkspaceLevel: isWorkspaceLevel(storeType),
-    isEpic: isEpic,
+    isEpic,
   });
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f41e121 and 6480979.

📒 Files selected for processing (1)
  • apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx (11 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,mts,cts}

📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)

**/*.{ts,tsx,mts,cts}: Use const type parameters for more precise literal inference in TypeScript 5.0+
Use the satisfies operator to validate types without widening them
Leverage inferred type predicates to reduce the need for explicit is return types in filter/check functions
Use NoInfer<T> utility to block inference for specific type arguments when they should be determined by other arguments
Utilize narrowing in switch(true) blocks for control flow analysis (TypeScript 5.3+)
Rely on narrowing from direct boolean comparisons for type guards
Trust preserved narrowing in closures when variables aren't modified after the check (TypeScript 5.4+)
Use constant indices to narrow object/array properties (TypeScript 5.5+)
Use standard ECMAScript decorators (Stage 3) instead of legacy experimentalDecorators
Use using declarations for explicit resource management with Disposable pattern instead of manual cleanup (TypeScript 5.2+)
Use with { type: "json" } for import attributes; avoid deprecated assert syntax (TypeScript 5.3/5.8+)
Use import type explicitly when importing types to ensure they are erased during compilation, respecting verbatimModuleSyntax flag
Use .ts, .mts, .cts extensions in import type statements (TypeScript 5.2+)
Use import type { Type } from "mod" with { "resolution-mode": "import" } for specific module resolution contexts (TypeScript 5.3+)
Use new iterator methods (map, filter, etc.) if targeting modern environments (TypeScript 5.6+)
Utilize new Set methods like union, intersection, etc., when available (TypeScript 5.5+)
Use Object.groupBy / Map.groupBy standard methods for grouping instead of external libraries (TypeScript 5.4+)
Use Promise.withResolvers() for creating promises with exposed resolve/reject functions (TypeScript 5.7+)
Use copying array methods (toSorted, toSpliced, with) for immutable array operations (TypeScript 5.2+)
Avoid accessing instance fields via super in classes (TypeScript 5....

Files:

  • apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx
🧠 Learnings (4)
📚 Learning: 2025-10-09T20:42:31.843Z
Learnt from: lifeiscontent
Repo: makeplane/plane PR: 7922
File: apps/admin/app/(all)/(dashboard)/ai/form.tsx:19-19
Timestamp: 2025-10-09T20:42:31.843Z
Learning: In the makeplane/plane repository, React types are globally available through TypeScript configuration. Type annotations like React.FC, React.ReactNode, etc. can be used without explicitly importing the React namespace. The codebase uses the modern JSX transform, so React imports are not required for JSX or type references.

Applied to files:

  • apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx
📚 Learning: 2025-10-01T15:30:17.605Z
Learnt from: lifeiscontent
Repo: makeplane/plane PR: 7888
File: packages/propel/src/avatar/avatar.stories.tsx:2-3
Timestamp: 2025-10-01T15:30:17.605Z
Learning: In the makeplane/plane repository, avoid suggesting inline type imports (e.g., `import { Avatar, type TAvatarSize }`) due to bundler compatibility issues. Keep type imports and value imports as separate statements.

Applied to files:

  • apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx
📚 Learning: 2025-11-25T10:18:05.172Z
Learnt from: CR
Repo: makeplane/plane PR: 0
File: .github/instructions/typescript.instructions.md:0-0
Timestamp: 2025-11-25T10:18:05.172Z
Learning: Applies to **/*.{ts,tsx,mts,cts} : Use `Object.groupBy` / `Map.groupBy` standard methods for grouping instead of external libraries (TypeScript 5.4+)

Applied to files:

  • apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx
📚 Learning: 2025-10-09T22:12:26.424Z
Learnt from: lifeiscontent
Repo: makeplane/plane PR: 7922
File: apps/admin/app/(all)/(dashboard)/ai/form.tsx:19-19
Timestamp: 2025-10-09T22:12:26.424Z
Learning: When `types/react` is installed in a TypeScript project (which is standard for React + TypeScript codebases), React types (React.FC, React.ReactNode, React.ComponentProps, etc.) are globally available by design. These type annotations can and should be used without explicitly importing the React namespace. This is a TypeScript/DefinitelyTyped feature, not codebase-specific configuration.

Applied to files:

  • apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Build and lint web apps
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Build and lint web apps
🔇 Additional comments (2)
apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx (2)

232-258: LGTM!

The exported interface is well-structured with proper typing for all properties. The isEpic flag is correctly marked as optional.


302-342: LGTM!

The isEpic flag is properly propagated to both SubGroupSwimlaneHeader and SubGroupSwimlane components. All required props are correctly passed through, maintaining a clean data flow for epic-specific rendering.

@pushya22 pushya22 merged commit 316856a into preview Dec 8, 2025
6 of 7 checks passed
@pushya22 pushya22 deleted the improvement-swimlanes branch December 8, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants