Skip to content

Conversation

@jfox-box
Copy link
Contributor

@jfox-box jfox-box commented Oct 15, 2025

Screenshot 2025-10-15 at 2 12 46 PM

Summary by CodeRabbit

  • Refactor
    • Modernized the Content Sharing experience to align with the latest design system for a more consistent look and feel. No functional changes expected.
  • Tests
    • Updated visual stories to use the design system’s Button component and renamed modernization stories for clarity; visual tests behavior remains unchanged.

@jfox-box jfox-box requested review from a team as code owners October 15, 2025 21:12
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 15, 2025

Walkthrough

Wraps ContentSharingV2’s default export with withBlueprintModernization, replaces a native <button> with a Blueprint Button in its visual story, and renames several story exports from Modernization to withModernization across multiple visual story files.

Changes

Cohort / File(s) Summary of changes
ContentSharingV2 export modernization
src/elements/content-sharing/ContentSharingV2.tsx
Import withBlueprintModernization and change default export to withBlueprintModernization(ContentSharingV2).
ContentSharing visual story UI update
src/elements/content-sharing/stories/tests/ContentSharingV2-visual.stories.tsx
Replace native <button> with Blueprint Button and adjust story args/usage accordingly.
Story export renames (modernization flag)
src/elements/content-explorer/stories/tests/ContentExplorer-visual.stories.js, src/elements/content-picker/stories/tests/ContentPicker-visual.stories.js, src/elements/content-preview/stories/tests/ContentPreview-visual.stories.js, src/elements/content-sidebar/stories/tests/ContentSidebar-visual.stories.tsx, src/elements/content-uploader/stories/tests/ContentUploader-visual.stories.js
Rename exported story constant from ModernizationwithModernization (no arg or behavior changes).

Sequence Diagram(s)

sequenceDiagram
    participant Story as Visual Story
    participant HOC as withBlueprintModernization (wrapper)
    participant Comp as ContentSharingV2

    Note over Story,HOC: Story imports the default export (wrapped component)
    Story->>HOC: render WrappedComponent(props)
    HOC->>Comp: inject/forward props and render
    Comp-->>HOC: UI output
    HOC-->>Story: result (rendered UI)
    Note right of HOC: HOC may alter props/flags (enableModernizedComponents)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

  • greg-in-a-box
  • reneshen0328
  • jpan-box

Poem

I hop through code with gentle cheer,
I wrap a share so it's modern, dear.
A Button blooms where plain once stood,
Stories renamed—everything's good.
Thump-thump, I push a tiny commit hood. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description provided contains only an image screenshot and the repository's template text regarding merge queue procedures and the "ready-to-merge" label. The author has not filled in any substantive explanation of the changes, their motivation, or their impact. While the description template does not mandate specific formatted sections, a meaningful PR description should convey what is being changed and why, which is entirely absent here. The description lacks any explanation of the withBlueprintModernization HOC wrapper addition to ContentSharingV2 or the rationale for renaming story constants across multiple visual test files. Add a meaningful description explaining the purpose of these changes, including why ContentSharingV2 is being wrapped with the modernization HOC, what the story constant renaming accomplishes, and any broader context about the modernization effort. This will help reviewers and future maintainers understand the intent behind the changes and how they relate to the overall modernization initiative mentioned in the title.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title succinctly captures the primary change, which is fixing the modernization hook for the ContentSharing V2 component by applying the modernization HOC. It directly aligns with the update to the default export in ContentSharingV2.tsx and omits extraneous details. The phrasing is clear and specific enough for a reviewer to understand the core purpose of the pull request.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch content-sharing-bp-modernization

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 and usage tips.

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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b39a482 and 73467b6.

📒 Files selected for processing (2)
  • src/elements/content-sharing/ContentSharingV2.tsx (2 hunks)
  • src/elements/content-sharing/stories/tests/ContentSharingV2-visual.stories.tsx (5 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/elements/content-sharing/ContentSharingV2.tsx (1)
src/elements/common/withBlueprintModernization.tsx (1)
  • withBlueprintModernization (8-24)
⏰ 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). (2)
  • GitHub Check: lint_test_build
  • GitHub Check: Summary
🔇 Additional comments (5)
src/elements/content-sharing/ContentSharingV2.tsx (2)

10-10: LGTM! Import statement is correct.

The import path and syntax are correct for bringing in the withBlueprintModernization HOC.


181-181: Verify default export usage compatibility
I didn’t find any default imports of ContentSharingV2—confirm all alias or custom import paths still resolve the wrapped component and handle its new optional enableModernizedComponents prop.

src/elements/content-sharing/stories/tests/ContentSharingV2-visual.stories.tsx (3)

4-4: LGTM! Button import is correct.

The import statement follows the documented pattern for @box/blueprint-web.


14-14: LGTM! Export rename improves clarity.

Renaming from withModernization to Modernization better reflects the story's purpose and aligns with the component's modernization approach.


36-36: LGTM! All references updated consistently.

The references to the renamed story export have been correctly updated in both play functions.

Also applies to: 56-56

@jfox-box jfox-box requested review from a team as code owners October 15, 2025 21:22
@jfox-box jfox-box changed the title fix: Fix modernization hook for ContentPickerV2 fix: Fix modernization hook for ContentSharing v2 Oct 15, 2025
@mergify mergify bot added the queued label Oct 15, 2025
@mergify mergify bot merged commit e0a67e0 into master Oct 15, 2025
12 checks passed
@mergify mergify bot deleted the content-sharing-bp-modernization branch October 15, 2025 22:44
@mergify mergify bot removed the queued label Oct 15, 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.

4 participants