vaishsriram opened a new pull request, #73913:
URL: https://github.com/apache/airflow/pull/73913
When a plugin registers an external view (no `url_route`), the nav item
renders via `NavButton` with `isExternal=true`. The `isExternal` branch used
`<Link asChild><Button>`, which with Chakra UI v3's Slot/`asChild` merges the
Link's props onto the `Button` child — but `Button` renders as `<button>`, and
`<button href="...">` is not navigable. Clicking the icon does nothing.
The non-external branch already uses the correct pattern:
`<Button asChild><RouterLink>`, where `asChild` causes `Button` to render as
the anchor element that `RouterLink` provides. The fix mirrors that pattern for
external links: `<Button asChild><a href={to}>`.
A regression test is added to `NavButton.test.tsx` covering the external
link case (previously untested).
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes
Generated-by: Claude Code (claude-sonnet-4-6) following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]