fix(Remote): fix modal has no buttons when opened from header#2172
Merged
Conversation
Contributor
Coverage Report for ./packages/components/
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
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
ClearPropsContextfrom manual registration to auto-generated registration across remote packages - Updated
flowComponentto 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.
694ee0d to
6504b8f
Compare
ins0
approved these changes
Dec 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.