Skip to content

fix(Remote): fix modal has no buttons when opened from header#2172

Merged
ins0 merged 1 commit intomainfrom
fix-modal-in-header
Dec 4, 2025
Merged

fix(Remote): fix modal has no buttons when opened from header#2172
ins0 merged 1 commit intomainfrom
fix-modal-in-header

Conversation

@mfal
Copy link
Copy Markdown
Member

@mfal mfal commented Dec 3, 2025

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 3, 2025

Coverage Report for ./packages/components/

Status Category Percentage Covered / Total
🔵 Lines 69.38% 306 / 441
🔵 Statements 69.79% 312 / 447
🔵 Functions 65.62% 63 / 96
🔵 Branches 56.27% 130 / 231
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/components/src/components/ClearPropsContext/index.ts 100% 100% 100% 100%
packages/components/src/components/ClearPropsContext/view.ts 100% 100% 100% 100%
packages/components/src/lib/componentFactory/flowComponent.tsx 0% 0% 0% 0% 61-146
packages/components/src/lib/propsContext/components/ClearPropsContext.tsx 33.33% 100% 0% 33.33% 8-9
packages/components/src/views/ClearPropsContextView.tsx 50% 0% 0% 50% 11-13
Generated in workflow #4105 for commit 6504b8f by the Vitest Coverage Report Action

@mfal mfal requested review from Copilot and ins0 December 4, 2025 07:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where modals opened from the header had no buttons by properly implementing the ClearPropsContext component for remote rendering. The fix moves ClearPropsContext from the internal flow components map to the auto-generated components registry and adds proper wrapping logic to differentiate between remote and non-remote component rendering.

Key changes:

  • Migrated ClearPropsContext from manual registration to auto-generated registration across remote packages
  • Updated flowComponent to conditionally wrap UI components based on whether they are remote components
  • Added a test case demonstrating a modal with buttons opened from a header in the context menu demo

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/remote-react-renderer/src/components.ts Removed manual registration of flr-clear-props-context from flow components map
packages/remote-react-renderer/src/auto-generated/index.ts Added auto-generated registration for ClearPropsContext component
packages/remote-react-components/src/auto-generated/index.ts Added export for auto-generated ClearPropsContext
packages/remote-react-components/src/auto-generated/ClearPropsContext.ts Created auto-generated remote React component for ClearPropsContext
packages/remote-elements/src/auto-generated/index.ts Added export for RemoteClearPropsContextElement
packages/remote-elements/src/auto-generated/RemoteClearPropsContextElement.ts Created auto-generated custom element definition for ClearPropsContext
packages/components/src/views/ClearPropsContextView.tsx Created auto-generated view component for ClearPropsContext
packages/components/src/lib/propsContext/components/ClearPropsContext.tsx Added props type export and generation directive for ClearPropsContext
packages/components/src/lib/componentFactory/flowComponent.tsx Updated wrapping logic to differentiate between remote and non-remote UI components
packages/components/src/components/ClearPropsContext/view.ts Added TypeScript declarations for ClearPropsContext view component
packages/components/src/components/ClearPropsContext/index.ts Added export for view module
apps/remote-dom-demo/src/app/remote/context-menu/page.tsx Added test case with modal containing buttons in header

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ins0 ins0 merged commit 5e2404f into main Dec 4, 2025
4 checks passed
@ins0 ins0 deleted the fix-modal-in-header branch December 4, 2025 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants