-
Notifications
You must be signed in to change notification settings - Fork 452
feat(website): add Storybook link to the Extend page #13598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(website): add Storybook link to the Extend page #13598
Conversation
Signed-off-by: Václav Vančura <commit@vancura.dev>
📝 WalkthroughWalkthroughAdded a Storybook link to the Extensibility Resources list on website/src/pages/extend/index.tsx that uses useBaseUrl('/storybook') and the faPalette FontAwesome icon, placed after the existing API Reference item. Also added a Vitest test file website/src/pages/extend/index.spec.tsx with mocks and three tests validating the component export, faPalette import, and useBaseUrl call. No public API signatures changed. Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Assessment against linked issues
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Co-authored-by: Claude <assistant@anthropic.com> Signed-off-by: Václav Vančura <commit@vancura.dev>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (3)
website/src/pages/extend/index.spec.tsx (3)
19-19
: Import beforeEach for test isolationYou’re going to add a beforeEach; include it in the Vitest imports.
Apply this diff:
-import { describe, expect, test, vi } from 'vitest'; +import { describe, expect, test, vi, beforeEach } from 'vitest';
22-27
: React mock is too minimal; export common hooks to avoid brittle failuresIf the page starts using React hooks (useEffect/useMemo/etc.) or named imports, this mock will throw. Make the mock resilient by exposing common hooks as no-ops and mirroring both default and named exports.
Apply this diff:
-vi.mock('react', () => ({ - default: { - createElement: vi.fn(), - }, -})); +vi.mock('react', () => { + const createElement = vi.fn(); + const noop = vi.fn(); + return { + // default import support + default: { + createElement, + Fragment: 'Fragment', + useMemo: noop, + useEffect: noop, + useState: noop, + useRef: noop, + useContext: noop, + }, + // named exports support (in case code switches import style) + createElement, + Fragment: 'Fragment', + useMemo: noop, + useEffect: noop, + useState: noop, + useRef: noop, + useContext: noop, + }; +});
80-89
: Tighten assertion: ensure exactly one Storybook baseUrl callGuard against false positives from earlier imports by asserting a single '/storybook' invocation.
Apply this diff:
// Verify useBaseUrl was called with storybook path - expect(useBaseUrl).toHaveBeenCalledWith('/storybook'); + const storybookCalls = (useBaseUrl as any).mock.calls.filter((args: any[]) => args[0] === '/storybook'); + expect(storybookCalls.length).toBe(1); + expect(useBaseUrl).toHaveBeenCalledWith('/storybook');
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these settings in your CodeRabbit configuration.
📒 Files selected for processing (1)
website/src/pages/extend/index.spec.tsx
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
- GitHub Check: unit tests / windows-2025
- GitHub Check: unit tests / ubuntu-24.04
- GitHub Check: unit tests / macos-15
- GitHub Check: smoke e2e tests (production)
- GitHub Check: smoke e2e tests (development)
- GitHub Check: Linux
- GitHub Check: typecheck
- GitHub Check: macOS
- GitHub Check: build website
- GitHub Check: linter, formatters
- GitHub Check: take screenshots
- GitHub Check: Windows
🔇 Additional comments (1)
website/src/pages/extend/index.spec.tsx (1)
1-17
: License header and SPDX look correctHeader matches Apache-2.0 with SPDX identifier; no issues.
Signed-off-by: Václav Vančura <commit@vancura.dev>
…13598) Co-authored-by: Claude <assistant@anthropic.com>
What does this PR do?
Adds the Storybook link to the Extend page.
Screenshot / video of UI
What issues does this PR fix or reference?
Fixes #9873
How to test this PR?