Commit graph

2,427 commits

Author SHA1 Message Date
cristhianzl
4b8349d131 fix(baseModal): add "smaller-h-full" size option to improve modal size flexibility
fix(exportModal): update size prop of BaseModal to "smaller-h-full" to match the new size option
2023-11-03 10:21:08 -03:00
cristhianzl
dd63dadd51 fix(extraSidebarComponent): remove unnecessary export functionality and update tooltip content to "Import" for clarity
The export functionality was removed from the ExtraSidebar component as it was not being used. The tooltip content for the button was also updated to "Import" to accurately reflect its purpose.
2023-11-02 17:28:47 -03:00
cristhianzl
805ee58254 fix(tagsSelectorComponent): reduce the gap between tags in the TagsSelector component for better visual alignment
fix(ConfirmationModal): add top margin to the confirmation button in the ConfirmationModal component to improve spacing

fix(extraSidebarComponent): change the size prop value of the ShareFlowButton component to "small-h-full" for better visual alignment

fix(extraSidebarComponent): add cursor pointer and click event to the text indicating the sharing status in the ShareFlowButton component to toggle the sharePublic state

fix(extraSidebarComponent): reduce the gap between elements in the ConfirmationModal content for better visual alignment

fix(extraSidebarComponent): change the className of the ExportModal button to "extra-side-bar-buttons" and add an onClick event to trigger the uploadFlow function

fix(extraSidebarComponent): change the className of the ExportModal button to "extra-side-bar-buttons" and add an onClick event to trigger the uploadFlow function

fix(extraSidebarComponent): change the className of the Save button in the ExtraSidebar component to "extra-side-bar-buttons" and add an onClick event to trigger the saveFlow function

fix(StorePage): remove console.log statement in the StorePage component

fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class

fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class

fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class

fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class

fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class

fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class

fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class

fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class

fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class

fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class

fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class

fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class

fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class

fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class
2023-11-02 17:24:35 -03:00
cristhianzl
b3bb568526 feat(storeContext.tsx): add hasApiKey state and setHasApiKey function to storeContext to track if API key is present
fix(StorePage/index.tsx): fix useEffect dependencies and add missing handleChangeTab function
fix(API/index.ts): rename getNumberOfComponents function to getCountComponents to improve semantics
2023-11-02 09:57:03 -03:00
Lucas Oliveira
fad72c6e2c Added new folder on My Collection 2023-11-02 00:58:46 -03:00
Lucas Oliveira
8f2ca05055 Fixed spacing 2023-11-02 00:50:01 -03:00
Lucas Oliveira
843244604d Results and order by design implemented 2023-11-02 00:40:20 -03:00
Lucas Oliveira
b59adffa27 Fixed dropdowns and spacing 2023-11-02 00:28:34 -03:00
Lucas Oliveira
0c7c50b474 Badge design changed 2023-11-02 00:08:20 -03:00
Lucas Oliveira
7f9d28c4e1 Fixed market card design 2023-11-01 23:30:33 -03:00
Lucas Oliveira
fe9ce486d4 Modularized Card Wrap and fixed name of pages 2023-11-01 21:27:06 -03:00
anovazzi1
c581a958e3 null handling 2023-11-01 10:19:44 -03:00
anovazzi1
4310229c2f fix(market-card.tsx): fix logic for updating likes_count and liked_by_user state variables
The logic for updating the `likes_count` and `liked_by_user` state variables in the `handleLike` function was incorrect. This commit fixes the logic to correctly update the state variables based on the previous values. Additionally, it adds error handling for the `postLikeComponent` API call and sets the `likes_count` and `liked_by_user` state variables to their previous values in case of an error.
2023-11-01 10:14:48 -03:00
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
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
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
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
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
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
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
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
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
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
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
anovazzi1
cf434eb7ba feat(tagsSelectorComponent): add TagsSelector component to allow users to select tags for a flow
feat(tagsSelectorComponent): add TagComponent to render individual tags in the TagsSelector component
fix(API): add tags and publicFlow parameters to saveFlowStore function to save tags and set flow visibility
fix(ConfirmationModal): add size prop to allow customizing the size of the modal
feat(ExtraSidebar): add TagsSelector component to the Share Flow confirmation modal to allow users to select tags for the flow
feat(ExtraSidebar): add ToggleShadComponent to allow users to toggle the visibility of the shared flow
fix(ExtraSidebar): pass selected tags and sharePublic value to saveFlowStore function when sharing a flow
fix(ExtraSidebar): add useEffect to fetch tags from API and initialize tags state
fix(ExtraSidebar): add handleTagSelection function to handle tag selection in TagsSelector component
fix(ExtraSidebar): update handleShareFlow function to pass selected tags and sharePublic value to saveFlowStore function
fix(ExtraSidebar): update ConfirmationModal size prop to use size prop from component props
fix(ExtraSidebar): update ConfirmationModal dependency array to include sharePublic value
fix(NodeToolbarComponent): pass empty array as tags parameter to saveFlowStore function when sharing a component
fix(MarketCardComponent): pass tags parameter to saveFlowStore function when saving a flow from the store
fix(ConfirmationModal): add size prop to ConfirmationModalType to allow customizing the size of the modal
2023-10-27 01:11:48 -03:00
anovazzi1
343e6e3bfc fix(ConfirmationModal/index.tsx): fix typo in tooltipContent variable name
refactor(ConfirmationModal/index.tsx): refactor Trigger component to conditionally render ShadTooltip based on tooltipContent value
2023-10-26 23:39:36 -03:00
anovazzi1
b73ca7c36a fix(ConfirmationModal): remove modalContent prop and replace it with Content and Trigger components to improve flexibility and reusability
feat(ConfirmationModal): add support for displaying tooltip content and positioning in the Trigger component
fix(AdminPage): remove duplicate modalContent prop in ConfirmationModal components
fix(ApiKeysPage): remove duplicate modalContent prop in ConfirmationModal components
fix(ExtraSidebar): remove duplicate modalContent prop in ConfirmationModal component
fix(NodeToolbarComponent): remove duplicate modalContent prop in ConfirmationModal component
fix(types/components): add TriggerProps type to define props for the Trigger component in ConfirmationModal
2023-10-26 23:24:10 -03:00
cristhianzl
665dae87e5 fix(store.py): flatten the "tags" field in the list_components response to improve data structure and readability
feat(store.py): add new endpoint to get list of components liked by a user
fix(store.py): add "downloads_count" field to the list_components response to display the number of downloads for each component
fix(store.py): add "metadata" field to the list_components response to include additional metadata for each component
fix(store.py): change the "user_created.name" field to "user_created.first_name" in the list_components response to display the first name of the user who created the component
fix(store.py): change the "liked_by_count" field in the component response to be an integer instead of a list of UUIDs
fix(store.py): change the "downloads_count" field in the component response to be an integer instead of a list of UUIDs
fix(store.py): add "metadata" field to the component response to include additional metadata for each component
fix(store.py): add "metadata" field to the store_component_create request schema to allow passing additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
2023-10-26 19:11:16 -03:00
anovazzi1
95af78ef08 refactor(market-card.tsx): remove unused handleFork function to improve code readability and maintainability
feat(market-card.tsx): add setErrorData function to alertContext to handle error messages when adding a component
feat(market-card.tsx): add setSuccessData function to alertContext to display success message when adding a component
2023-10-26 16:36:45 -03:00
anovazzi1
4775cd1d95 fix(market-card.tsx): fix import statement for storeComponent type
feat(market-card.tsx): add ShadTooltip component for displaying tooltips on market card
fix(index.tsx): fix import statement for storeComponent type
feat(index.tsx): change data and dataSelect state types to storeComponent[]
fix(index.tsx): add missing properties to storeComponent type
fix(styleUtils.ts): add missing import statement for Heart and ToyBrick icons
2023-10-26 16:26:25 -03:00
anovazzi1
b3a8be547f fix(StorePage/index.tsx): handle error when fetching saved components and display error message
feat(StorePage/index.tsx): add error handling for API key fetch and display error message
2023-10-26 15:19:32 -03:00
cristhianzl
47ecdfb185 fix(StorePage/index.tsx): remove unnecessary slicing of search data in handleGetComponents and handlePageChange functions
feat(StorePage/index.tsx): add getNumberOfComponents function to fetch the total count of components in the store and update the totalRowsCount state
2023-10-26 08:49:12 -03:00
cristhianzl
b623438a27 feat(saved-components): add pagination functionality to the saved components page
- Add `PaginatorComponent` import to the `saved-components` file to use for pagination.
- Add `totalRowsCount`, `size`, and `index` state variables to manage pagination.
- Modify the `handleGetComponents` function to fetch components based on the current `index` and `size` values.
- Add `handleChangePagination` function to handle pagination changes and fetch components accordingly.
- Render the `PaginatorComponent` below the list of components if there are components to display and the loading state is false.

feat(store-page): add pagination functionality to the store page

- Remove the `loadingWithApiKey` variable as it is no longer needed.
- Remove the `renderComponents` variable as it is no longer needed.
- Add `renderPagination` variable to determine if pagination should be rendered based on the search data, loading state, and search state.
- Render the `PaginatorComponent` below the list of components if there are components to display, the loading state is false, and the search state is false.
2023-10-26 00:07:10 -03:00
cristhianzl
bfff5d305a refactor(storeContext.tsx): update setHasStore to use "enabled" property from response instead of "has_store" for better readability and consistency
refactor(API/index.ts): update checkHasStore API endpoint URL to use BASE_URL_API constant for better maintainability and consistency
2023-10-25 23:59:37 -03:00
cristhianzl
1081ace70f pagination and context with store 2023-10-25 22:18:31 -03:00
cristhianzl
1b69f02b16 fix(StorePage): fix pagination bug where incorrect index and pageSize were passed to getStoreComponents function
feat(StorePage): add support for dynamic pagination in StorePage by implementing handleChangePagination function
feat(StorePage): add support for resetting filter in StorePage by implementing resetFilter function
feat(StorePage): add support for displaying total rows count in StorePage
feat(StorePage): add support for displaying loading message while fetching data in StorePage
feat(StorePage): add support for displaying error message when there is an error fetching data in StorePage
feat(StorePage): add support for displaying search input and search button in StorePage
feat(StorePage): add support for filtering components by type in StorePage
feat(StorePage): add support for displaying badges for each component type in StorePage
feat(StorePage): add support for displaying market card components in StorePage
feat(StorePage): add support for displaying paginator component in StorePage
feat(StorePage): add support for displaying loading message while fetching data with API key in StorePage
fix(types): add storeComponent property to PaginatorComponentType to differentiate between store and other components
2023-10-25 21:05:04 -03:00
anovazzi1
fd4aa3648a fix(tabsContext.tsx): remove console.log statements for debugging
feat(market-card.tsx): add success alert when flow is installed
2023-10-25 19:58:27 -03:00
anovazzi1
6d5c803c17 fix(tabsContext.tsx): fix typo in createRandomKey function parameter name from uid to uid()
feat(tabsContext.tsx): add createRandomKey function to generate random keys for custom components
refactor(tabsContext.tsx): refactor logic to update storeComponents object with new custom component data
refactor(tabsContext.tsx): refactor logic to update newData object with updated custom_components object
refactor(tabsContext.tsx): refactor logic to correctly concatenate newFlows array in addFlowToLocalState function
refactor(tabsContext.tsx): refactor logic to generate random key for component type in updateComponentType function
feat(utils.ts): add createRandomKey function to generate random keys for components
2023-10-25 19:49:39 -03:00