Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

Addresses missing test coverage for active breadcrumb items using custom components via the as prop. When active={true}, the component renders a <span> instead of the custom component, but this behavior wasn't tested.

Changes

  • Added test case verifying that active items ignore the as prop and render as <span>
  • Validates that custom component props (e.g., to, data-custom-link) are not applied when active
  • Confirms refs are not forwarded to the span element
<Breadcrumb.Item as={CustomLink} to="/test-path" active>
  Crumb
</Breadcrumb.Item>
// Renders: <span>Crumb</span>
// Not: <CustomLink to="/test-path">Crumb</CustomLink>

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@codesandbox
Copy link

codesandbox bot commented Dec 10, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@vercel
Copy link

vercel bot commented Dec 10, 2025

Deployment failed with the following error:

Resource is limited - try again in 49 minutes (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/rsuite?upgradeToPro=build-rate-limit

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 10, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@vercel
Copy link

vercel bot commented Dec 10, 2025

Deployment failed with the following error:

Resource is limited - try again in 41 minutes (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/rsuite?upgradeToPro=build-rate-limit

Copy link
Contributor Author

Copilot AI commented Dec 10, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update BreadcrumbItem implementation based on review feedback test: add coverage for active BreadcrumbItem with custom component Dec 10, 2025
Copilot AI requested a review from simonguo December 10, 2025 07:14
Copy link
Member

@simonguo simonguo left a comment

Choose a reason for hiding this comment

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

LGTM

@simonguo simonguo marked this pull request as ready for review December 10, 2025 08:11
@simonguo simonguo merged commit d72e776 into fix/breadcrumb-item-props-forwarding Dec 10, 2025
2 of 6 checks passed
@simonguo simonguo deleted the copilot/sub-pr-4450 branch December 10, 2025 08:11
simonguo added a commit that referenced this pull request Dec 10, 2025
…rumbItem (#4450)

* fix(Breadcrumb): forward props correctly when using as prop in BreadcrumbItem

- Separate BoxProps and component props using extractBoxProps/omitBoxProps
- BoxProps are applied to wrapper element to support layout properties
- Component props (like 'to' for react-router Link) are forwarded to inner element
- Align prop forwarding behavior with NavItem and DropdownItem
- Add test cases for custom component prop forwarding and BoxProps support
- Update composition docs to show direct react-router-dom usage

Fixes #4427

* refactor(Breadcrumb): rename WrapperComponent to Wrapper in BreadcrumbItem (#4463)

* Initial plan

* refactor(Breadcrumb): rename WrapperComponent to Wrapper in BreadcrumbItem

Co-authored-by: simonguo <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: simonguo <[email protected]>

* test: add coverage for active BreadcrumbItem with custom component (#4462)

* Initial plan

* test: add test for active breadcrumb item with custom component

Co-authored-by: simonguo <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: simonguo <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: simonguo <[email protected]>
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