E543 feat(website): add Storybook link to the Extend page by vancura · Pull Request #13598 · podman-desktop/podman-desktop · GitHub
[go: up one dir, main page]

Skip to content

Conversation

vancura
Copy link
Member
@vancura vancura commented Aug 14, 2025

What does this PR do?

Adds the Storybook link to the Extend page.

Screenshot / video of UI

CleanShot 2025-08-14 at 14 01 36@2x

What issues does this PR fix or reference?

Fixes #9873

How to test this PR?

  1. Visit the Extend page (http://localhost:3000/extend when running locally)
  2. See the Storybook link.
  • Tests are covering the bug fix or the new feature

Signed-off-by: Václav Vančura <commit@vancura.dev>
@vancura vancura self-assigned this Aug 14, 2025
@vancura vancura requested review from slemeur, cdrage, benoitf, Firewall and a team as code owners August 14, 2025 12:02
@vancura vancura requested review from dgolovin and removed request for a team August 14, 2025 12:02
Copy link
Contributor
coderabbitai bot commented Aug 14, 2025
📝 Walkthrough

Walkthrough

Added 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

Objective Addressed Explanation
Add a Storybook link on /extend after "API Reference" (#9873)

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 Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor
@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
codecov bot commented Aug 14, 2025

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
website/src/pages/extend/index.tsx 0.00% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

Co-authored-by: Claude <assistant@anthropic.com>
Signed-off-by: Václav Vančura <commit@vancura.dev>
Copy link
Contributor
@coderabbitai coderabbitai bot left a 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 isolation

You’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 failures

If 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 call

Guard 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.

📥 Commits

Reviewing files that changed from the base of the PR and between efab11d and 11cad21.

📒 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 correct

Header matches Apache-2.0 with SPDX identifier; no issues.

Signed-off-by: Václav Vančura <commit@vancura.dev>
@vancura vancura merged commit b7289f2 into podman-desktop:main Aug 14, 2025
22 of 23 checks passed
@vancura vancura deleted the gh-9873-storybook-visibility branch August 14, 2025 15:31
@podman-desktop-bot podman-desktop-bot added this to the 1.21.0 milestone Aug 14, 2025
gastoner pushed a commit to gastoner/podman-desktop that referenced this pull request Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storybook is difficult to discover in website
4 participants
0