The `ExtraSidebar` component in `extraSidebarComponent/index.tsx` has been refactored to extract the `SidebarDraggableComponent` into a separate file. This was done to improve code organization and reusability. The extracted component takes props such as `display_name`, `itemName`, `error`, `color`, and `onDragStart` to render the draggable sidebar component.
fix(typesContext.tsx): update the display name of the component node to remove the count and add the increment value
fix(typesContext.tsx): clone the component node before assigning it to newData to prevent reference error
fix(extraSidebarComponent/index.tsx): import the missing removeCountFromString function from utils/utils to fix a reference error
fix(extraSidebarComponent/index.tsx): update the type of the dragged item to remove the count from the name
feat(utils.ts): add removeCountFromString function to remove the count from a string
feat(authContext.tsx): add support for autoLogin and userData in the TypesProvider component to retrieve and save custom components based on user data
fix(typesContext.tsx): update useEffect dependencies to include autoLogin and userData to ensure proper functionality and prevent unnecessary re-renders
fix(typesContext.tsx): handle error when fetching types and log the error for debugging purposes
feat(typesContext.tsx): add saveComponent function to save custom components to localStorage and update the data state with the new component
fix(nodeToolbarComponent/index.tsx): import typesContext from typesContext file to use the saveComponent function
feat(nodeToolbarComponent/index.tsx): call saveComponent function from typesContext to save the current node data as a custom component
feat(utils.ts): add IncrementObjectKey function to increment the key of an object if it already exists, to avoid overwriting existing keys in localStorage
- Added import statements for necessary types and utility functions
- Added `saveComponent` function to the `typesContextType` interface
- Implemented `saveComponent` function to save a component to local storage
fix(nodeToolbarComponent/index.tsx): fix typo in case statement
- Fixed typo in case statement for "Download" option
feat(nodeToolbarComponent/index.tsx): add logic to handle "SaveAll" option
- Added logic to handle the "SaveAll" option in the switch statement
- Added condition to check if user is authenticated
- Added condition to check if user is auto-logged in
- Added console logs for debugging purposes
feat(entities/index.ts): add type definition for local storage user data
- Added `localStorageUserType` type definition to represent the structure of user data stored in local storage
feat(typesContext/index.ts): add type definition for node data
- Added `NodeDataType` type definition to represent the structure of node data
feat(utils.ts): add utility function to check if local storage key exists
- Added `checkLocalStorageKey` function to check if a given key exists in local storage
feat(reactflowUtils): add functions to create a flow component and download a node as a JSON file
The changes in `nodeToolbarComponent` include importing the `downloadNode` function from `reactflowUtils` and adding a case in the switch statement to call the `downloadNode` function when the action is "SaveAll". This allows the user to download the node as a JSON file.
In `reactflowUtils`, two new functions are added. The `createFlowComponent` function takes in node data and creates a flow component with the necessary structure. The `downloadNode` function takes a flow component and converts it into a JSON file that can be downloaded by the user.
This PR introduces a new feature to enhance the editing capabilities of
nodes in our application. We've added a "More" button to the
nodeToolbar, which, when clicked, reveals additional options for editing
nodes.
feat(nodeToolbarComponent): add support for minimal mode in the toolbar
feat(nodeToolbarComponent): add functionality to show/hide advanced options in the toolbar
🔥 refactor(main.py): remove initialize_database function call from app startup event to improve code cleanliness and remove unnecessary database initialization
🔥 refactor(base.py): remove unused teardown method and add set_ready method to improve code cleanliness and provide a way to set service readiness
🐛 fix(auth.py): validate superuser and superuser_password fields if AUTO_LOGIN is true
✨ feat(utils.py): add initialize_database() function to initialize the database connection
✨ feat(utils.py): call initialize_database() before setting up the superuser if the database manager is ready
✨ feat(test_database.py): add support for session management using session_getter to improve code organization and maintainability
🐛 fix(test_endpoints.py): remove unused imports to improve code readability
✨ feat(test_endpoints.py): add support for session management using session_getter to improve code organization and maintainability
🐛 fix(test_login.py): remove unused imports to improve code readability
✨ feat(test_login.py): add support for session management using session_getter to improve code organization and maintainability
🔧 fix(test_user.py): update fixtures to use session_getter and get_db_manager functions for session management
✨ feat(test_user.py): add support for creating and managing database sessions using session_getter and get_db_manager functions
🔧 fix(test_user.py): update test_user_waiting_for_approval function to use session_getter and get_db_manager functions for session management
🔧 fix(test_user.py): update test_data_consistency_after_delete function to use session_getter and get_db_manager functions for session management
🔧 fix(test_user.py): update test_inactive_user function to use session_getter and get_db_manager functions for session management
This pull request introduces a new feature that enhances the usability
and organization of our application's flow. We've added a convenient
"Minimize Node" button, empowering users to declutter their workspace
with a single click. This feature allows users to focus on the most
relevant nodes, resulting in a more efficient and visually pleasing
workflow.