-
Notifications
You must be signed in to change notification settings - Fork 4.1k
chore: UI Module instances support broken references in widgets entity explorer #40390
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
WalkthroughThis change introduces a new React component, Changes
Sequence Diagram(s)sequenceDiagram
participant UIEntityListTree
participant OrphanUIModuleInstancesEntityList
participant EntityListTree
participant WidgetTreeItem
participant EntityItem
UIEntityListTree->>OrphanUIModuleInstancesEntityList: Render (returns null in CE)
UIEntityListTree->>EntityListTree: Render with widget items (including hasError)
EntityListTree->>WidgetTreeItem: Render each widget (with hasError)
WidgetTreeItem->>EntityItem: Pass hasError prop
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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: 0
🧹 Nitpick comments (1)
app/client/src/ce/pages/AppIDE/components/UIEntityListTree/OrphanUIModuleInstancesEntityList.tsx (1)
1-15
: Well-documented placeholder for orphan UI module instancesThe component is well-documented with clear JSDoc comments explaining its purpose. The current implementation returns null, which is appropriate for a base CE implementation that will be extended in EE.
Consider adding PropTypes or TypeScript interface for future props this component might accept, even though it currently doesn't use any.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
app/client/src/ce/pages/AppIDE/components/UIEntityListTree/OrphanUIModuleInstancesEntityList.tsx
(1 hunks)app/client/src/ee/pages/AppIDE/components/UIEntityListTree/OrphanUIModuleInstancesEntityList.tsx
(1 hunks)app/client/src/pages/AppIDE/components/UIEntityListTree/UIEntityListTree.tsx
(2 hunks)app/client/src/pages/AppIDE/components/UIEntityListTree/WidgetTreeItem.tsx
(1 hunks)app/client/src/reducers/uiReducers/pageCanvasStructureReducer.ts
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: client-lint / client-lint
- GitHub Check: client-build / client-build
- GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
- GitHub Check: client-prettier / prettier-check
🔇 Additional comments (6)
app/client/src/reducers/uiReducers/pageCanvasStructureReducer.ts (1)
16-16
: Addition of hasError property is appropriate for error trackingThis optional boolean property aligns with the PR objective to support error indication for widgets in the tree view. The change is minimal and maintains backward compatibility by making it optional.
app/client/src/pages/AppIDE/components/UIEntityListTree/WidgetTreeItem.tsx (1)
96-96
: Correctly propagates hasError to EntityItemThe component now properly forwards the error state to the EntityItem component, enabling visual error indication in the UI tree.
app/client/src/ee/pages/AppIDE/components/UIEntityListTree/OrphanUIModuleInstancesEntityList.tsx (1)
1-2
: Standard re-export pattern for EE extensionThis follows the established pattern for CE/EE code separation, allowing for potential EE-specific extensions of this component.
app/client/src/pages/AppIDE/components/UIEntityListTree/UIEntityListTree.tsx (3)
9-9
: Import added for orphaned UI module instances component.The new import includes the OrphanUIModuleInstancesEntityList component from the enterprise edition, which will be used to display UI module instances not present on the canvas.
22-22
: Added hasError property to widget tree items.This property will be used to indicate error states in the widget tree, allowing visual error indication for widgets with broken references or other issues.
26-33
: Updated component rendering to include orphaned UI modules.The return statement now wraps content in a React fragment and renders both the original EntityListTree component and the new OrphanUIModuleInstancesEntityList component. This structure maintains the existing widget tree functionality while adding support for displaying orphaned UI module instances.
Description
Changes for https://github.com/appsmithorg/appsmith-ee/pull/7274
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/14682236408
Commit: b65ec15
Cypress dashboard.
Tags:
@tag.All
Spec:
Sat, 26 Apr 2025 15:49:15 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
Enhancements