Skip to content

feat(Breadcrumb): expose key prop with index as fallback#697

Open
paanSinghCoder wants to merge 2 commits intomainfrom
feat/expose-key-prop
Open

feat(Breadcrumb): expose key prop with index as fallback#697
paanSinghCoder wants to merge 2 commits intomainfrom
feat/expose-key-prop

Conversation

@paanSinghCoder
Copy link
Contributor

@paanSinghCoder paanSinghCoder commented Mar 12, 2026

Description

Add optional key on breadcrumb dropdown items for stable list keys, with index as fallback when omitted.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes, no bug fixes just code improvements)
  • Chore (changes to the build process or auxiliary tools and libraries such as documentation generation)
  • Style (changes that do not affect the meaning of the code (white-space, formatting, etc))
  • Test (adding missing tests or correcting existing tests)
  • Improvement (Improvements to existing code)
  • Other (please specify)

How Has This Been Tested?

Manual

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (.mdx files)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Screenshots (if appropriate):

[Add screenshots here]

Related Issues

[Link any related issues here using #issue-number]

Summary by CodeRabbit

  • New Features
    • Breadcrumb dropdown items now support an optional stable key to improve rendering stability and consistency when items are reordered; behavior remains unchanged if a key is not provided.

@paanSinghCoder paanSinghCoder self-assigned this Mar 12, 2026
@vercel
Copy link

vercel bot commented Mar 12, 2026

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

Project Deployment Actions Updated (UTC)
apsara Ready Ready Preview, Comment Mar 12, 2026 4:27am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 423df3f9-2c2c-4ce0-b511-d3ee4b3d5b8a

📥 Commits

Reviewing files that changed from the base of the PR and between 595b9e5 and d07a5ef.

📒 Files selected for processing (1)
  • packages/raystack/components/breadcrumb/breadcrumb-item.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/raystack/components/breadcrumb/breadcrumb-item.tsx

📝 Walkthrough

Walkthrough

Adds an optional key?: string field to breadcrumb dropdown items in types and docs, and uses that field as the React key when rendering dropdown items, falling back to the previous index-based key if omitted.

Changes

Cohort / File(s) Summary
Breadcrumb component types & docs
packages/raystack/components/breadcrumb/breadcrumb-item.tsx, apps/www/src/content/docs/components/breadcrumb/props.ts
Introduce optional key?: string on BreadcrumbDropdownItem and update rendering to prefer dropdownItem.key for React key, with index fallback. Documentation updated to include the new optional property.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐇 I nibble paths with careful cheer,

I tuck a key to keep things clear,
Items ordered, calm and bright,
React hops smooth into the night.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding an optional key prop to breadcrumb dropdown items with index-based fallback.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/expose-key-prop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@paanSinghCoder paanSinghCoder changed the title feat: expose key prop feat9Breadcrumb): expose key prop with index as fallback Mar 12, 2026
@paanSinghCoder paanSinghCoder changed the title feat9Breadcrumb): expose key prop with index as fallback feat(Breadcrumb): expose key prop with index as fallback Mar 12, 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