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

feat: add dynamic metadata to components + search on sidebar #3945

Merged
merged 7 commits into from
Sep 27, 2024

Conversation

Cristhianzl
Copy link
Collaborator

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.

…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
@Cristhianzl Cristhianzl self-assigned this Sep 27, 2024
@dosubot 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 github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Sep 27, 2024
@Cristhianzl Cristhianzl requested review from italojohnny and ogabrielluiz and removed request for ogabrielluiz September 27, 2024 13:15
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 27, 2024
Copy link
Contributor

@ogabrielluiz ogabrielluiz left a 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

@Cristhianzl Cristhianzl merged commit 3ddd123 into main Sep 27, 2024
28 checks passed
@Cristhianzl Cristhianzl deleted the cz/metadata branch September 27, 2024 15:19
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants