-
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-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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 updatingKanbanLayoutLoader
for consistency.The
KanbanLayoutLoader
component, which usesKanbanColumnLoader
, is not updated to pass theshouldAnimate
prop. This could lead to inconsistent animation behavior ifKanbanLayoutLoader
is used.To ensure consistent animation behavior, consider updating
KanbanLayoutLoader
to accept and pass theshouldAnimate
prop 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
KanbanIssueBlockLoader
component look good:
- The new optional prop
shouldAnimate
is added to control the pulse animation.- The
cn
function is correctly used to conditionally apply theanimate-pulse
class 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
KanbanColumnLoader
component look good:
- The new optional prop
shouldAnimate
is added to control the pulse animation.- The
cn
function is correctly used to conditionally apply theanimate-pulse
class based onshouldAnimate
for the header elements.- The
shouldAnimate
prop is correctly passed down to theKanbanIssueBlockLoader
instances 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
KanbanColumnLoader
component by setting theshouldAnimate
prop tofalse
is 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
shouldAnimate
prop to the Kanban component, allowing users to disable animations for card rendering.shouldAnimate
prop to loading indicators in Kanban layouts, with default animations enabled.Bug Fixes