Skip to content
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

[Feature Request] Implement Preview Feature for Custom Components in Langflow #1863

Open
yamonkjd opened this issue May 8, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@yamonkjd
Copy link
Contributor

yamonkjd commented May 8, 2024

Reasons for Suggestion:

Implementing a preview feature for custom components in Langflow is crucial for enhancing the development process by allowing creators to verify component compatibility and correct mapping with supported types more efficiently. Currently, developers often repeat simple checks to confirm if the component behaves as expected with predefined fields and values. This feature aims to reduce complexity and the potential for errors by providing a straightforward preview that does not reflect pre-filled field values, simplifying the validation of component functionality.

Content of the Proposal:

The proposal is to introduce a simple preview feature in the side menu for custom components in Langflow. This preview should not account for predefined field values but should allow developers to instantly see how the component functions with default or empty states. It would help verify the mapping and compatibility with Langflow-supported types without the interference of pre-filled data, making it easier to identify issues or necessary adjustments.

Technical Considerations:

  • Implement a side-panel preview that updates in real-time, showing the basic functionality of the custom component without the influence of any pre-inserted values.
  • Ensure the preview is isolated from the main environment to prevent erroneous data handling or application behavior.
  • The preview feature should be designed to handle various data types and default settings seamlessly.

Potential Use Cases:

  • Developers can rapidly assess and refine components without the need to manually simulate conditions for each test scenario.(Like dynamicfield)
  • Enhances the accuracy of development by providing a clear and immediate visual feedback on component compatibility and functionality.
  • Facilitates quicker iterations and debugging, particularly for new users or complex components.

image

@dosubot dosubot bot added the enhancement New feature or request label May 8, 2024
@yamonkjd
Copy link
Contributor Author

yamonkjd commented May 8, 2024

Since the Code type field in Langflow has the same UI, it can sometimes be confusing whether it's the Code type or the custom component's own Code being modified. If such a feature exists, modern modifications similar to Flutter or Xcode would be possible, making UI element debugging more manageable.

@ogabrielluiz
Copy link
Contributor

This would be REALLY cool!

@ogabrielluiz
Copy link
Contributor

@anovazzi1 @lucaseduoli @Cristhianzl @igorrCarvalho

Check this out. How hard would this be?

@anovazzi1
Copy link
Contributor

that's awesome, i think it's not easy, but it's not too hard either

@10hith
Copy link

10hith commented May 11, 2024

Agree, this is very much required. Cannot be restarting the front end to test everytime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants