[WEB-2316] chore: fix animation performance on kanban group virtualization#5666
Conversation
WalkthroughThe changes introduce a new optional property, Changes
Possibly related PRs
Suggested labels
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.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
web/core/components/ui/loader/layouts/kanban-layout-loader.tsx (1)
Line range hint
43-50: Consider updatingKanbanLayoutLoaderfor consistency.The
KanbanLayoutLoadercomponent, which usesKanbanColumnLoader, is not updated to pass theshouldAnimateprop. This could lead to inconsistent animation behavior ifKanbanLayoutLoaderis used.To ensure consistent animation behavior, consider updating
KanbanLayoutLoaderto accept and pass theshouldAnimateprop toKanbanColumnLoader:-export const KanbanLayoutLoader = ({ cardsInEachColumn = [2, 3, 2, 4, 3] }: { cardsInEachColumn?: number[] }) => ( +export const KanbanLayoutLoader = ({ + cardsInEachColumn = [2, 3, 2, 4, 3], + shouldAnimate = true, +}: { + cardsInEachColumn?: number[]; + shouldAnimate?: boolean; +}) => ( <ContentWrapper className="flex-row gap-5 py-1.5 overflow-x-auto"> {cardsInEachColumn.map((cardsInColumn, columnIndex) => ( - <KanbanColumnLoader key={columnIndex} cardsInColumn={cardsInColumn} /> + <KanbanColumnLoader key={columnIndex} cardsInColumn={cardsInColumn} shouldAnimate={shouldAnimate} /> ))} </ContentWrapper> );
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- web/core/components/issues/issue-layouts/kanban/default.tsx (1 hunks)
- web/core/components/ui/loader/layouts/kanban-layout-loader.tsx (2 hunks)
Additional comments not posted (3)
web/core/components/ui/loader/layouts/kanban-layout-loader.tsx (2)
Line range hint
5-13: LGTM!The changes to the
KanbanIssueBlockLoadercomponent look good:
- The new optional prop
shouldAnimateis added to control the pulse animation.- The
cnfunction is correctly used to conditionally apply theanimate-pulseclass based onshouldAnimate.- The changes align with the PR objective to remove the pulse animation for performance improvement.
The component logic is correct, and the implementation is accurate.
Line range hint
15-39: LGTM!The changes to the
KanbanColumnLoadercomponent look good:
- The new optional prop
shouldAnimateis added to control the pulse animation.- The
cnfunction is correctly used to conditionally apply theanimate-pulseclass based onshouldAnimatefor the header elements.- The
shouldAnimateprop is correctly passed down to theKanbanIssueBlockLoaderinstances to ensure consistent animation behavior.- The changes align with the PR objective to remove the pulse animation for performance improvement.
The component logic is correct, and the implementation is accurate.
web/core/components/issues/issue-layouts/kanban/default.tsx (1)
196-196: LGTM!Disabling the animation in the
KanbanColumnLoadercomponent by setting theshouldAnimateprop tofalseis a good change that aligns with the PR objective of improving the performance of the kanban group virtualization feature by removing the potentially resource-intensive pulse animation from the loaders.The change is unlikely to have any negative impact on the functionality or user experience, and can potentially improve the performance of the feature.
This PR removes the pulse animation from kanban group virtualization loaders
Summary by CodeRabbit
New Features
shouldAnimateprop to the Kanban component, allowing users to disable animations for card rendering.shouldAnimateprop to loading indicators in Kanban layouts, with default animations enabled.Bug Fixes