Skip to content

fix: nested list item fields detection#787

Merged
alexiglesias93 merged 1 commit intomasterfrom
fix-nested-list-detection
Apr 16, 2026
Merged

fix: nested list item fields detection#787
alexiglesias93 merged 1 commit intomasterfrom
fix-nested-list-detection

Conversation

@alexiglesias93
Copy link
Copy Markdown
Member

In some cases the fields were being mistakenly detected as nested, causing filtering issues.

@alexiglesias93 alexiglesias93 requested a review from Copilot April 16, 2026 09:59
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
attributes Ready Ready Preview, Comment Apr 16, 2026 9:59am

Request Review

Copy link
Copy Markdown
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

Fixes incorrect classification of list item fields as “nested” by changing the nested-list detection logic to only treat fields as nested when their closest CMS “list” element is actually contained within the current list item (i.e., truly nested inside it). This prevents false positives that could break filtering.

Changes:

  • Update nested list detection in ListItem.collectFields() to use DOM containment (this.element.contains(parentList)) instead of comparing against the current list element.
  • Add a changeset to publish a patch release for @finsweet/attributes-list.

Reviewed changes

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

File Description
packages/list/src/components/ListItem.ts Adjusts nested-field detection to avoid misclassifying fields as nested, improving filtering correctness.
.changeset/short-numbers-itch.md Declares a patch release with a brief changelog entry for the fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@alexiglesias93 alexiglesias93 merged commit 9deccf6 into master Apr 16, 2026
7 checks passed
@alexiglesias93 alexiglesias93 deleted the fix-nested-list-detection branch April 16, 2026 10:05
alexiglesias93 added a commit that referenced this pull request Apr 16, 2026
@github-actions github-actions bot mentioned this pull request Apr 16, 2026
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