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

refactor parametersComponent, editNodeModal and codeTabsComponent #1916

Merged
merged 3 commits into from
May 20, 2024

Conversation

Cristhianzl
Copy link
Collaborator

✨ (codeTabsComponent/index.tsx): add support for exporting code as a file
♻️ (codeTabsComponent/index.tsx): refactor code to use a switch statement instead of multiple if conditions for different template field types
🔧 (codeTabsComponent/index.tsx): fix import statements and remove unused imports
📝 (codeTabsComponent/index.tsx): add comments to improve code readability
📝 (codeTabsComponent/index.tsx): refactor code to use a switch statement instead of multiple if-else conditions for better readability and maintainability
♻️ (codeTabsComponent/index.tsx): refactor code to use a Case component for each condition in the switch statement to improve code organization and readability
✨ (index.tsx): remove unused import of React from "react" to improve code cleanliness
♻️ (index.tsx): refactor code to remove unused imports and variables, improve code readability and organization
📝 (index.tsx): add missing import of Case component from "../../../../shared/components/caseComponent"
🔧 (index.tsx): add missing import of TooltipRenderComponent from "../tooltipRenderComponent"
✅ (index.tsx): add missing hooks and functions to improve code functionality and maintainability

📝 (index.tsx): Refactor code to improve readability and maintainability

📝 (index.tsx): refactor the rendering logic in the ParameterComponent to improve readability and maintainability
🔧 (index.tsx): fix access to nested properties in the data object by using optional chaining operator (?.) to prevent potential errors when accessing undefined properties
✨ (tooltipRenderComponent): add a new component for rendering tooltips in the genericNode component
📝 (use-fetch-data-on-mount): add a new hook for fetching data on component mount
📝 (use-handle-new-value): add a new hook for handling new values in the component
📝 (use-handle-node-class): add a new hook for handling node class in the component
📝 (use-handle-refresh-buttons): add a new hook for handling refresh button press in the component
✨ (editNodeModal/index.tsx): import Case component to handle conditional rendering of different input components based on template type
📝 (editNodeModal/index.tsx): add comments to explain the purpose of the code and provide context for future developers
♻️ (editNodeModal/index.tsx): refactor code to use the Case component for conditional rendering instead of multiple if statements
📝 (file.js): update code formatting and indentation for better readability

📝 (editNodeModal/index.tsx): update code to fix a bug related to accessing nested properties in myData.node object
♻️ (editNodeModal/index.tsx): refactor code to use conditional rendering with Case component for better readability and maintainability
✨ (caseComponent/index.tsx): add a new component called Case that conditionally renders its children based on a given condition
📝 (components/index.ts): add an optional display_name property to the groupedObjType interface
♻️ (components/index.ts): remove unnecessary commas and fix indentation in the codeTabsPropsType interface
🐛 (reactflowUtils.ts): remove unused parameter 'edges' in isValidConnection function
♻️ (reactflowUtils.ts): refactor scapeJSONParse and scapeJSONStringfy functions to remove unnecessary exclamation marks
🐛 (reactflowUtils.ts): fix bug in updateIds function where it doesn't update the sourceHandle and targetHandle correctly
🐛 (reactflowUtils.ts): fix bug in validateNode function where it doesn't handle empty keys correctly
🐛 (reactflowUtils.ts): fix bug in validateNode function where it doesn't handle duplicate keys correctly
🐛 (reactflowUtils.ts): fix bug in validateNode function where it doesn't handle dict type correctly
🐛 (reactflowUtils.ts): fix bug in validateNodes function where it doesn't handle empty nodes correctly
🐛 (reactflowUtils.ts): fix bug in updateEdges function where it doesn't update the className correctly
🐛 (reactflowUtils.ts): fix bug in handleKeyDown function where it doesn't handle control+backspace on Windows/Linux correctly
🐛 (reactflowUtils.ts): fix bug in handleOnlyIntegerInput function where it doesn't handle decimal point correctly
🐛 (reactflowUtils.ts): fix bug in getConnectedNodes function where it doesn't return the correct connected nodes
🐛 (reactflowUtils.ts): fix bug in convertObjToArray function where it doesn't handle non-dict type correctly
🐛 (reactflowUtils.ts): fix bug in generateFlow function where it doesn't filter out edges correctly
🐛 (reactflowUtils.ts): fix bug in reconnectEdges function where it doesn't update the sourceHandle correctly
🐛 (reactflowUtils.ts): fix bug in filterFlow function where it doesn't filter out nodes and edges correctly
🐛 (reactflowUtils.ts): fix bug in validateSelection function where it doesn't handle selection mode correctly
📝 (reactflowUtils.ts): remove trailing commas and unnecessary whitespace to improve code readability and consistency
♻️ (reactflowUtils.ts): refactor validateSelection function to remove duplicate code and improve readability
♻️ (reactflowUtils.ts): refactor generateNodeTemplate function to simplify code and improve readability
♻️ (reactflowUtils.ts): refactor isHandleConnected function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor generateNodeFromFlow function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor connectedInputNodesOnHandle function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor updateProxyIdsOnTemplate function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor updateEdgesIds function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor expandGroupNode function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor getGroupStatus function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor createFlowComponent function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor updateComponentNameAndType function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor removeFileNameFromComponents function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor extractFieldsFromComponenents function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor downloadFlow function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor downloadFlows function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor createNewFlow function to remove unnecessary parentheses and improve readability

