-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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 dynamic metadata to components + search on sidebar #3945
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
… information for the component node
…list to include additional metadata information for nodes in the application.
…ictionary if the value is of type dict, otherwise return an empty dictionary. Update ATTR_FUNC_MAPPING to include the new function for the "metadata" attribute.
…ion to improve code readability and maintainability 🐛 (extraSidebarComponent/index.tsx): fix searchInMetadata function to correctly handle nested objects in metadata for search functionality
dosubot
bot
added
size:L
This PR changes 100-499 lines, ignoring generated files.
enhancement
New feature or request
labels
Sep 27, 2024
github-actions
bot
added
enhancement
New feature or request
and removed
enhancement
New feature or request
labels
Sep 27, 2024
Cristhianzl
requested review from
italojohnny and
ogabrielluiz
and removed request for
ogabrielluiz
September 27, 2024 13:15
italojohnny
approved these changes
Sep 27, 2024
ogabrielluiz
requested changes
Sep 27, 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.
You just need to add the _metadata
attribute to the Component
class. It has to have the _
before because it should be a private attribute. In another PR we can implement the code to extract it and add it to the frontend node
…o include it in the configuration attributes
ogabrielluiz
approved these changes
Sep 27, 2024
diogocabral
pushed a commit
to headlinevc/langflow
that referenced
this pull request
Nov 26, 2024
…w-ai#3945) * ✨ (frontend_node/base.py): add metadata attribute to store additional information for the component node * ✨ (constants.py): add 'metadata' attribute to NODE_FORMAT_ATTRIBUTES list to include additional metadata information for nodes in the application. * 📝 (attributes.py): add new function getattr_return_dict to return a dictionary if the value is of type dict, otherwise return an empty dictionary. Update ATTR_FUNC_MAPPING to include the new function for the "metadata" attribute. * update basic examples * 📝 (extraSidebarComponent/index.tsx): refactor handleSearchInput function to improve code readability and maintainability 🐛 (extraSidebarComponent/index.tsx): fix searchInMetadata function to correctly handle nested objects in metadata for search functionality * 📝 (component.py): add _metadata attribute to CONFIG_ATTRIBUTES list to include it in the configuration attributes
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:L
This PR changes 100-499 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 PR introduces two major enhancements:
Dynamic Metadata for Components:
Components now support dynamic metadata, enabling more flexible data management and configuration. This allows each component to have its own metadata attributes that can be updated or modified based on context or usage.
Search Functionality in Sidebar:
A search feature has been added to the sidebar, improving the user experience by allowing quick and easy navigation through components. Users can now find components more efficiently through this search capability.