-
Notifications
You must be signed in to change notification settings - Fork 59
Fix helper pane overflow issue in popup #912
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
Fix helper pane overflow issue in popup #912
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis pull request introduces multi-project workspace support across the Ballerina extension ecosystem. Key changes include new workspace-aware interfaces (ProjectStructure, ProjectInfo, ProjectStructureResponse), a complete CodeMirror-based expression editor replacement, refactored AI code generation to handle multiple projects, and view hierarchy changes (Overview → PackageOverview, WorkspaceOverview). Support is added for workspace-level project metadata, dependency pull progress notifications, and project-specific migration reports. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Visualizer as Visualizer UI
participant StateMachine as State Machine
participant RPC as RPC Layer
participant LSP as Language Server
User->>Visualizer: Open Ballerina Workspace
Visualizer->>StateMachine: Initialize Context
StateMachine->>RPC: checkForProjects()
RPC->>LSP: Detect workspace/project structure
LSP-->>RPC: ProjectMetadata
RPC-->>StateMachine: ProjectMetadata (projectPath optional)
alt Is Workspace
StateMachine->>RPC: fetchProjectInfo(projectPath)
RPC->>LSP: getProjectInfo(ProjectInfoRequest)
LSP-->>RPC: ProjectInfo {projectKind: WORKSPACE_PROJECT, children[]}
RPC-->>StateMachine: ProjectInfo
StateMachine->>RPC: buildProjectsStructure(projectInfo)
RPC-->>StateMachine: ProjectStructureResponse {projects[]}
StateMachine->>Visualizer: Render WorkspaceOverview
else Is Package
StateMachine->>RPC: buildProjectsStructure(projectInfo)
RPC-->>StateMachine: ProjectStructureResponse
StateMachine->>Visualizer: Render PackageOverview
end
Visualizer->>Visualizer: Display Project/Workspace View
sequenceDiagram
participant Editor as Expression Editor
participant CodeMirror as CodeMirror
participant HelperPane as Helper Pane
participant LSP as Language Server
Editor->>CodeMirror: Initialize with ChipExpressionEditorComponent
CodeMirror->>CodeMirror: Apply chipPlugin, tokenField, completionPlugin
Editor->>Editor: User focuses editor
Editor->>LSP: buildOnFocusListner triggered
LSP-->>Editor: Compute cursor position (bounded to container)
Editor->>HelperPane: Position within editor bounds
Editor->>CodeMirror: User types/selects
CodeMirror->>Editor: Emit onChange with value
Editor->>LSP: Fetch completions/diagnostics
LSP-->>Editor: CompletionItems, Diagnostics
CodeMirror->>CodeMirror: Render autocompletion overlay (bounded)
Editor->>Editor: User selects completion
CodeMirror->>CodeMirror: Apply token decoration
Editor->>Editor: Update internal token state
Editor->>HelperPane: Sync helper pane (if open)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Areas requiring extra attention:
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (107)
⛔ Files not processed due to max files limit (6)
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 |
Purpose
This PR resolves a UI overflow issue in the Expression Editor where the helper pane extends outside the editor’s popup container.
Previously, the helper pane position was calculated relative to the window, causing it to overflow when the editor was rendered inside a constrained popup.
This fix ensures the helper pane remains fully visible within the editor boundary.
_Resolves: wso2/product-ballerina-integrator#1890
Goals
Approach
window.innerWidth.Summary by CodeRabbit
New Features
Chores