…file

♻️ (codeTabsComponent/index.tsx): refactor code to use a switch statement instead of multiple if conditions for different template field types
🔧 (codeTabsComponent/index.tsx): fix import statements and remove unused imports
📝 (codeTabsComponent/index.tsx): add comments to improve code readability

📝 (codeTabsComponent/index.tsx): refactor code to use a switch statement instead of multiple if-else conditions for better readability and maintainability
♻️ (codeTabsComponent/index.tsx): refactor code to use a Case component for each condition in the switch statement to improve code organization and readability

✨ (index.tsx): remove unused import of React from "react" to improve code cleanliness
♻️ (index.tsx): refactor code to remove unused imports and variables, improve code readability and organization
📝 (index.tsx): add missing import of Case component from "../../../../shared/components/caseComponent"
🔧 (index.tsx): add missing import of TooltipRenderComponent from "../tooltipRenderComponent"
✅ (index.tsx): add missing hooks and functions to improve code functionality and maintainability

📝 (index.tsx): Refactor code to improve readability and maintainability

📝 (index.tsx): refactor the rendering logic in the ParameterComponent to improve readability and maintainability
🔧 (index.tsx): fix access to nested properties in the data object by using optional chaining operator (?.) to prevent potential errors when accessing undefined properties

✨ (tooltipRenderComponent): add a new component for rendering tooltips in the genericNode component
📝 (use-fetch-data-on-mount): add a new hook for fetching data on component mount
📝 (use-handle-new-value): add a new hook for handling new values in the component
📝 (use-handle-node-class): add a new hook for handling node class in the component
📝 (use-handle-refresh-buttons): add a new hook for handling refresh button press in the component

✨ (editNodeModal/index.tsx): import Case component to handle conditional rendering of different input components based on template type
📝 (editNodeModal/index.tsx): add comments to explain the purpose of the code and provide context for future developers
♻️ (editNodeModal/index.tsx): refactor code to use the Case component for conditional rendering instead of multiple if statements

📝 (file.js): update code formatting and indentation for better readability

📝 (editNodeModal/index.tsx): update code to fix a bug related to accessing nested properties in myData.node object
♻️ (editNodeModal/index.tsx): refactor code to use conditional rendering with Case component for better readability and maintainability

✨ (caseComponent/index.tsx): add a new component called Case that conditionally renders its children based on a given condition
📝 (components/index.ts): add an optional display_name property to the groupedObjType interface
♻️ (components/index.ts): remove unnecessary commas and fix indentation in the codeTabsPropsType interface

