Skip to content

Conversation

@webJose
Copy link
Contributor

@webJose webJose commented Oct 8, 2025

No description provided.

@webJose webJose requested a review from Copilot October 8, 2025 22:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request fixes a bug in the activeBehavior function where multiple CSS classes were not being handled correctly. The fix ensures that when clsx returns a string with multiple space-separated classes, they are properly split and added individually to the element's classList.

Key changes:

  • Modified class handling to split space-separated class strings and filter out empty values
  • Updated classList operations to use spread operator for adding/removing multiple classes
  • Added comprehensive test coverage for different class input types (string, object, array)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/lib/behaviors/active.svelte.ts Fixed class handling to properly split and manage multiple CSS classes
src/lib/behaviors/active.svelte.test.ts Added test cases for different class input formats and updated existing assertions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@webJose webJose merged commit fd16868 into main Oct 8, 2025
1 check passed
@webJose webJose deleted the JP/fix branch October 8, 2025 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants