This repository was archived by the owner on Feb 26, 2026. It is now read-only.
feat: Modify canvas opening and collapse behavior#340
Open
Mohammed (Mohaddz) wants to merge 1 commit intolangchain-ai:mainfrom
Open
feat: Modify canvas opening and collapse behavior#340Mohammed (Mohaddz) wants to merge 1 commit intolangchain-ai:mainfrom
Mohammed (Mohaddz) wants to merge 1 commit intolangchain-ai:mainfrom
Conversation
Implements two main changes to the canvas functionality:
1. Conditional Canvas Opening:
- The canvas panel now only opens if you have started a chat AND the currently active artifact is of type 'code' or 'text' (markdown).
- This prevents the canvas from appearing for other artifact types or when no relevant file is being worked on.
2. Explicit Canvas Collapse/Expand:
- A new state `isCanvasPanelCollapsed` is added to the `CanvasComponent`.
- A collapse/expand button is added to the `ArtifactHeader`. This button toggles the `isCanvasPanelCollapsed` state.
- If the canvas panel is collapsed, it and its resizable handle are hidden.
- The chat panel dynamically adjusts its size:
- If the canvas is collapsed, the chat panel expands to take the full width.
- If the chat is collapsed, the canvas panel expands to take the full width.
These changes provide you with more control over the canvas visibility and ensure it's only present when relevant.
|
google-labs-jules[bot] is attempting to deploy a commit to the LangChain Team on Vercel. A member of the Team first needs to authorize it. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Implements two main changes to the canvas functionality:
Conditional Canvas Opening:
Explicit Canvas Collapse/Expand:
isCanvasPanelCollapsedis added to theCanvasComponent.ArtifactHeader. This button toggles theisCanvasPanelCollapsedstate.These changes provide you with more control over the canvas visibility and ensure it's only present when relevant.