🐛 (reactflowUtils.ts): remove unused parameter 'edges' in isValidConnection function
♻️ (reactflowUtils.ts): refactor scapeJSONParse and scapeJSONStringfy functions to remove unnecessary exclamation marks
🐛 (reactflowUtils.ts): fix bug in updateIds function where it doesn't update the sourceHandle and targetHandle correctly
🐛 (reactflowUtils.ts): fix bug in validateNode function where it doesn't handle empty keys correctly
🐛 (reactflowUtils.ts): fix bug in validateNode function where it doesn't handle duplicate keys correctly
🐛 (reactflowUtils.ts): fix bug in validateNode function where it doesn't handle dict type correctly
🐛 (reactflowUtils.ts): fix bug in validateNodes function where it doesn't handle empty nodes correctly
🐛 (reactflowUtils.ts): fix bug in updateEdges function where it doesn't update the className correctly
🐛 (reactflowUtils.ts): fix bug in handleKeyDown function where it doesn't handle control+backspace on Windows/Linux correctly
🐛 (reactflowUtils.ts): fix bug in handleOnlyIntegerInput function where it doesn't handle decimal point correctly
🐛 (reactflowUtils.ts): fix bug in getConnectedNodes function where it doesn't return the correct connected nodes
🐛 (reactflowUtils.ts): fix bug in convertObjToArray function where it doesn't handle non-dict type correctly
🐛 (reactflowUtils.ts): fix bug in generateFlow function where it doesn't filter out edges correctly
🐛 (reactflowUtils.ts): fix bug in reconnectEdges function where it doesn't update the sourceHandle correctly
🐛 (reactflowUtils.ts): fix bug in filterFlow function where it doesn't filter out nodes and edges correctly
🐛 (reactflowUtils.ts): fix bug in validateSelection function where it doesn't handle selection mode correctly

📝 (reactflowUtils.ts): remove trailing commas and unnecessary whitespace to improve code readability and consistency
♻️ (reactflowUtils.ts): refactor validateSelection function to remove duplicate code and improve readability
♻️ (reactflowUtils.ts): refactor generateNodeTemplate function to simplify code and improve readability
♻️ (reactflowUtils.ts): refactor isHandleConnected function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor generateNodeFromFlow function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor connectedInputNodesOnHandle function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor updateProxyIdsOnTemplate function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor updateEdgesIds function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor expandGroupNode function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor getGroupStatus function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor createFlowComponent function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor updateComponentNameAndType function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor removeFileNameFromComponents function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor extractFieldsFromComponenents function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor downloadFlow function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor downloadFlows function to remove unnecessary parentheses and improve readability
♻️ (reactflowUtils.ts): refactor createNewFlow function to remove unnecessary parentheses and improve readability
@Cristhianzl Cristhianzl self-assigned this May 17, 2024
Copy link

vercel bot commented May 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langflow ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 20, 2024 7:35pm

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. javascript Pull requests that update Javascript code labels May 17, 2024
Copy link
Contributor

@anovazzi1 anovazzi1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
just need to run tests again

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 20, 2024
…leting a flow to ensure proper authentication

✨ (deleteComponentFlows.spec.ts): update confirmation message selector to match the updated text
✨ (nestedComponent.spec.ts): update selector to click on "New Project" button
♻️ (nestedComponent.spec.ts): remove redundant code for clicking on "showpinecone_env" checkbox
♻️ (nestedComponent.spec.ts): remove redundant code for clicking on "showpinecone_env" checkbox
♻️ (nestedComponent.spec.ts): remove redundant code for clicking on "showpinecone_env" checkbox
♻️ (nestedComponent.spec.ts): remove redundant code for clicking on "showpinecone_env" checkbox
♻️ (saveComponents.spec.ts): update selector to click on "New Project" button
♻️ (saveComponents.spec.ts): remove redundant code for clicking on "title-PythonFunctionTool" element
♻️ (saveComponents.spec.ts): remove redundant code for clicking on "title-ChatOpenAI" element
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it
♻️ (store.spec.ts): update API Key placeholder value to use environment variable

✅ (tweaks_test.spec.ts): update selectors to use getByText instead of locator for better readability and maintainability
@Cristhianzl Cristhianzl merged commit 795cc3b into dev May 20, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants