Skip to content

fix(navbar): drop the Babelize default for githubUrl and accept owner/repo shorthand - #79

Merged
sapatmohit merged 1 commit into
mainfrom
fix/navbar-github-url
Oct 19, 2026
Merged

sapatmohit merged 1 commit into
mainfrom
fix/navbar-github-url

Conversation

@sapatmohit

Copy link
Copy Markdown
Member

Description

githubUrl defaulted to https://github.com/babelize/babelize-elements, so any app that set showGitHub without a URL shipped a GitHub button pointing at this library.

  • No default. showGitHub without githubUrl renders no button and logs a console.warn.
  • Shorthand. githubUrl accepts "owner" or "owner/repo" (also github.com/owner/repo) and expands it to a github.com URL; full URLs, GitHub or not, pass through unchanged.
  • Docs. Props table, interfaces page, a new GitHub link example, and the usage examples and live demo now pass githubUrl.
  • 7 new tests: shorthand forms, full URLs, missing URL (hidden + warning), and githubUrl without showGitHub.

Type of change

  • Bug fix

Checklist

  • bun run lint passes
  • bun run typecheck passes
  • bun run test passes
  • bun run test:pack passes
  • CI checks pass

Notes

Behaviour change for apps relying on the old default (their button disappears, with a warning). Treated as a fix: the old default linked to the wrong repository. Ships as v2.0.1.

…/repo shorthand

showGitHub alone linked to this library's own repository. It now renders no
button and warns, and githubUrl accepts "owner" or "owner/repo".
@sapatmohit sapatmohit added bug Something isn't working component New or modified component labels Oct 19, 2026
@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2b8e612c-c16b-41bf-ab5e-07f31b294bb2
📥 Commits

Reviewing files that changed from the base of the PR and between 4a19d10 and fc8f1fc.

📒 Files selected for processing: 5
  • content/docs/components/navigation/navbar.mdx
  • content/docs/customization/interfaces.mdx
  • src/components/docs/navbar-demo.tsx
  • src/registry/components/navbar.tsx
  • test/navbar.test.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@sapatmohit
sapatmohit merged commit 2953bb0 into main Oct 19, 2026
2 checks passed
@sapatmohit
sapatmohit deleted the fix/navbar-github-url branch October 19, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working component New or modified component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant