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

fix: sidebar animations, colors and minor design fixes #4375

Closed
wants to merge 15 commits into from

Conversation

lucaseduoli
Copy link
Collaborator

This pull request includes several updates across different areas of the project, such as CI/CD workflows, documentation, dependency management, and codebase improvements. The most important changes include the addition of a new GitHub Actions workflow for running benchmarks, extensive updates to the documentation for API keys and deployment on Google Cloud Platform, and modifications to dependencies and asynchronous functions.

CI/CD Improvements:

  • Added a new GitHub Actions workflow to run benchmarks on push, pull request, and manual dispatch events (.github/workflows/codspeed.yml).

Documentation Updates:

  • Updated the API keys documentation to include new methods for generating and using API keys, and improved clarity and formatting (docs/docs/Configuration/configuration-api-keys.md). [1] [2]
  • Revised the GCP deployment guide to provide a more streamlined and updated process for deploying Langflow on Google Cloud Platform (docs/docs/Deployment/deployment-gcp.md).

Dependency Management:

  • Updated dependencies in pyproject.toml to use newer versions of langchain-unstructured, astra-assistants, and packaging. Added new dependencies pytest-codspeed and forbiddenfruit (pyproject.toml). [1] [2] [3]

Codebase Simplification:

  • Refactored several asynchronous functions to synchronous ones in src/backend/base/langflow/api/utils.py and src/backend/base/langflow/api/v1/flows.py to simplify the codebase. [1] [2] [3] [4]

Minor Code Changes:

  • Updated the PromptComponent class in the AssemblyAI_Flow.json to remove unnecessary async usage and improve clarity (docs/docs/Integrations/AssemblyAI_Flow.json).

deon-sanchez and others added 13 commits November 1, 2024 17:23
* refactor: Remove CustomHeader component from AppWrapperPage

* refactor: Remove unused code and fix formatting in MainPage component

- Remove commented out code and unused imports
- Fix indentation and formatting issues in the component

* colors update and component building

* refactor: Update grid and list components in MainPage

- Update grid component in MainPage to use custom navigation hook
- Add folderId parameter to editFlowLink in grid component
- Update list component in MainPage to use custom navigation hook
- Add folderId parameter to editFlowLink in list component

Refactor the grid and list components in MainPage to use the custom navigation hook instead of the react-router-dom's useNavigate hook. This allows for better control and customization of navigation within the components. Additionally, the editFlowLink now includes the folderId parameter when navigating to the flow edit page.

Closes #<issue_number>

* refactor: Update grid and list components in MainPage

Refactor the grid and list components in the MainPage to improve performance and enhance user experience. This includes updating the styling, optimizing code, and fixing formatting issues.

* Refactor header component to dynamically display folder name

* Refactor CSS styles and button component

- Update CSS styles in applies.css to adjust the position of the header notifications dot.
- Refactor the button component in button.tsx to fix a typo in the class names.

Closes #4259

* Refactor folder store and sidebar components

* Refactor header component to dynamically toggle folder sidebar visibility

* Refactor CSS styles and button component

* Refactor CSS styles and button component

* Refactor CSS styles to adjust the width of the text container

* Refactor dropdown and grid components to handle playground click

* Refactor folder sidebar and list components

* Refactor CSS styles and components for HeaderMenu, GridComponent, and ListComponent

* Refactor CSS styles and components for HeaderMenu, GridComponent, ListComponent, dropdown, and button

* Refactor CSS styles to adjust the width of the text container in ListComponent

* refactor: Update folder name display in EmptyPage component

* refactor: Update folder name display in FlowMenu component

* refactor: Update folder name display in AccountMenu and EmptyPage components

* refactor: Update folder name display in AccountMenu, EmptyPage, and FlowMenu components

* refactor: Update folder name display in AppHeader, DashboardWrapperPage, and HomePage components

* refactor: Update folder name display in MainPage components

- Update folder name display in AppHeader, DashboardWrapperPage, and HomePage components
- Update folder name display in AccountMenu, EmptyPage, and FlowMenu components
- Update folder name display in AccountMenu and EmptyPage components
- Update folder name display in FlowMenu component
- Update folder name display in EmptyPage component

Update the folder name display in various components of the MainPage. This ensures that the folder names are correctly displayed in the UI. The affected components include AppHeader, DashboardWrapperPage, HomePage, AccountMenu, EmptyPage, and FlowMenu. This refactor improves the consistency and user experience of the application.

* refactor: Update folder name display in EmptyPage and HomePage components

* refactor: Update folder name display in AppHeader, DashboardWrapperPage, and HomePage components

* refactor: Update folder name display in MainPage components

* file organization

* Refactor folder name display in MainPage, ListComponent, and HomePage components

* Refactor folder name display in MainPage components

* test fixes

* test fixes part 2
* bugfix: langchain-astradb expects None or Iterable

* Update astradb.py
* simple ai agent

new component:
simple ai agent

py tests for tool calling agent as well as for simple ai agent

* Update simple_agent.py

update _config Changes and code oprimised

* Update simple_agent.py

Error or inputType as None Solved

* [autofix.ci] apply automated fixes

* fix: INP001 ruff error

* Update test_tool_calling_agent.py

added pytest mark as api required

* Update simple_agent.py

added system prompt

* [autofix.ci] apply automated fixes

* updates in the input field orders

* [autofix.ci] apply automated fixes

* Update simple_agent.py

chat memory added

* [autofix.ci] apply automated fixes

* lint Errors Solved

* Squashed commit of the following:

commit e965fd3
Author: Sebastián Estévez <[email protected]>
Date:   Thu Oct 31 17:16:08 2024 -0400

    fix: broken docker test (#4337)

    * Fix broken docker test

    Fixes #4336

    Update the Docker test workflow to use the `get_version` function from `langflow.utils.version`.

    * Modify the `Test image` step in `.github/workflows/docker_test.yml` to use the `get_version` function instead of directly importing `__version__`.
    * Modify the `Test backend image` step in `.github/workflows/docker_test.yml` to use the `get_version` function instead of directly importing `__version__`.

    ---

    For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/langflow-ai/langflow/issues/4336?shareId=XXXX-XXXX-XXXX-XXXX).

    * version.version not util.version

commit 3279b8a
Author: Lucas Oliveira <[email protected]>
Date:   Thu Oct 31 16:39:58 2024 -0300

    fix: add collapsible function to templates and fix design bugs (#4305)

    * Updated colors

    * Fixed design for small screens

    * Change border radius

    * Changed size of text on templates description

    * Fix shine effect on small screens

    * Fixed icons on starter templates

    * Updated mono font to JetBrains

    * Updated icon hit area for X

    * Added gradient wrapper and x-gradient

    * Changed colors and font weights for nav component

    * Added zoom on hover of gradient

    * Fixed input size

    * Fixed all templates to show everything

    * Hide scrollbar

    * Change text size of card

    * Removed title of the categories

    * Removed unused currentTab from templatecategory

    * Updated position of search icon

    * Updated style of inputs

    * Updated search clear button

    * Fixed bug on small screens

    * Added no results query

    * Fixed background on get started cards

    * Added focus ring on nav component

    * Added tab index to search and sidebar buttons

    * Added keyboard navigation to templates

    * Updated templatesModal to use ShadCN Sidebar

    * Implemented collapsible sidebar

    * Fix collapsible to work on mobile but be overlaying content

    * Added noise to styleUtils

    * Updated padding and sizes for mobile

    * Updated text size

    * Updated font family to inter

    * Made get started components fetch title and description from the flow

    * Updated description on get started component

    * Updated naming of sidebar

    * Updated description of start from scratch

    * Updated color of selected sidebar item

    * Changed text color for sidebar not active items

    * changed description sizes

    * changed to line clamp

    * Reduced gap between icon and category text

    * Fixed no results state

    * Fixed X icon only appearing on hover

    * Fix auto focus issue

    * fixed hover color of primary button

    * Fixed gradients to use stops if it exists and stop using random gradient

    * removed random gradient

    * Fixed design of cards in templates

    * Updated nav to go through tests

    * Fixed focus on input

    * [autofix.ci] apply automated fixes

    * New color

    * fix testes

    * Fixed starter projects test

    * ✨ (starter-projects.spec.ts): add Page import to test function parameters for better code readability and maintainability
    📝 (starter-projects.spec.ts): refactor test to include a function for waiting for template visibility, improving code readability and reducing duplication

    ---------

    Co-authored-by: Cristhian Zanforlin Lousa <[email protected]>
    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

commit a03da10
Author: Sebastián Estévez <[email protected]>
Date:   Thu Oct 31 14:57:07 2024 -0400

    fix: langfuse upgrade and crew result usage (#4342)

    * lanfuse upgrade and crew result usage

    * ✅ (Dynamic Agent.spec.ts): Enable tests for checking the presence of required environment variables before running the test suite.

    ✨ (Hierarchical Agent.spec.ts): Add integration test for Hierarchical Tasks Agent to ensure proper functionality and behavior
    ✨ (Sequential Task Agent.spec.ts): Add integration test for Sequential Tasks Agent to ensure proper functionality and behavior

    ---------

    Co-authored-by: cristhianzl <[email protected]>

* [autofix.ci] apply automated fixes

* Update worker.py

adding  # noqa: to solve CI Error

* [autofix.ci] apply automated fixes

* Update worker.py

removed unused params that were causing the issue

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: italojohnny <[email protected]>
…loop (#4293)

Raise exception in tests when blocking code is called in event loop
Remove some get_event_loop calls
Make some functions that don't await non-async (RUF029)
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. documentation Improvements or additions to documentation labels Nov 4, 2024
@github-actions github-actions bot added bug Something isn't working and removed documentation Improvements or additions to documentation labels Nov 4, 2024
ogabrielluiz and others added 2 commits November 4, 2024 12:31
* Refine condition to check for undefined value in use-handle-new-value hook

* update mutateTemplate to use APIClassType

* Refactor Component class to update inputs and validate outputs

This commit refactors the Component class in the `component.py` file. It introduces two new methods: `update_inputs` and `run_and_validate_update_outputs`. The `update_inputs` method allows for updating the build configuration with new field values, while the `run_and_validate_update_outputs` method updates the frontend node and validates the outputs. Additionally, the `_validate_frontend_node` method is added to check if all outputs are valid. The `_set_output_types` method is modified to accept a list of outputs and set their return types. Overall, these changes improve the functionality and maintainability of the Component class.

* Add dynamic output validation in API endpoint for component updates

* Update build_config to store field_value under "value" key

* Refactor: Convert dict values to list in _set_output_types call

* Add type check for `cc_instance` before calling `run_and_validate_update_outputs`

* Add DynamicOutputComponent with configurable outputs based on input

* Add test for updating component outputs with dynamic code input

* Refactor: Make get_dynamic_output_component_code asynchronous for improved performance

---------

Co-authored-by: Edwin Jose <[email protected]>
#4369)

* refactor: reorganize langchain dependencies in pyproject.toml

* feat: add langchain-ollama dependency to pyproject.toml

* fix: update imports to use langchain_ollama for OllamaEmbeddings and ChatOllama
@lucaseduoli lucaseduoli closed this Nov 4, 2024
Copy link

codspeed-hq bot commented Nov 5, 2024

CodSpeed Performance Report

Merging #4375 will degrade performances by 27.89%

Comparing main (bd7f913) with main (c227a9b)

Summary

⚡ 1 improvements
❌ 1 regressions
✅ 13 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main main Change
test_get_and_cache_all_types_dict 1.2 ms 1 ms +12.58%
test_setup_llm_caching 2.1 ms 2.9 ms -27.89%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants