Skip to content

feat: add itemTitle for structured array item labels#675

Closed
bobbwal wants to merge 3 commits intoSonicJs-Org:mainfrom
bobbwal:feat/array-item-labels
Closed

feat: add itemTitle for structured array item labels#675
bobbwal wants to merge 3 commits intoSonicJs-Org:mainfrom
bobbwal:feat/array-item-labels

Conversation

@bobbwal
Copy link
Copy Markdown
Contributor

@bobbwal bobbwal commented Feb 25, 2026

Description

Improve structured array labelling in admin forms by introducing explicit singular item labels while preserving backward compatibility for existing array header options.

Changes

  • Add itemTitle support for array fields in collection config types.
  • Use array field title as the array section heading by default.
  • Use itemTitle (when provided) for:
    • array item card label (e.g. Member #1)
    • add button text (e.g. Add Member)
  • Keep backward compatibility:
    • retain itemLabel support for array section header
    • keep default add button text as Add item when itemTitle is not provided
  • Update docs to document itemTitle usage:
    • packages/core/src/collections/README.md
    • docs/collections-config.md
    • www/src/app/collections/page.mdx
  • Rebuild core dist outputs.

Testing

  • npm run build:core
  • npm test

Unit Tests

  • Added/updated unit tests
  • All unit tests passing

E2E Tests

  • Added/updated E2E tests
  • All E2E tests passing

Checklist

  • Code follows project conventions
  • Tests added/updated and passing
  • Type checking passes
  • No console errors or warnings
  • Documentation updated (if needed)

lane711 pushed a commit that referenced this pull request Mar 28, 2026
Adds itemTitle property to array field definitions, allowing custom
labels for array items based on their field values.

Cherry-picked from #675 by @bobbwal
Closes #675

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@lane711 lane711 closed this in #725 Mar 28, 2026
lane711 added a commit that referenced this pull request Mar 28, 2026
Adds itemTitle property to array field definitions, allowing custom
labels for array items based on their field values.

Cherry-picked from #675 by @bobbwal
Closes #675

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Rob Walton <bobbwal@users.noreply.github.com>
@lane711
Copy link
Copy Markdown
Collaborator

lane711 commented Apr 1, 2026

Hey @bobbwal — thank you! Your itemTitle feature for structured array item labels was cherry-picked and merged as PR #725. It shipped in v2.8.3. Great UX improvement. 🙏

For context: we cherry-pick fork PRs into our own branches to work around GitHub Actions CI limitations with fork secrets. Your authorship is preserved in the git history.

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