-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
feat: Add PlaygroundButton component to flow toolbar #4712
Merged
Merged
Conversation
This file contains 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
dosubot
bot
added
the
size:M
This PR changes 30-99 lines, ignoring generated files.
label
Nov 19, 2024
Cristhianzl
requested review from
anovazzi1 and
lucaseduoli
and removed request for
anovazzi1
November 19, 2024 16:55
dosubot
bot
added
bug
Something isn't working
enhancement
New feature or request
labels
Nov 19, 2024
github-actions
bot
added
enhancement
New feature or request
and removed
enhancement
New feature or request
bug
Something isn't working
labels
Nov 19, 2024
lucaseduoli
approved these changes
Nov 19, 2024
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.
LGTM
ogabrielluiz
force-pushed
the
cz/fix-playground-icon
branch
from
November 19, 2024 20:08
52aaa3d
to
1178e8d
Compare
anovazzi1
approved these changes
Nov 19, 2024
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.
lgtm
ogabrielluiz
force-pushed
the
cz/fix-playground-icon
branch
2 times, most recently
from
November 22, 2024 03:15
4c75ec2
to
54d6121
Compare
…e flowToolbarComponent to handle the display of the Playground button based on the presence of Chat Input or Chat Output components. 📝 (index.tsx): Import and use the PlaygroundButton component in the FlowToolbar component to replace the previous implementation of the Playground button display. 🔧 (applies.css): Add styling for the playground-btn-flow-toolbar class to ensure consistent styling for the Playground button in the toolbar.
… the newModal file instead of the old one
ogabrielluiz
force-pushed
the
cz/fix-playground-icon
branch
from
November 22, 2024 15:16
1753d07
to
8aa2660
Compare
diogocabral
pushed a commit
to headlinevc/langflow
that referenced
this pull request
Nov 26, 2024
* ✨ (playground-button.tsx): Add a new PlaygroundButton component to the flowToolbarComponent to handle the display of the Playground button based on the presence of Chat Input or Chat Output components. 📝 (index.tsx): Import and use the PlaygroundButton component in the FlowToolbar component to replace the previous implementation of the Playground button display. 🔧 (applies.css): Add styling for the playground-btn-flow-toolbar class to ensure consistent styling for the Playground button in the toolbar. * 📝 (playground-button.tsx): update import path for IOModal to point to the newModal file instead of the old one
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
lgtm
This PR has been approved by a maintainer
size:M
This PR changes 30-99 lines, ignoring generated files.
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.
This pull request introduces a new
PlaygroundButton
component to the flow toolbar in the frontend. ThePlaygroundButton
component replaces the existing logic for displaying the playground button, providing a cleaner and more modular implementation.This PR also fixes a bug in which the icon on Playground was the old one when we didn't have ChatInput or ChatOutput on Canvas.
Key changes include:
New Component Addition:
PlaygroundButton
component insrc/frontend/src/components/flowToolbarComponent/components/playground-button.tsx
. This component handles the display logic for the playground button, including active and disabled states.Integration with Flow Toolbar:
FlowToolbar
component insrc/frontend/src/components/flowToolbarComponent/index.tsx
to use the newPlaygroundButton
component instead of directly embedding the button logic. [1] [2]Styling Adjustments:
.playground-btn-flow-toolbar
tosrc/frontend/src/style/applies.css
to style the playground button within the toolbar.