Commit graph

6,020 commits

Author SHA1 Message Date
anovazzi1
d8c133b5d2 fix(market-card.tsx): update setLikes_count and setLiked_by_user with response values to correctly display likes count and user like status
The changes were made to fix a bug where the likes count and user like status were not being displayed correctly on the market card component in the StorePage. The previous code was using the wrong variable to set the likes count and user like status. The fix updates the code to use the correct response values from the API call to set the likes count and user like status.
2023-11-01 09:54:53 -03:00
Gabriel Luiz Freitas Almeida
85647091f7 🐛 fix(store.py): change return value from dictionary to UsersLikesResponse object to improve readability and maintainability
🐛 fix(service.py): handle case when component is not found and raise ValueError to provide more informative error message
2023-11-01 09:52:58 -03:00
Gabriel Luiz Freitas Almeida
68198bfd41 🐛 fix(store.py): retrieve likes count after liking a component to update the response with the latest count
 feat(schema.py): update UsersLikesResponse model to include likes_count and liked_by_user fields
 feat(service.py): add get_component_likes_count method to retrieve the number of likes for a component
2023-11-01 09:52:57 -03:00
anovazzi1
2c3199ad0b format code 2023-11-01 09:49:10 -03:00
anovazzi1
24a7b2ca8a fix(API/index.ts): add postLikeComponent function to handle liking a component and update the liked_by_user and likes_count states accordingly
fix(market-card.tsx): add handleLike function to handle liking a component and update the liked_by_user and likes_count states accordingly
fix(market-card.tsx): update the Heart icon to be filled and have a destructive color if the component is liked by the user
fix(market-card.tsx): update the number of likes to be the likes_count state
fix(StorePage/index.tsx): set setErrorApiKey to false to clear any previous API key error
feat(types/store/index.ts): add liked_by_user property to storeComponent type to indicate if the component is liked by the user
2023-11-01 09:49:10 -03:00
Gabriel Luiz Freitas Almeida
75079731c9 🐛 fix(store.py): fix indentation issue in list_components function to improve code readability
🐛 fix(service.py): remove unused user_data parameter in get_liked_by_user_components function
🐛 fix(utils.py): rename in_users_collection attribute to in_user_collection for consistency
2023-11-01 09:45:42 -03:00
Gabriel Luiz Freitas Almeida
0339072079 🐛 fix(store.py): add missing import for user_data_context and update_components_with_user_data functions
 feat(store.py): add support for user_data_context context manager to fetch and set user data for requests made inside the context
 feat(store.py): add support for in_user_collection attribute in ListComponentResponse schema to indicate if a component is in the user's collection
🐛 fix(store.py): fix get_liked_by_user_components function to use user_data_var context variable instead of making the request multiple times
🐛 fix(store.py): fix get_components_in_users_collection function to use user_data_var context variable instead of making the request multiple times
 feat(store.py): add update_components_with_user_data function to update components with user data (liked_by_user and in_users_collection attributes)
2023-11-01 09:31:50 -03:00
cristhianzl
6799007514 Merge branch 'feature/store' of github.com:logspace-ai/langflow into feature/store 2023-11-01 09:12:01 -03:00
Gabriel Luiz Freitas Almeida
7fc4d54055 🐛 fix(store.py): change type of store_api_Key parameter from str to Optional[str] to handle case when user does not provide an API key 2023-11-01 09:04:46 -03:00
Gabriel Luiz Freitas Almeida
04b047a823 🐛 fix(store.py): fix indentation issue and remove unnecessary comments
🐛 fix(schema.py): remove default value for liked_by_user attribute in ListComponentResponse

The indentation issue in `store.py` was causing the code to execute the wrong logic. The unnecessary comments were removed to improve code readability.

In `schema.py`, the default value for the `liked_by_user` attribute in the `ListComponentResponse` class was removed to ensure that it is only set when needed.
2023-11-01 08:58:21 -03:00
cristhianzl
7a9b972fb5 feat(API): add support for filtering store components by is_component flag in getStoreComponents function
feat(StorePage): add support for filtering components by type (Flow or Component) in handleGetComponents and handleChangePagination functions
2023-10-31 20:08:27 -03:00
Gabriel Luiz Freitas Almeida
0c728ea58e 🐛 fix(store.py): return result without modification if store_api_Key is not provided to prevent potential errors 2023-10-31 19:59:02 -03:00
Gabriel Luiz Freitas Almeida
e64d0fcf03 🔧 fix(store.py): set liked_by_user flag to True for components liked by the user
🔧 fix(schema.py): add liked_by_user field to ListComponentResponse schema
🔧 fix(service.py): add get_liked_by_user_components method to StoreService to retrieve liked components by user
2023-10-31 19:58:10 -03:00
Gabriel Luiz Freitas Almeida
d7e2d43409 🐛 fix(service.py): import and use process_tags_for_post function to correctly process tags for post request
 feat(utils.py): add process_tags_for_post function to handle processing of tags for post request
2023-10-31 10:44:57 -03:00
cristhianzl
02c58211cf Merge branch 'feature/store' of github.com:logspace-ai/langflow into feature/store 2023-10-30 22:42:05 -03:00
cristhianzl
a7120259e0 fix(API/index.ts): change parameter types in searchComponent function to allow null values for query, page, limit, status, and tags
refactor(StorePage/index.tsx): rename filteredCategories state variable to filteredTags for better semantics
feat(StorePage/index.tsx): add functionality to filter components by tags and update search results accordingly
2023-10-30 22:41:58 -03:00
Gabriel Luiz Freitas Almeida
0f442ddb2d 🐛 fix(market-card.tsx): fix typo in button text to display "Install Locally" instead of "Install Localy" for better readability and consistency 2023-10-30 21:31:36 -03:00
cristhianzl
344d3f9888 Merge branch 'feature/store' of github.com:logspace-ai/langflow into feature/store 2023-10-30 21:15:28 -03:00
cristhianzl
06595c2f16 fix(saved-components): remove unused variables and pagination component
fix(market-card): refactor totalComponentsMetadata function to improve readability
fix(StorePage): remove unused import and add logic to handle pagination rendering based on search and loading status
2023-10-30 21:15:19 -03:00
Gabriel Luiz Freitas Almeida
79bd78613b 🔥 refactor(service.py): remove redundant assignment to params["fields"] in StoreService class 2023-10-30 20:57:21 -03:00
Gabriel Luiz Freitas Almeida
5ebd298463 🔥 refactor(service.py): remove unnecessary code that pops "page" and "limit" parameters from params dictionary
The code was removing "page" and "limit" parameters from the params dictionary, but these parameters were not being used afterwards. Removing this unnecessary code improves code readability and maintainability.
2023-10-30 20:42:33 -03:00
Gabriel Luiz Freitas Almeida
127721e986 🐛 fix(schema.py): handle empty list case in tags_to_list method to prevent potential errors
🐛 fix(service.py): add validation for missing API key when filter_by_user is True to avoid unauthorized access
2023-10-30 19:50:39 -03:00
cristhianzl
5f2bfba9e3 Merge branch 'feature/store' of github.com:logspace-ai/langflow into feature/store 2023-10-30 15:04:18 -03:00
cristhianzl
f17d95f246 refactor(StorePage): remove unnecessary code and update placeholder text in Select component
The code in the Select component was unnecessarily filtering the data based on the selected value. This logic was removed as it was not needed. Additionally, the placeholder text in the Select component was updated from "Flows" to "Both" to better reflect the options available.
2023-10-30 15:04:11 -03:00
anovazzi1
79894fd78e chore(StorePage/index.tsx): remove unused code to improve code readability and maintainability 2023-10-30 14:58:53 -03:00
anovazzi1
125d5c5152 chore(stackedComponents): update transform value in ElementStack component to improve visual positioning
refactor(market-card): remove unused code and console.log statements

fix(market-card): update saveFlowStore function to pass an array of tag ids instead of tag names

refactor(market-card): sort tags in ascending order of name length in the MarketCardComponent

refactor(market-card): update tag rendering in MarketCardComponent to use tag names instead of tag objects

refactor(market-card): remove commented out code and unused imports

refactor(market-card): update tag rendering in ShadTooltip component to use tag names instead of tag objects

refactor(market-card): update tag rendering in Button component to use tag names instead of tag objects

refactor(market-card): remove commented out code and unused imports

refactor(store/index): update tags property in storeComponent type to be an array of objects with id and name properties
2023-10-30 14:53:10 -03:00
Gabriel Luiz Freitas Almeida
bf775eaaad 🔍 chore(store.py): add support for filtering by is_component parameter in search_endpoint function
🔍 chore(service.py): add support for filtering by is_component parameter in StoreService class
2023-10-30 11:17:22 -03:00
anovazzi1
8e032b930b fix(StorePage): set errorApiKey to true when there is an error fetching data to display an error message to the user 2023-10-28 17:31:10 -03:00
Gabriel Luiz Freitas Almeida
07e8e318ee 🔥 refactor(store.py): remove unused code for creating component metadata
The code was previously responsible for creating metadata for a component based on the nodes it contains. However, this functionality is no longer needed and has been removed to simplify the code and improve maintainability.
2023-10-27 19:52:56 -03:00
anovazzi1
b0492f3adc refactor(stackedComponents): change grid columns to 1 to improve layout
refactor(market-card): remove unnecessary blur effect and add opacity on hover to improve visual feedback
refactor(market-card): add condition to prevent adding to cart while loading to prevent multiple requests
2023-10-27 18:07:12 -03:00
anovazzi1
664c5c4ffb fix(market-card.tsx): change tooltip side from top to right for better visibility and alignment
fix(market-card.tsx): add hover effect to the container div to indicate interactivity
2023-10-27 17:59:55 -03:00
anovazzi1
2911f8751a refactor(stackedComponents): update ElementStack component to use CSS grid for layout instead of flexbox
fix(market-card.tsx): fix variable name in MarketCardComponent to correctly display tags in ElementStack component
2023-10-27 17:56:23 -03:00
anovazzi1
695f219460 fix(storeContext.tsx): change hasStore initial value to true to reflect correct initial state
fix(API/index.ts): update API endpoint for checkHasStore function to match backend route
feat(StorePage/index.tsx): add functionality to fetch and display store tags from backend
2023-10-27 17:36:49 -03:00
Gabriel Luiz Freitas Almeida
01a1484e43 🐛 fix(Makefile): kill existing process running on port 3000 before starting frontend to prevent conflicts
🐛 fix(Makefile): kill existing process running on port 7860 before starting backend to prevent conflicts
2023-10-27 16:28:54 -03:00
Gabriel Luiz Freitas Almeida
7b946cef70 🔀 refactor(store.py): rename route from "/" to "/check" to improve clarity and specificity 2023-10-27 16:28:53 -03:00
anovazzi1
9a7def7c48 feat(extraSidebarComponent): add import statement for getTagsIds function from storeUtils
The import statement for the `getTagsIds` function from `storeUtils` was added to the `extraSidebarComponent` file. This function is used to retrieve the IDs of tags based on their names.

fix(extraSidebarComponent): remove duplicate getTagsIds function

The duplicate `getTagsIds` function in the `extraSidebarComponent` file was removed to avoid conflicts and improve code organization.

feat(extraSidebarComponent): update saveFlowStore function call to use getTagsIds function

The `saveFlowStore` function call in the `extraSidebarComponent` file was updated to use the `getTagsIds` function instead of directly passing the selected tags array. This change ensures that the IDs of the selected tags are used in the function call.

feat(nodeToolbarComponent): add import statement for getTagsIds function from storeUtils

The import statement for the `getTagsIds` function from `storeUtils` was added to the `nodeToolbarComponent` file. This function is used to retrieve the IDs of tags based on their names.

fix(nodeToolbarComponent): remove duplicate getTagsIds function

The duplicate `getTagsIds` function in the `nodeToolbarComponent` file was removed to avoid conflicts and improve code organization.

feat(nodeToolbarComponent): update saveFlowStore function call to use getTagsIds function

The `saveFlowStore` function call in the `nodeToolbarComponent` file was updated to use the `getTagsIds` function instead of directly passing the selected tags array. This change ensures that the IDs of the selected tags are used in the function call.

feat(storeUtils): add getTagsIds function

The `getTagsIds` function was added to the `storeUtils` file. This function takes an array of tag names and a reference to the tag list with IDs, and returns an array of tag IDs based on the names. This function is used in the `extraSidebarComponent` and `nodeToolbarComponent` files to retrieve the IDs of selected tags.
2023-10-27 16:25:37 -03:00
anovazzi1
761bbc5fd0 code format 2023-10-27 16:21:56 -03:00
anovazzi1
1d57800892 feat(API): add new function getStoreTags to fetch store tags from API
fix(extraSidebarComponent): fix saveFlowStore function call to pass tag ids instead of tag names for selected tags
2023-10-27 16:21:09 -03:00
anovazzi1
cb03095860 feat(stackedComponents): add ElementStack component to create a stacked effect for child components
fix(market-card): refactor tagsPopUp to use ElementStack component for a stacked effect
2023-10-27 15:55:03 -03:00
anovazzi1
278e48c1a8 chore(market-card.tsx): add missing type declaration for tagsPopUp useRef
feat(market-card.tsx): add tooltip with tags information to the MarketCardComponent
2023-10-27 15:55:03 -03:00
Gabriel Luiz Freitas Almeida
e621243288 🔧 refactor(store.py): modify create_component function to include total count of each type in the metadata dictionary
The `create_component` function in `store.py` has been modified to include the total count of each type in the metadata dictionary. This change improves the structure of the metadata and provides more comprehensive information about the types and their counts in the nodes.
2023-10-27 14:04:15 -03:00
Gabriel Luiz Freitas Almeida
6f3172bc33 🔧 refactor(store.py): remove duplicate fields list and use default_fields from StoreService class
🔧 refactor(service.py): move default_fields list to StoreService class and use it in query_components method
2023-10-27 13:07:09 -03:00
Gabriel Luiz Freitas Almeida
bfc74367b5 🔧 fix(store.py): modify metadata structure to include count for each name and total count to improve data analysis capabilities 2023-10-27 13:03:27 -03:00
Gabriel Luiz Freitas Almeida
4016c28573 🔧 fix(store.py): add metadata to component before uploading to improve data integrity and analysis capabilities 2023-10-27 11:43:12 -03:00
Gabriel Luiz Freitas Almeida
5716ca21dc 🔧 fix(store.py): import missing module 'langflow.api' to resolve NameError
🔧 fix(store.py): add missing metadata comment to clarify the purpose of the code block
 feat(store.py): add 'has_api_key' field to the response of 'check_if_store_is_enabled' endpoint to indicate if the user has an API key
🔧 fix(store.py): add missing metadata using the Component.data in the 'create_component' endpoint to properly handle component metadata
2023-10-27 11:37:54 -03:00
Gabriel Luiz Freitas Almeida
dfabb80567 🐛 fix(schema.py): fix the transformation of tags in ListComponentResponse to return a list of TagResponse objects
🔥 chore(service.py): remove unnecessary code that flattens the tags in ListComponentResponse
2023-10-27 11:05:02 -03:00
Gabriel Luiz Freitas Almeida
f69917f4b0 🔥 refactor(store.py): remove unnecessary "user_created.id" field from list_components function
🔥 refactor(service.py): remove unnecessary "user_created.id" field from StoreService class
2023-10-27 10:32:33 -03:00
anovazzi1
acb957fadf fix(market-card.tsx): remove unnecessary code related to Badge component
feat(index.tsx): add tags state and fetch tags from API to display as badges in the StorePage
2023-10-27 09:19:18 -03:00
anovazzi1
6b4c964d20 fix(nodeToolbarComponent): fix saveFlowStore function call to include selectedTags and sharePublic parameters 2023-10-27 08:55:18 -03:00
anovazzi1
b97c25d3c7 fix(extraSidebarComponent): remove unnecessary dependency from useEffect hook
feat(extraSidebarComponent): add support for tags selection in the extra sidebar component
fix(nodeToolbarComponent): add missing import statements for new components
feat(nodeToolbarComponent): add support for tags selection and public/private toggle in the node toolbar component
2023-10-27 08:52:50 -03:00