-
Notifications
You must be signed in to change notification settings - Fork 345
fix: Fix modernization hook for ContentSharing v2 #4339
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
Conversation
WalkthroughWraps ContentSharingV2’s default export with withBlueprintModernization, replaces a native 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)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 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
withBlueprintModernizationHOC.
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 optionalenableModernizedComponentsprop.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
withModernizationtoModernizationbetter 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
Summary by CodeRabbit